/* ============================================================
   Pocket Odyssey — "boarding pass & passport"
   The page is a travel document, not a product page: a real
   boarding pass for the hero, a genuine speed table built from
   the app's own vehicle constants, a dashed flight path running
   down the spine, and passport-stamp entries. The background
   flies from night through dawn into daylight as you scroll.
   ============================================================ */

:root {
  --night:   #0d1426;
  --dusk:    #1b2647;
  --dawn:    #6a5a6e;
  --day:     #f7efe0;
  --paper:   #fffaf0;
  --card:    #ffffff;

  --ink:      #1b2030;
  --ink-soft: rgba(27, 32, 48, .68);
  --ink-mute: rgba(27, 32, 48, .45);
  --on-night:      #f3ecdd;
  --on-night-soft: rgba(243, 236, 221, .74);
  --on-night-mute: rgba(243, 236, 221, .46);

  --sky:    #2f6ddd;
  --sky-lo: #1b4694;
  --sky-hi: #8fb3f2;
  --sun:    #e8792c;
  --stamp:  #b2422f;
  --leaf:   #14876a;

  --hair:      rgba(27, 32, 48, .16);
  --hair-soft: rgba(27, 32, 48, .09);
  --hair-night:rgba(243, 236, 221, .18);

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Night at the top, dawn through the middle, daylight by the footer —
   the same terminator the app draws across the globe. */
body {
  margin: 0; color: var(--ink); font-family: var(--sans);
  font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased;
  background:
    linear-gradient(180deg,
      var(--night) 0%, var(--night) 30%, var(--dusk) 38%,
      #6d5f74 44%, #c98f63 49%, var(--day) 56%, var(--day) 100%);
  background-repeat: no-repeat;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--sky-lo); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 0; }
p { margin: 0; }
.rule { max-width: 1060px; margin: 0 auto; padding-inline: 24px; }
.night { color: var(--on-night); }
.skip { position: absolute; left: -9999px; background: var(--sky); color: #fff; padding: 10px 18px; font-weight: 700; }
.skip:focus { left: 0; top: 0; z-index: 99; }

/* ---------- header strip ---------- */
.strip { border-bottom: 1px solid var(--hair-night); }
.strip .rule { display: flex; align-items: center; gap: 14px; min-height: 58px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-night); margin-right: auto; }
.mark img { width: 28px; height: 28px; border-radius: 8px; }
.mark b { font-family: var(--serif); font-weight: 600; font-size: 16px; }
.strip small { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-night-mute); }

/* ---------- hero ---------- */
.depart { padding: clamp(46px, 6vw, 76px) 0 clamp(40px, 5vw, 64px); position: relative; overflow: hidden; }
.stars { position: absolute; inset: 0; opacity: .5; pointer-events: none; background-image:
  radial-gradient(1.6px 1.6px at 11% 16%, #fff, transparent), radial-gradient(1.3px 1.3px at 27% 52%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 42% 12%, #fff, transparent), radial-gradient(1.2px 1.2px at 58% 40%, #fff, transparent),
  radial-gradient(1.6px 1.6px at 73% 20%, #fff, transparent), radial-gradient(1.2px 1.2px at 88% 56%, #fff, transparent),
  radial-gradient(1.4px 1.4px at 19% 76%, #fff, transparent), radial-gradient(1.2px 1.2px at 66% 82%, #fff, transparent); }
.depart .rule { position: relative; }
.depart h1 { font-size: clamp(30px, 4.4vw, 48px); max-width: 17ch; }
.depart h1 i { font-style: italic; color: var(--sky-hi); }
.depart > .rule > p { margin-top: 16px; max-width: 54ch; color: var(--on-night-soft); font-size: clamp(15.5px, 1.7vw, 17.5px); }

/* ---------- the boarding pass ---------- */
.pass {
  margin-top: clamp(30px, 4vw, 44px); background: var(--paper); color: var(--ink);
  border-radius: 14px; box-shadow: 0 40px 90px -34px rgba(0,0,0,.72);
  display: grid; overflow: hidden; position: relative;
}
@media (min-width: 780px) { .pass { grid-template-columns: 1fr 250px; } }
.pass-main { padding: 26px 28px 28px; }
.pass-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-mute); }
.leg-row { display: flex; align-items: flex-end; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.port b { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3.6vw, 38px); line-height: 1; }
.port span { display: block; font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; }
.arc { flex: 1 1 90px; min-width: 70px; position: relative; height: 26px; }
.arc::before { content: ""; position: absolute; left: 0; right: 16px; top: 13px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--hair) 0 6px, transparent 6px 12px); }
.arc::after { content: "✈"; position: absolute; right: 0; top: 2px; font-size: 15px; color: var(--sky); }
.pass-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 0; margin-top: 24px; border-top: 1px solid var(--hair-soft); }
.pass-grid > * { min-width: 0; padding: 14px 14px 2px 0; }
.pass-grid dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-mute); }
.pass-grid dd { margin: 5px 0 0; font-family: var(--mono); font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pass-stub {
  background: var(--sky-lo); color: #fff; padding: 26px 24px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px; position: relative;
}
.pass-stub::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.7) 0 7px, transparent 7px 14px); }
.pass-stub b { font-family: var(--serif); font-weight: 600; font-size: 21px; display: block; }
.pass-stub small { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .72; }
.go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: #fff; color: var(--sky-lo);
  font-weight: 800; font-size: 14.5px; padding: 13px 20px; border-radius: 9px; text-decoration: none;
  transition: transform .18s cubic-bezier(.2,.7,.3,1); }
.go:hover { transform: translateY(-2px); color: var(--sky-lo); }
.pass-note { margin-top: 14px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--on-night-mute); }

/* ---------- speed table ---------- */
.timetable { padding: clamp(46px, 6vw, 76px) 0; }
.tt-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.tt-head h2 { font-size: clamp(22px, 3vw, 32px); }
.tt-head span { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-night-mute); }
.timetable > .rule > p { margin-top: 12px; max-width: 62ch; color: var(--on-night-soft); font-size: 15.5px; }
.sheet { margin-top: 26px; overflow-x: auto; border-radius: 12px; border: 1px solid var(--hair-night); }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.05); min-width: 560px; }
caption { text-align: left; padding: 14px 18px; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--on-night-mute); border-bottom: 1px solid var(--hair-night); }
th, td { text-align: left; padding: 13px 18px; font-size: 15px; border-bottom: 1px solid var(--hair-night); color: var(--on-night); }
thead th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--on-night-mute); font-weight: 500; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
td.who { font-family: var(--serif); font-weight: 600; font-size: 16.5px; }
.who-note { font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; opacity: .6; }
.bar { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--sky-hi), var(--sun)); }
/* Individual widths live in generated.css, written by build-pocket.mjs. */

/* ---------- flight-path spine ---------- */
.route-spine { position: relative; isolation: isolate; padding: clamp(52px, 6vw, 80px) 0; }
.route-spine::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(13,20,38,0) 0%, rgba(13,20,38,.88) 13%, rgba(13,20,38,.88) 87%, rgba(13,20,38,0) 100%);
}
.spine { position: relative; display: grid; grid-template-columns: 1fr 1fr; }
.spine::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: repeating-linear-gradient(180deg, var(--hair-night) 0 8px, transparent 8px 16px); }
.stop { position: relative; padding: 22px 0; }
.stop:nth-child(1) { grid-area: 1 / 1; }
.stop:nth-child(2) { grid-area: 2 / 2; }
.stop:nth-child(3) { grid-area: 3 / 1; }
.stop:nth-child(4) { grid-area: 4 / 2; }
.stop:nth-child(odd)  { text-align: right; padding-right: 46px; }
.stop:nth-child(even) { padding-left: 46px; }
.stop .pin {
  position: absolute; top: 24px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 16px;
  background: var(--paper); border: 1px solid var(--hair); box-shadow: 0 6px 18px -8px rgba(0,0,0,.35);
}
.stop:nth-child(odd) .pin { right: -18px; }
.stop:nth-child(even) .pin { left: -18px; }
@media (max-width: 720px) {
  .spine { grid-template-columns: 1fr; }
  .spine::before { left: 18px; }
  .stop, .stop:nth-child(odd), .stop:nth-child(even) { grid-area: auto; text-align: left; padding: 14px 0 14px 50px; }
  .stop:nth-child(odd) .pin, .stop:nth-child(even) .pin { left: 0; right: auto; }
}
.stop h3 { font-size: 20px; color: var(--on-night); }
.stop p { margin-top: 8px; color: var(--on-night-soft); font-size: 15px; }

/* ---------- passport spread ---------- */
.passport { padding: clamp(46px, 6vw, 76px) 0; }
.spread { background: var(--paper); border: 1px solid var(--hair); border-radius: 16px; padding: clamp(24px, 3vw, 38px); box-shadow: 0 26px 60px -34px rgba(27,32,48,.4); }
.spread h2 { font-size: clamp(22px, 3vw, 30px); }
.spread > p { margin-top: 12px; max-width: 60ch; color: var(--ink-soft); }
.stamps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 26px; }
.stamps > * { min-width: 0; }
.stamped { border: 2px dashed rgba(178,66,47,.42); border-radius: 10px; padding: 18px 18px 16px; transform: rotate(-.6deg); }
.stamps > :nth-child(even) .stamped { transform: rotate(.7deg); }
.stamped b { display: block; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--stamp); }
.stamped strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 17px; margin: 7px 0 6px; }
.stamped span { font-size: 14px; color: var(--ink-soft); }

/* ---------- filmstrip ---------- */
.strip-shots { padding: 0 0 clamp(46px, 6vw, 72px); }
.reel { display: flex; gap: 18px; overflow-x: auto; max-width: 1060px; margin: 0 auto; padding: 6px 24px 18px; scroll-snap-type: x mandatory; }
.reel > figure { flex: none; width: 210px; scroll-snap-align: center; margin: 0; }
.reel img { width: 100%; border-radius: 18px; border: 1px solid var(--hair); box-shadow: 0 20px 44px -26px rgba(27,32,48,.5); background: var(--card); }
.reel figcaption { margin-top: 10px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-mute); text-align: center; }

/* ---------- travel notes (FAQ) ---------- */
.notes { padding: 0 0 clamp(52px, 6vw, 84px); }
.notes h2 { font-size: clamp(22px, 3vw, 30px); }
.notes > .rule > p { margin-top: 12px; color: var(--ink-soft); max-width: 60ch; }
.notes dl { margin: 28px 0 0; display: grid; gap: 0; }
@media (min-width: 860px) { .notes dl { grid-template-columns: 1fr 1fr; column-gap: 44px; } }
.notes dt { font-family: var(--serif); font-weight: 600; font-size: 16.5px; padding-top: 18px; border-top: 1px solid var(--hair); }
.notes dd { margin: 7px 0 18px; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- ticket-stub footer ---------- */
.stub { border-top: 2px dashed var(--hair); padding: 30px 0 42px; }
.stub .rule { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between; }
.stub p { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; color: var(--ink-mute); }
.stub nav { display: flex; flex-wrap: wrap; gap: 18px; }
.stub a { font-size: 13.5px; color: var(--ink-soft); text-decoration: none; }
.stub a:hover { color: var(--sky-lo); }

/* ---------- legal ---------- */
.doc { padding: clamp(40px, 5vw, 64px) 0 clamp(52px, 6vw, 84px); }
.doc .rule { max-width: 720px; }
.doc h1 { font-size: clamp(27px, 4.2vw, 38px); }
.doc .filed { margin: 12px 0 30px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.doc h2 { font-size: 19px; margin: 34px 0 10px; color: var(--sky-lo); }
.doc p { margin: 0 0 14px; color: var(--ink-soft); font-size: 15.5px; }
.doc ul { margin: 0 0 14px; padding-left: 20px; color: var(--ink-soft); font-size: 15.5px; }
.doc li { margin-bottom: 7px; }
.doc strong { color: var(--ink); }
/* Legal pages are short: keep them on the daylight half of the gradient. */
body.paper { background: var(--day); }
body.paper .strip { background: var(--night); }
