/* Roost's home page. Plain CSS with no build step. Motion is at the end, and only applies once home.js has added
   .motion to <html>, so the page reads in full without JavaScript or with Reduce Motion on. */

:root {
  --navy: #0D2436;
  --on-navy: #FFFBF2;
  --on-navy-2: #A9BCCB;
  --paper: #FFFBF2;
  --text: #10161C;
  --text-2: #3D4852;
  --rule: #B9C3CB;
  --tint: #156DA8;
  --pale: #DDF0FB;
  --sky: #6BBEF0;
  --gold: #FFD23F;
  --ink: #10161C;
  --pass: #FFFBF2;
  --pass-2: #4A5560;
  --ticket-edge: transparent;
  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.2, 1);
  --ease-back: cubic-bezier(0.3, 1.6, 0.5, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --navy: #07141E;
    --paper: #0F2231;
    --text: #F2EFE8;
    --text-2: #B7C4CF;
    --rule: #3A4D5C;
    --tint: #3999DA;
    --pale: #16324A;
    --ticket-edge: rgba(255, 251, 242, 0.2);
  }
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--on-navy);
  font: 100%/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.03em; }
p { margin: 0; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.on-navy { background: var(--navy); color: var(--on-navy); --link: var(--sky); --focus: var(--sky); --muted: var(--on-navy-2); }
.on-paper { background: var(--paper); color: var(--text); --link: var(--tint); --focus: var(--tint); --muted: var(--text-2); }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 20px; }
.wrap--narrow { max-width: 1040px; }
.wrap--text { max-width: 800px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }
.kicker {
  font: 700 0.8125rem/1.5 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.on-navy .kicker { color: var(--sky); }
.on-paper .kicker { color: var(--tint); }
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 12px 18px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--text);
  font-weight: 600;
  --focus: var(--tint);
}
.skip:focus { top: 12px; }

/* Header */
.site-header { border-bottom: 1px dashed rgba(255, 251, 242, 0.22); }
.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 28px;
  padding-block: 6px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--on-navy);
  text-decoration: none;
  font-size: 1.3125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.brand img { display: block; }
.nav { display: flex; flex-wrap: wrap; column-gap: 22px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-navy);
  text-decoration: none;
  font-size: 0.9375rem;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* Hero */
.hero { padding-block: 56px 72px; text-align: center; }
@media (min-width: 768px) { .hero { padding-block: 72px 104px; } }
.hero h1 {
  max-width: 920px;
  margin: 20px auto 0;
  font-size: clamp(2.75rem, 1.2rem + 5.6vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.035em;
}
.hero__lede {
  max-width: 45rem;
  margin: 24px auto 0;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.45;
  color: var(--on-navy-2);
}
.hero__plain { max-width: 45rem; margin: 16px auto 0; font-size: 1.0625rem; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  margin-top: 32px;
  padding: 0 24px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--on-navy);
  font-weight: 600;
}
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.fine { margin-top: 14px; font-size: 0.875rem; color: var(--on-navy-2); }

/* The boarding pass. Its colours stay the same in dark mode, like a printed ticket. */
.pass {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 1040px;
  margin: 56px auto 0;
  color: var(--ink);
  text-align: left;
}
.pass__main {
  flex: 1 1 560px;
  min-width: 0;
  padding: 24px 22px 26px;
  border-radius: 24px;
  background: var(--pass);
}
@media (min-width: 768px) { .pass__main { padding: 32px 40px 36px; } }
.pass__top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 700 0.75rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pass__top span:first-child { color: #156DA8; }
.pass__top span:last-child { color: var(--pass-2); font-weight: 400; }
.pass__route { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.pass__code { font-size: clamp(2.75rem, 1.6rem + 4vw, 4.75rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.pass__city { margin-top: 4px; font-size: 0.875rem; color: var(--pass-2); }
.pass__end { text-align: right; }
.pass__track { position: relative; flex: 1; height: 28px; margin-bottom: 22px; }
.pass__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 13px;
  border-top: 2px dashed #9AA8B3;
}
.pass__flown {
  position: absolute;
  left: 0;
  top: 13px;
  width: 62%;
  border-top: 2px solid #156DA8;
  transform-origin: left;
}
.pass__flight { position: absolute; left: 0; top: 0; width: 62%; height: 28px; }
.pass__plane {
  position: absolute;
  right: -17px;
  top: 0;
  width: 34px;
  height: 28px;
  padding: 0 3px;
  background: var(--pass);
  fill: var(--ink);
}
.pass__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 26px;
}
@media (min-width: 640px) { .pass__fields { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pass__label {
  font: 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pass-2);
}
.pass__value { margin-top: 2px; font-size: 1.3125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pass__value--tint { color: #156DA8; }
.bar { height: 10px; margin-top: 24px; border-radius: 5px; background: #E6E3DA; overflow: hidden; }
.bar__fill { width: 62%; height: 100%; border-radius: 5px; background: #156DA8; transform-origin: left; }
.pass__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 10px;
  font-size: 0.84375rem;
}
.pass__foot span:first-child { font-weight: 600; }
.pass__foot span:last-child { color: var(--pass-2); }
.pass__stub {
  display: flex;
  flex: 1 1 220px;
  flex-direction: column;
  padding: 28px 26px 24px;
  border-radius: 24px;
  background: var(--gold);
}
.stub__label { font: 700 0.75rem/1.4 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; }
.stub__pct { margin-top: 14px; font-size: 4.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stub__sub { margin-top: 6px; font-size: 0.9375rem; color: #4A3F14; }
.barcode { display: flex; gap: 3px; height: 80px; margin-top: auto; padding-top: 28px; }
.barcode i { background: var(--ink); }
.barcode .w1 { flex: 0 0 1px; }
.barcode .w2 { flex: 0 0 2px; }
.barcode .w3 { flex: 0 0 3px; }
.barcode .w4 { flex: 0 0 4px; }
.stub__code { margin-top: 10px; font: 0.6875rem/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }

/* Sections */
.section { padding-block: 72px; }
.section--tight-top { padding-top: 8px; }
@media (min-width: 768px) {
  .section { padding-block: 104px; }
  .section--tight-top { padding-top: 16px; }
}
.section-head { max-width: 760px; }
.section-head h2 { margin-top: 12px; font-size: clamp(2.25rem, 1.5rem + 2.8vw, 3.5rem); line-height: 1.05; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-lede { max-width: 46rem; margin-top: 16px; font-size: 1.1875rem; line-height: 1.5; color: var(--muted); }
.section-head--center .section-lede { margin-inline: auto; }

/* Your itinerary */
.stops { display: grid; grid-template-columns: minmax(0, 1fr); gap: 64px 24px; margin-top: 56px; }
@media (min-width: 700px) { .stops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .stops { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stop { display: flex; flex-direction: column; padding-top: 20px; border-top: 2px dashed var(--rule); }
.stop .kicker { font-size: 0.75rem; letter-spacing: 0.14em; }
.stop h3 { margin-top: 10px; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.02em; }
.stop > p:not(.kicker) { margin-top: 10px; font-size: 0.96875rem; color: var(--muted); }
.stop__screen { display: flex; justify-content: center; margin-top: auto; padding-top: 28px; }
.sample-note { margin-top: 40px; font-size: 0.875rem; color: var(--muted); }

/* The screenshots, from the app's Debug `-screenshots` mode, in an iPhone frame with the Dynamic Island drawn back
   in, since simulator captures leave it out. Each has a light and a dark capture, picked by the visitor's theme. */
.shot { width: min(100%, 290px); padding: 8px; border-radius: 46px; background: #10161C; box-shadow: inset 0 0 0 1px var(--ticket-edge); }
@media (min-width: 1200px) { .shot { width: 262px; padding: 7px; border-radius: 41px; } }
.shot__screen { position: relative; overflow: hidden; border-radius: 13.7% / 6.3%; background: #000000; }
.shot__screen picture,
.shot__screen img { display: block; width: 100%; height: auto; }
.shot__screen::after {
  content: "";
  position: absolute;
  top: 1.6%;
  left: 34.5%;
  width: 31%;
  height: 4.15%;
  border-radius: 999px;
  background: #000000;
}

/* Nothing to declare */
.split { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px 72px; }
.split__intro { flex: 1 1 320px; min-width: 0; }
.split__intro h2 { margin-top: 12px; font-size: clamp(2.25rem, 1.5rem + 2.8vw, 3.5rem); line-height: 1.05; }
.more { margin-top: 20px; font-weight: 600; }
.more a { display: inline-flex; align-items: center; min-height: 44px; }
.declare { flex: 1 1 520px; min-width: 0; margin: 0; }
.declare > div { display: flex; flex-wrap: wrap; gap: 6px 24px; padding-block: 22px; border-top: 1px dashed rgba(255, 251, 242, 0.3); }
.declare > div:last-child { border-bottom: 1px dashed rgba(255, 251, 242, 0.3); }
.declare dt { flex: 0 0 190px; padding-top: 3px; font: 0.8125rem/1.6 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--sky); }
.declare dd { flex: 1 1 240px; margin: 0; }
.declare strong { display: block; font-size: 1.1875rem; }
.declare span { display: block; margin-top: 2px; font-size: 0.96875rem; color: var(--on-navy-2); }

/* Pick your fare */
.fares { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; margin-top: 56px; }
.fare { overflow: hidden; border-radius: 24px; }
.fare--free { background: var(--pale); color: var(--text); --fare-muted: var(--text-2); --tick: var(--tint); }
.fare--pro { background: #0D2436; color: #FFFBF2; box-shadow: inset 0 0 0 1px var(--ticket-edge); --fare-muted: #A9BCCB; --tick: var(--gold); }
.fare__strip {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 2px dashed color-mix(in srgb, currentColor 28%, transparent);
  font: 700 0.75rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.fare--pro .fare__strip { color: var(--gold); }
.fare__body { padding: 24px 24px 30px; }
@media (min-width: 768px) {
  .fare__strip { padding-inline: 32px; }
  .fare__body { padding: 28px 32px 36px; }
}
.fare h3 { font-size: 1.375rem; letter-spacing: -0.02em; }
.fare__price { margin-top: 6px; font-size: 3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.fare__price span { font-size: 1.125rem; font-weight: 600; letter-spacing: 0; color: var(--fare-muted); }
.fare__note { margin-top: 8px; color: var(--fare-muted); }
.fare__plus { margin-top: 22px; font-weight: 700; }
.ticks { margin: 22px 0 0; padding: 0; list-style: none; }
.fare__plus + .ticks { margin-top: 4px; }
.ticks li { position: relative; padding: 7px 0 7px 28px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 11px;
  width: 6px;
  height: 12px;
  border: solid var(--tick);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.fares__small { max-width: 680px; margin: 32px auto 0; font-size: 0.9375rem; text-align: center; color: var(--muted); }

/* Before you fly */
.faq { margin-top: 28px; }
.faq details { border-top: 2px dashed var(--rule); }
.faq details:last-child { border-bottom: 2px dashed var(--rule); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding-block: 20px;
  font-size: 1.1875rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 1.75rem/1 var(--mono); color: var(--tint); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-bottom: 22px; font-size: 1.03125rem; color: var(--muted); }

/* The 404 page, site/404.html: one ticket, like the fares. */
.lost { padding-block: 72px 104px; }
.lost__ticket { max-width: 640px; overflow: hidden; border-radius: 24px; background: var(--paper); color: var(--text); box-shadow: inset 0 0 0 1px var(--ticket-edge); --link: var(--tint); --focus: var(--tint); }
.lost__strip {
  display: flex;
  justify-content: space-between;
  padding: 18px 28px;
  border-bottom: 2px dashed color-mix(in srgb, currentColor 28%, transparent);
  font: 700 0.75rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lost__body { padding: 28px 28px 32px; }
.lost__body .kicker { color: var(--tint); }
.lost h1 { margin-top: 10px; font-size: clamp(2.25rem, 1.5rem + 2.8vw, 3.25rem); line-height: 1.05; }
.lost__lede { margin-top: 14px; font-size: 1.125rem; color: var(--text-2); }
.lost__links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 18px; font-weight: 600; }
.lost__links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Footer */
.site-footer { border-top: 1px dashed rgba(255, 251, 242, 0.22); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px 56px;
  padding-block: 48px 56px;
  font-size: 0.875rem;
  color: var(--on-navy-2);
}
.site-footer__about { flex: 1 1 360px; max-width: 600px; }
.site-footer__about p + p { margin-top: 6px; }
.site-footer__name { margin-bottom: 10px; font-size: 1.1875rem; font-weight: 800; color: var(--on-navy); }
.site-footer__links { display: flex; flex-direction: column; font-size: 0.9375rem; }
.site-footer__links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Motion. home.js adds .motion only when Reduce Motion is off; the media query also stops it if that changes. */
@media (prefers-reduced-motion: no-preference) {
  html.motion { scroll-behavior: smooth; }

  /* The hero on load: the text rises, the pass prints, then the plane flies while the figures count up. */
  .motion [data-load] { animation: rise 0.7s var(--ease-out) calc(0.05s + var(--i, 0) * 0.08s) both; }
  .motion .pass__main { animation: rise 0.8s var(--ease-out) 0.45s both; }
  .motion .pass__stub { animation: rise 0.8s var(--ease-out) 0.6s both; }
  .motion .pass__flight { animation: fly 1.6s var(--ease-in-out) 1.1s both; }
  .motion .pass__flown,
  .motion .bar__fill { animation: grow-x 1.6s var(--ease-in-out) 1.1s both; }

  /* Sections rise in as they arrive, once. */
  .motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .motion [data-reveal].is-in { opacity: 1; transform: none; }

  /* Each screenshot lights up in its frame once its stop has arrived. */
  .motion .stop .shot__screen img { opacity: 0; transform: scale(1.04); transition: opacity 0.6s var(--ease-out) 0.35s, transform 0.9s var(--ease-out) 0.35s; }
  .motion .stop.is-in .shot__screen img { opacity: 1; transform: none; }

  .motion .faq summary::after { transition: transform 0.25s var(--ease-out); }
  @supports (interpolate-size: allow-keywords) {
    .motion .faq { interpolate-size: allow-keywords; }
    .motion .faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.3s var(--ease-out), content-visibility 0.3s allow-discrete; }
    .motion .faq details[open]::details-content { block-size: auto; }
  }
}
/* Side by side, things that arrive together follow one another. */
@media (prefers-reduced-motion: no-preference) and (min-width: 700px) {
  .motion [data-reveal] { transition-delay: calc(var(--i, 0) * 0.1s); }
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes fly { from { transform: translateX(-100%); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } }
