/* ==========================================================================
   FlyHub: a household at fly scale
   Warm charcoal, off-white type, one honey accent. Fraunces for display,
   Figtree for reading. Mobile-first; breakpoints at 600, 760 and 960px.
   ========================================================================== */

/* ---------- Fonts (self-hosted, OFL) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --bg: #161310;          /* warm charcoal */
  --bg-2: #1e1a16;
  --bg-3: #29231d;
  --text: #f2ebdf;        /* warm off-white */
  --muted: #b5aa9a;       /* 7.9:1 on --bg */
  --faint: #938878;       /* 5.2:1 on --bg, small print only */
  --line: rgba(242, 235, 223, 0.14);
  --line-strong: rgba(242, 235, 223, 0.32);

  --honey: #e5a93c;       /* the one accent: primary actions */
  --honey-hover: #f0bd5c;
  --ink: #1a140c;

  --error: #ff9f8a;
  --ok: #b4d98f;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: 20px;
  --maxw: 1280px;
  --radius: 4px;
}
@media (min-width: 600px) { :root { --gutter: 32px; } }
@media (min-width: 960px) { :root { --gutter: 48px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--honey-hover); }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--honey); color: var(--ink); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -80px; z-index: 50;
  padding: 10px 16px;
  background: var(--honey); color: var(--ink);
  font-weight: 700; text-decoration: none; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section-title { font-size: clamp(2rem, 6.4vw, 3.5rem); max-width: 17ch; }

.capture-note {
  margin-top: 10px;
  color: var(--faint);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--honey);
  color: var(--ink);
  font: 700 1rem/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--honey-hover); color: var(--ink); }
.btn[disabled] { cursor: progress; opacity: 0.75; }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 0.9375rem; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text);
  font: 650 1.375rem/1 var(--display);
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 28px; height: 28px; color: var(--honey); }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: none;
  color: var(--text);
  font: 600 0.9375rem var(--body);
  cursor: pointer;
}
.site-nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.site-nav a:not(.btn) {
  display: inline-block;
  padding: 10px 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-nav a:not(.btn):hover { color: var(--text); }

/* Small screens: simple disclosure menu (only when JS is available) */
@media (max-width: 759px) {
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    display: none;
    padding: 8px var(--gutter) 20px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .js .site-nav a:not(.btn) { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.0625rem; color: var(--text); }
  .js .site-nav .btn { width: 100%; margin-top: 16px; min-height: 52px; }
  /* Without JS the links simply wrap under the logo */
  html:not(.js) .header-bar { flex-wrap: wrap; padding-block: 10px; }
}

/* ---------- Hero ---------- */
.hero { display: flex; flex-direction: column; }
.hero-media { order: -1; }
.hero-media .capture-note { padding-inline: var(--gutter); }
.hero-copy { padding: 28px var(--gutter) 56px; }

.platforms-line {
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hero h1 { font-size: clamp(2.375rem, 10.5vw, 4.75rem); line-height: 1.02; max-width: 12ch; }
.hero-lede { margin-top: 18px; max-width: 34ch; color: var(--muted); font-size: 1.125rem; }
.hero .waitlist { margin-top: 28px; }

/* Annotated capture: tags are placed in % of the image box */
.annotated { position: relative; }
.annotated img { width: 100%; }
.tag {
  position: absolute;
  left: var(--x); top: var(--y);
  width: 0; height: 0;
  pointer-events: none;
}
.tag::before {
  /* the point */
  content: "";
  position: absolute;
  left: -6px; top: -6px;
  width: 12px; height: 12px;
  border: 2px solid var(--honey);
  border-radius: 50%;
  background: rgba(22, 19, 16, 0.55);
}
.tag::after {
  /* leader line */
  content: "";
  position: absolute;
  left: -0.5px; bottom: 6px;
  width: 1px; height: 22px;
  background: var(--text);
  opacity: 0.85;
}
.tag > span {
  position: absolute;
  left: 0; bottom: 28px;
  transform: translateX(-50%);
  padding: 4px 9px 5px;
  border-radius: 2px;
  background: rgba(22, 19, 16, 0.88);
  color: var(--text);
  font: 600 0.8125rem/1.2 var(--body);
  white-space: nowrap;
}
/* label to the right instead of above */
.tag-right::after { left: 6px; bottom: auto; top: -0.5px; width: 22px; height: 1px; }
.tag-right > span { left: 28px; bottom: auto; top: -13px; transform: none; }

/* label below the point */
.tag-below::after { bottom: auto; top: 6px; }
.tag-below > span { bottom: auto; top: 28px; }

/* positions on the square mobile crop */
.tag-you   { --x: 54%;   --y: 59%; }
.tag-lunch { --x: 59.5%; --y: 25%; }
.tag-human { --x: 28%;   --y: 15%; }

/* small phones: "You" points from the side so it doesn't crowd "Lunch" */
@media (max-width: 599px) {
  .tag-you::after { left: 6px; bottom: auto; top: -0.5px; width: 22px; height: 1px; }
  .tag-you > span { left: 28px; bottom: auto; top: -13px; transform: none; }
}

/* positions on the wide crop (600px and up) */
@media (min-width: 600px) {
  .tag-you   { --x: 41%;   --y: 59%; }
  .tag-lunch { --x: 45.2%; --y: 25%; }
  .tag-human { --x: 23.2%; --y: 15%; }
  /* plenty of room above the crumbs on the wide crop */
  .tag-lunch.tag-below::after { top: auto; bottom: 6px; }
  .tag-lunch.tag-below > span { top: auto; bottom: 28px; }
}

@media (min-width: 960px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: center;
    gap: 56px;
    min-height: min(78vh, 760px);
    padding: 48px 0 72px max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  }
  .hero-media { order: 0; }
  .hero-media .capture-note { padding-inline: 0; }
  .hero-copy { padding: 0; }
  .hero h1 { font-size: clamp(3rem, 5.2vw, 4.75rem); }
}

/* ---------- Waitlist form ---------- */
.waitlist { max-width: 520px; }
.field-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9375rem; }
.field-row { display: flex; flex-direction: column; gap: 10px; }
.waitlist input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #100e0b;
  color: var(--text);
  font: 500 1rem var(--body); /* 16px avoids iOS zoom */
}
.waitlist input[type="email"]::placeholder { color: var(--faint); }
.waitlist input[type="email"]:hover { border-color: rgba(242, 235, 223, 0.5); }
.waitlist input[type="email"]:focus-visible { outline: 3px solid var(--text); outline-offset: 1px; border-color: var(--text); }
.waitlist input[aria-invalid="true"] { border-color: var(--error); }
@media (min-width: 600px) {
  .field-row { flex-direction: row; }
  .field-row input[type="email"] { flex: 1; }
}
.field-error { margin-top: 8px; color: var(--error); font-size: 0.9375rem; font-weight: 600; }
.field-error[hidden] { display: none; }
.form-note { margin-top: 10px; color: var(--faint); font-size: 0.875rem; }
.form-note a { color: var(--muted); }
.form-status:empty { display: none; }
.form-status { margin-top: 12px; padding-left: 12px; border-left: 3px solid var(--error); color: var(--text); font-size: 0.9375rem; }
.form-status a { color: var(--text); }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-done { max-width: 520px; padding-left: 16px; border-left: 3px solid var(--honey); }
.form-done:focus { outline: none; }
.form-done:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }
.form-done strong { display: block; font: 650 1.375rem/1.2 var(--display); }
.form-done p { margin-top: 4px; color: var(--muted); }

/* ---------- Gameplay ---------- */
.gameplay { padding: 88px 0 72px; border-top: 1px solid var(--line); }
.gameplay > .wrap:first-child { margin-bottom: 48px; }
.beat { display: grid; gap: 20px; margin-bottom: 72px; }
.beat-media img { width: 100%; border-radius: var(--radius); background: var(--bg-2); }
.beat-num { display: block; margin-bottom: 10px; color: var(--honey); font: 600 0.875rem/1 var(--body); letter-spacing: 0.12em; }
.beat-text h3 { font-size: clamp(1.625rem, 5.4vw, 2.375rem); max-width: 18ch; }
.beat-text p { margin-top: 12px; max-width: 40ch; color: var(--muted); font-size: 1.0625rem; }
.beat-split .beat-text { padding-inline: var(--gutter); }

.facts { display: grid; gap: 24px; padding-top: 8px; }
.facts li { padding-top: 14px; border-top: 1px solid var(--line-strong); }
.facts strong { display: block; font: 650 1.25rem/1.2 var(--display); }
.facts span { display: block; margin-top: 4px; color: var(--muted); font-size: 0.9375rem; }

@media (min-width: 600px) {
  .facts { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
@media (min-width: 960px) {
  .gameplay { padding: 128px 0 104px; }
  .gameplay > .wrap:first-child { margin-bottom: 64px; }
  .beat { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0 32px; margin-bottom: 120px; align-items: end; }

  /* 01: big scene, caption column on the right */
  .beat-wide .beat-media { grid-column: 1 / 9; }
  .beat-wide .beat-text { grid-column: 9 / 13; padding: 0 0 36px 8px; }

  /* 02: offset portrait detail */
  .beat-offset { align-items: center; }
  .beat-offset .beat-text { grid-column: 2 / 6; grid-row: 1; }
  .beat-offset .beat-media { grid-column: 7 / 12; grid-row: 1; margin-top: 56px; }

  /* 03: image bleeds to the left edge of the viewport */
  .beat-split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 56px;
    align-items: center;
    padding-right: max(var(--gutter), calc((100vw - var(--maxw)) / 2));
  }
  .beat-split .beat-media img { border-radius: 0 var(--radius) var(--radius) 0; }
  .beat-split .beat-media .capture-note { padding-left: var(--gutter); }
  .beat-split .beat-text { padding-inline: 0; }
}
@media (max-width: 959px) {
  .beat-split .beat-media img { border-radius: 0; }
  .beat-split .beat-media .capture-note { padding-inline: var(--gutter); }
}

/* ---------- Species ---------- */
.species { padding: 96px 0; background: var(--bg-2); border-block: 1px solid var(--line); }
.species-head { display: grid; gap: 14px; margin-bottom: 40px; }
.species-head p { max-width: 40ch; color: var(--muted); }

.roster-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.roster-tabs[hidden] { display: none; }
.roster-tabs button {
  position: relative;
  min-height: 64px;
  padding: 10px 6px 14px;
  border: 0;
  background: none;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.roster-tabs button::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  background: transparent;
}
.roster-tabs button[aria-selected="true"] { color: var(--text); }
.roster-tabs button[aria-selected="true"]::after { background: var(--honey); }
.roster-tabs button:hover { color: var(--text); }
.tab-name { display: block; font: 650 1.125rem/1.15 var(--display); }
.tab-role { display: block; margin-top: 4px; font-size: 0.8125rem; color: var(--faint); }

.specimen { display: grid; gap: 20px; }
.specimen + .specimen { margin-top: 56px; } /* stacked when JS is off */
.specimen[hidden] { display: none; }
.specimen-art img { width: 100%; border-radius: var(--radius); }
.specimen-role { color: var(--honey); font-weight: 700; font-size: 0.875rem; letter-spacing: 0.08em; text-transform: uppercase; }
.specimen-text h3 { margin-top: 8px; font-size: clamp(2rem, 7vw, 3rem); }
.specimen-text h3 em { display: block; margin-top: 6px; color: var(--faint); font: italic 400 1rem/1.3 var(--body); letter-spacing: 0; }
.specimen-text > p:not(.specimen-role) { margin-top: 16px; max-width: 38ch; color: var(--muted); font-size: 1.125rem; }
.traits { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; }
.traits li { position: relative; padding-left: 14px; font-weight: 600; font-size: 0.9375rem; }
.traits li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--honey); }

@media (min-width: 960px) {
  .species { padding: 128px 0; }
  .species-head { grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 56px; }
  .species-head p { justify-self: end; }
  .roster { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
  .roster-tabs {
    grid-template-columns: 1fr;
    align-content: start;
    margin: 0;
    border-bottom: 0;
    border-left: 1px solid var(--line);
  }
  .roster-tabs button { min-height: 88px; padding: 16px 0 16px 22px; }
  .roster-tabs button::after { left: -1px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .tab-name { font-size: 1.625rem; }
  .tab-role { font-size: 0.875rem; }
  .specimen { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 40px; align-items: end; }
  .no-tabs .roster { display: block; }
}

/* planned species: secondary, collapsed by default */
.planned { margin-top: 72px; border-top: 1px solid var(--line); }
.planned summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  padding: 20px 0;
  font: 650 1.25rem/1.2 var(--display);
  cursor: pointer;
  list-style: none;
}
.planned summary::-webkit-details-marker { display: none; }
.planned summary::before {
  content: "+";
  width: 1ch;
  color: var(--honey);
  font-family: var(--body);
  font-weight: 700;
}
.planned[open] summary::before { content: "\2212"; }
.planned summary span { color: var(--faint); font: 500 0.9375rem var(--body); }
.planned-note { margin-bottom: 20px; color: var(--muted); font-size: 0.9375rem; }
.planned-list { display: grid; gap: 14px; padding-bottom: 8px; }
.planned-list li { display: grid; grid-template-columns: 104px 1fr; gap: 4px 14px; align-items: center; }
.planned-list img { grid-row: span 2; width: 104px; border-radius: 2px; opacity: 0.9; }
.planned-list span { color: var(--muted); font-size: 0.9375rem; }
.planned-list strong { display: block; color: var(--text); font-size: 1rem; }
.planned-list em { color: var(--faint); font-style: normal; font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }
@media (min-width: 960px) {
  .planned-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }
  .planned-list li { grid-template-columns: 1fr; align-items: start; }
  .planned-list img { grid-row: auto; width: 100%; margin-bottom: 6px; }
}

/* ---------- Final waitlist ---------- */
.waitlist-section { padding: 96px 0 104px; }
.waitlist-grid { display: grid; gap: 32px; }
.waitlist-lede { margin-top: 16px; max-width: 44ch; color: var(--muted); font-size: 1.125rem; }
@media (min-width: 960px) {
  .waitlist-section { padding: 136px 0 144px; }
  .waitlist-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; align-items: end; }
}

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.875rem; }
.footer-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 32px; }
.footer-brand strong { margin-right: 8px; color: var(--text); font: 650 1.0625rem var(--display); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer-links a { color: var(--muted); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}

/* ==========================================================================
   Long-form pages (privacy, 404)
   ========================================================================== */
.page-main { padding-block: 48px 96px; }
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2.25rem, 8vw, 3.5rem); margin-bottom: 12px; }
.prose h2 { font-size: clamp(1.375rem, 4.6vw, 1.75rem); margin: 48px 0 14px; scroll-margin-top: 24px; }
.prose h3 { font: 700 1.125rem var(--body); letter-spacing: 0; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 1.3em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--honey); }
.prose .meta { color: var(--muted); }
.prose a { color: var(--text); }
.prose .callout { padding: 4px 0 4px 16px; border-left: 3px solid var(--honey); }
.prose .todo { padding: 1px 5px; border-radius: 2px; background: rgba(229, 169, 60, 0.16); color: var(--honey-hover); font-weight: 700; }
.table-wrap { overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--bg-2); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose .toc { padding: 18px 0; border-block: 1px solid var(--line); }
.prose .toc ol { margin: 8px 0 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }

.notfound { padding-block: 96px 140px; }
.notfound h1 { font-size: clamp(2.5rem, 10vw, 5rem); max-width: 12ch; }
.notfound p { margin: 18px 0 28px; max-width: 34ch; color: var(--muted); font-size: 1.125rem; }
