/* Fonts are self-hosted (SIL Open Font License, see fonts/OFL-*.txt), from @fontsource 5.3.0, Latin subset. */
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Pixelify Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/pixelify-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/silkscreen-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Silkscreen"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/silkscreen-latin-700-normal.woff2") format("woff2"); }

:root {
  --night: #2b1d33;
  --band: #231829;
  --plum: #3a2742;
  --line: #4a3a52;
  --stage: #2d2a4c;
  /* Phone hero: 170vw + 100px, plus the 40 extra planet rows of the tall art (data-rows 300 instead of 260)
     at its whole-pixel scale, ceil(width / 130). The first value is a fallback for browsers without round(). */
  --hero-narrow: calc(170vw + 100px + 31vw);
  --cream: #fbf3ec;
  --peach: #f3c9b4;
  --salmon: #ebbdb3;
  --coral: #e0775c;
  --coral-light: #e88a70;
  --muted: #c9b3c2;
  --placeholder: #6b5870;
  --ink-shadow: #1d1a22;
  --pill-air: #d67d62;
  --pill-scheduled: #bea6d2;
  --card-shadow: rgba(43, 29, 51, 0.35);
  --btn-shadow: rgba(43, 29, 51, 0.4);
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-pixel: "Pixelify Sans", sans-serif;
  --font-label: "Silkscreen", monospace;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-variant-ligatures: none;
  background: var(--night);
  color: var(--cream);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--peach); }
a:hover { color: var(--coral); }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
input::placeholder { color: var(--placeholder); }
* { font-variant-ligatures: none !important; font-feature-settings: "liga" 0, "clig" 0 !important; }
[hidden] { display: none !important; }
noscript { display: block; padding: 24px; color: var(--cream); background: var(--night); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.page { position: relative; min-height: 100vh; overflow-x: hidden; background: var(--night); }

/* Shared pieces */
.card {
  background: var(--plum); color: var(--cream); border: 2px solid var(--line);
  border-radius: 28px; box-shadow: 0 10px 0 var(--card-shadow);
}
.h2 {
  margin: 0; font: 600 clamp(30px, 4.4vw, 52px)/1.06 var(--font-pixel); color: var(--cream); text-wrap: balance;
}
.label { font: 400 12px var(--font-label); letter-spacing: 0.08em; color: var(--peach); }
.band { background: var(--band); padding: clamp(56px, 9vw, 96px) clamp(16px, 4vw, 24px); }

/* Hero over the wide picture */
.stage { position: relative; overflow: hidden; background: var(--stage); }
.stage-art {
  position: absolute; inset: 0; pointer-events: none;
}
.art-wide, .art-tall { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; }
.art-tall { display: none; }
.cv-keyart { display: block; flex: none; }
.hero { position: relative; }
.hero-spacer { height: clamp(420px, 48.8vw, 720px); }
.hero-layer { position: absolute; inset: 0; display: flex; flex-direction: column; }
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  max-width: 1180px; width: 100%; margin: 0 auto; padding: 16px clamp(16px, 4vw, 24px); box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand-name { font: 600 26px var(--font-pixel); color: var(--cream); }
a.nav-cta, a.nav-cta:hover {
  font: 700 15px var(--font-body); color: var(--night); text-decoration: none; padding: 10px 16px; white-space: nowrap;
  border-radius: 12px; border: 3px solid var(--night); background-color: var(--coral); box-shadow: 0 3px 0 var(--btn-shadow);
}
a.nav-cta:hover { background-color: var(--coral-light); }
.hero-text {
  flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: calc(4vh + 80px) clamp(16px, 4vw, 24px) clamp(48px, 10vw, 120px); box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; gap: 14px; text-align: left;
}
.hero-title {
  margin: 0; max-width: 760px; font: 600 clamp(30px, 7vw, 92px)/0.98 var(--font-pixel); color: var(--cream);
  text-shadow: 0 5px 0 var(--ink-shadow); text-wrap: balance;
}
.hero-subtitle {
  margin: 0; max-width: 560px; font: 600 clamp(20px, 2.6vw, 30px)/1.2 var(--font-pixel); color: var(--salmon);
  text-shadow: 0 3px 0 var(--ink-shadow);
}

/* Departures board */
.board-section { position: relative; padding: clamp(40px, 7vw, 72px) clamp(12px, 3vw, 24px) clamp(64px, 10vw, 120px); }
.board {
  max-width: 1100px; margin: 0 auto; padding: clamp(18px, 3vw, 32px); box-sizing: border-box;
  display: flex; flex-direction: column; gap: 18px;
}
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.board-title { margin: 0; font: 600 clamp(26px, 3.2vw, 36px)/1.1 var(--font-pixel); }
.board-list { display: flex; flex-direction: column; gap: 8px; list-style: none; margin: 0; padding: 0; }
.board-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; background: var(--night);
  border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px;
}
.board-who { flex: 1 1 220px; min-width: 0; display: flex; align-items: center; gap: 12px; }
.board-sprite { display: flex; flex: none; }
.cv-board { width: 36px; height: 46px; display: block; }
.board-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.board-name-main { font: 600 20px var(--font-pixel); }
.board-place { font-size: 14px; color: var(--muted); }
.board-times { display: flex; gap: 20px; flex: 1 1 220px; }
.board-time-box { display: flex; flex-direction: column; gap: 2px; }
.board-time-label { font: 400 11px var(--font-label); letter-spacing: 0.08em; color: var(--peach); }
.board-time { font: 600 22px var(--font-pixel); }
.board-time-you { color: var(--muted); }
.board-body { margin: 0; font-size: 18px; line-height: 1.55; color: var(--muted); max-width: 680px; text-wrap: pretty; }
.pill { flex: none; font: 700 14px var(--font-body); border: 2px solid var(--night); padding: 5px 12px; border-radius: 999px; }
.pill-air { color: var(--night); background: var(--pill-air); }
.pill-scheduled { color: var(--night); background: var(--pill-scheduled); }
.pill-asleep { color: var(--cream); background: var(--line); }
.pill-offduty { color: var(--night); background: var(--salmon); }

/* Crew card */
.crew {
  max-width: 1100px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); box-sizing: border-box; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 36px; align-items: center;
}
.crew-title { font-size: clamp(34px, 5vw, 60px); line-height: 1.02; }
.crew-tiles { display: flex; flex-direction: column; gap: 14px; }
.look-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.look-tile {
  aspect-ratio: 4 / 5; border-radius: 16px; background: var(--night); border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.cv-look { width: 72px; height: 92px; display: block; }

/* How it works */
.how { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.step-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.step { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.cv-step {
  width: 100%; aspect-ratio: 1 / 1; border-radius: 16px; border: 3px solid var(--night); box-sizing: border-box; display: block;
}
.step-row { display: flex; gap: 12px; align-items: baseline; }
.step-code { font: 600 26px var(--font-pixel); color: var(--coral); }
.step-text { display: flex; flex-direction: column; gap: 6px; }
.step-title { margin: 0; font: 600 24px/1.15 var(--font-pixel); }
.step-body { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }

/* Moments */
.moments { background: var(--night); padding: clamp(56px, 9vw, 96px) 0; }
.moments-head {
  max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px) 28px; box-sizing: border-box;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap;
}
.moments-title { display: flex; flex-direction: column; gap: 12px; max-width: 600px; }
.moments-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.moments-side { font-size: 17px; color: var(--cream); max-width: 380px; line-height: 1.55; }
.moments-nav { display: flex; gap: 10px; }
.moments-btn {
  width: 48px; height: 48px; border-radius: 14px; border: 2px solid var(--line); background: var(--plum);
  color: var(--peach); font: 600 22px var(--font-pixel); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.moments-btn:hover { background: var(--coral); border-color: var(--coral); color: var(--night); }
.moments-btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.moment-strip {
  --strip-pad: max(24px, calc((100% - 1052px) / 2));
  display: flex; gap: 16px; overflow-x: auto; padding: 4px var(--strip-pad) 24px; scroll-padding-left: var(--strip-pad);
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--coral) var(--plum);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}
@media (prefers-reduced-motion: reduce) { .moment-strip { scroll-behavior: auto; } }
.moment-strip:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.moment {
  flex: 0 0 220px; scroll-snap-align: start; border-radius: 22px; padding: 10px 10px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.cv-moment { width: 100%; aspect-ratio: 1 / 1; border-radius: 14px; display: block; }
.moment-label { font: 600 20px var(--font-pixel); padding: 0 4px; }

/* Privacy */
.privacy {
  max-width: 1100px; margin: 0 auto; padding: clamp(24px, 4vw, 48px); box-sizing: border-box; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 36px;
}
.privacy-intro { display: flex; flex-direction: column; gap: 14px; }
.privacy-lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); }
.privacy-items { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; }
.privacy-item { display: flex; gap: 16px; padding: 16px 0; border-top: 2px solid var(--line); }
.privacy-dot { width: 10px; height: 10px; background: var(--coral); margin-top: 8px; flex: none; }
.privacy-item-text { display: flex; flex-direction: column; gap: 4px; }
.privacy-item-title { margin: 0; font: 600 22px/1.15 var(--font-pixel); }
.privacy-item-body { font-size: 16px; line-height: 1.55; color: var(--muted); }
.waitlist-panel {
  grid-column: 1 / -1; background: var(--night); border: 2px solid var(--line); border-radius: 18px;
  padding: 24px 26px; display: flex; flex-direction: column; gap: 10px;
}
.privacy-para { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 720px; }

/* FAQ */
.faq { background: var(--night); padding: clamp(56px, 9vw, 96px) clamp(16px, 4vw, 24px); }
.faq-inner { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--plum); border: 2px solid var(--line); border-radius: 18px; box-shadow: 0 5px 0 rgba(43, 29, 51, 0.3);
}
.faq-q {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px;
  cursor: pointer; text-align: left; font: 700 18px var(--font-body); color: var(--cream); list-style: none; border-radius: 16px;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: "+"; content: "+" / ""; font: 600 22px var(--font-pixel); color: var(--coral); flex: none; }
.faq-item[open] > .faq-q::after { content: "\2212"; content: "\2212" / ""; }
.faq-q:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.faq-a { margin: 0; padding: 0 20px 20px; font-size: 16px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }

/* Join */
.join { background: var(--night); }
.join-inner {
  max-width: 1100px; margin: 0 auto; padding: clamp(56px, 9vw, 96px) clamp(16px, 4vw, 24px); box-sizing: border-box;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 48px;
}
.cv-join { width: 238px; height: 238px; border-radius: 28px; border: 6px solid var(--ink-shadow); box-sizing: border-box; flex: none; }
.join-right { flex: 0 1 560px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.join-title { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.05; }
.join-body { margin: 0; font-size: 20px; line-height: 1.6; color: var(--peach); }

/* Waitlist form */
.waitlist { display: flex; flex-direction: column; gap: 14px; width: 100%; }
.waitlist-form { display: flex; gap: 14px; flex-wrap: wrap; }
.field {
  flex: 1 1 240px; height: 64px; border-radius: 999px; border: 0; background: var(--cream); color: var(--night);
  font: 20px var(--font-body); padding: 0 26px; outline: none; box-sizing: border-box; min-width: 0;
}
.field:focus { box-shadow: 0 0 0 3px var(--coral); }
.field:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.btn {
  height: 64px; padding: 0 30px; border-radius: 999px; border: 0; background: var(--pill-air); color: var(--night);
  font: 700 20px var(--font-body); cursor: pointer;
}
.btn:hover { background: var(--coral); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
.btn:disabled, .waitlist-form[aria-busy="true"] .btn { cursor: progress; opacity: 0.7; transform: none; }
.form-status { margin: 0; font-size: 15px; color: var(--cream); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--peach); font-weight: 700; }
.form-privacy { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.form-success { background: var(--plum); color: var(--cream); border-radius: 18px; padding: 16px 20px; font-size: 17px; line-height: 1.45; }

/* Footer */
.site-footer { background: var(--band); }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 28px 24px; border-top: 2px solid var(--line); box-sizing: border-box;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted);
}
.footer-brand { font: 600 18px var(--font-pixel); color: var(--cream); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
a.footer-link, a.footer-link:hover { color: var(--muted); }
a.footer-link:hover { color: var(--cream); }

/* Back to top: fixed bottom right, hidden until the hero has scrolled away (motion.js adds .is-visible) */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  font: 600 26px var(--font-pixel); color: var(--night); text-decoration: none;
  background: var(--coral); border: 3px solid var(--night); border-radius: 14px; box-shadow: 0 3px 0 rgba(43, 29, 51, 0.4);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
a.to-top:hover { color: var(--night); background: var(--coral-light); }
.to-top:focus-visible { outline: 3px solid var(--cream); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; transform: none; } }

@supports (width: round(up, 1px, 1px)) {
  :root { --hero-narrow: calc(170vw + 100px + 40 * round(up, calc(100vw / 130), 1px)); }
}

/* Narrow screens: the tall key art, a taller hero and top-aligned text */
@media (max-width: 639px) {
  .art-wide { display: none; }
  /* The tall art is pinned to the bottom of the hero, so the planet's curve always shows just above the board;
     empty top sky is cropped instead. Its own sky still runs behind the header, so there is no seam. */
  .art-tall { display: flex; bottom: auto; height: var(--hero-narrow); align-items: flex-end; overflow: hidden; }
  .hero-spacer { height: var(--hero-narrow); }
  .hero-text { justify-content: flex-start; }
}
