/* ==========================================================================
   FlyHub: a household at fly scale
   One system: warm charcoal, off-white type, one honey accent.
   Fraunces (display) + Figtree (body). Mobile-first; breakpoints 600 / 760 / 960.
   After editing this file, run `node tools/stamp-assets.mjs` (see README).
   ========================================================================== */

/* ---------- 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;

  /* colour */
  --bg: #161310;            /* deep warm charcoal */
  --band: #1b1814;          /* alternate section band */
  --surface: #221d18;       /* cards */
  --surface-2: #2a241e;     /* waitlist panel */
  --text: #f2ebdf;          /* warm off-white */
  --muted: #b8ad9d;         /* body copy on dark, >= 7:1 */
  --faint: #9a8f7f;         /* small print, >= 4.6:1 on every surface */
  --line: rgba(242, 235, 223, 0.12);
  --line-strong: rgba(242, 235, 223, 0.26);
  --field-border: #7a6f60;  /* >= 3:1 against the field background */
  --field-bg: #100e0b;

  --honey: #e8ad3d;         /* the one accent */
  --honey-hover: #f4c161;
  --ink: #1a140c;           /* text on honey */
  --error: #ff9f8a;

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

  /* spacing scale (px): 4 8 12 16 24 32 48 64 80 96 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 80px; --s10: 96px;

  /* layout */
  --maxw: 1200px;
  --gutter: 20px;
  --section: 56px;
  --radius: 10px;
  --radius-sm: 6px;
}
@media (min-width: 600px) { :root { --gutter: 32px; --section: 80px; } }
@media (min-width: 960px) { :root { --gutter: 44px; --section: 96px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--s4); }
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 { display: block; max-width: 100%; height: auto; }
svg { display: block; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h2 { font-size: clamp(2rem, 5.4vw, 3rem); }
p, figure, dl, dd { margin: 0; }
p { text-wrap: pretty; }
ul { margin: 0; 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: var(--s3) var(--s4);
  border-radius: var(--radius-sm);
  background: var(--honey); color: var(--ink);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: var(--s3); }

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

.eyebrow {
  margin-bottom: var(--s3);
  color: var(--honey);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.dev-note { margin-top: var(--s3); color: var(--faint); font-size: 0.8125rem; }

.frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.7);
}
.frame img { width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 var(--s5);
  border: 0;
  border-radius: var(--radius-sm);
  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 var(--s4); font-size: 0.9375rem; }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); }
.header-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  min-height: 64px;
  padding-block: var(--s2);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
/* sized here and by the width/height attributes, so it can never balloon */
.brand-mark { flex: none; width: 32px; height: 32px; color: var(--honey); }
.brand-name { font: 650 1.4375rem/1 var(--display); letter-spacing: -0.01em; }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0 var(--s4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  font: 600 0.9375rem var(--body);
  cursor: pointer;
}
.nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s6); margin: 0; padding: 0; list-style: none; }
.nav-link {
  display: inline-block;
  padding: var(--s2) 0;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}
.nav-link:hover { color: var(--text); }

@media (max-width: 759px) {
  .js .header-bar { flex-wrap: nowrap; }
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    padding: var(--s2) var(--gutter) var(--s5);
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.6);
  }
  .js .site-nav.is-open { display: block; }
  .js .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav-link { display: block; padding: var(--s4) 0; border-bottom: 1px solid var(--line); color: var(--text); font-size: 1.0625rem; }
  .js .site-nav .btn { width: 100%; margin-top: var(--s4); min-height: 52px; }
}
@media (min-width: 960px) {
  .header-bar { min-height: 76px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: var(--s6) var(--section); }
.hero-grid { display: grid; gap: var(--s5); }
.hero h1 { font-size: clamp(2.375rem, 10vw, 2.875rem); line-height: 1.1; max-width: 13ch; }
.mark {
  /* hand-drawn honey underline */
  padding-bottom: 0.08em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10' preserveAspectRatio='none'%3E%3Cpath d='M2 7c18-5 34-5 52-2s38 3 64-3' fill='none' stroke='%23e8ad3d' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") left 100% / 100% 0.16em no-repeat;
}
.hero .eyebrow { text-transform: none; letter-spacing: 0.02em; font-size: 0.875rem; }
.hero-lede { margin-top: var(--s4); max-width: 36ch; color: var(--muted); font-size: 1.125rem; }

/* annotations on the hero capture, placed in % of the image */
.tag { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; pointer-events: none; }
.tag::before {
  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 { content: ""; position: absolute; background: var(--text); opacity: 0.85; }
.tag > span {
  position: absolute;
  padding: 3px 8px 4px;
  border-radius: 3px;
  background: rgba(22, 19, 16, 0.9);
  color: var(--text);
  font: 600 0.8125rem/1.2 var(--body);
  white-space: nowrap;
}
.tag-you   { --x: 41%;   --y: 59%; }
.tag-lunch { --x: 45.2%; --y: 25%; }
.tag-human { --x: 23.2%; --y: 15%; }
/* label directions. On phones "You" points sideways so the three labels never overlap */
@media (max-width: 599px) {
  .tag-you::after   { left: 6px; top: -0.5px; width: 18px; height: 1px; }
  .tag-you > span   { left: 24px; top: -12px; }
}
@media (min-width: 600px) {
  .tag-you::after   { left: -0.5px; bottom: 6px; width: 1px; height: 18px; }
  .tag-you > span   { left: 0; bottom: 24px; transform: translateX(-50%); }
}
.tag-lunch::after { left: -0.5px; top: 6px; width: 1px; height: 18px; }
.tag-lunch > span { left: 0; top: 24px; transform: translateX(-50%); }
.tag-human::after { left: 6px; top: -0.5px; width: 18px; height: 1px; }
.tag-human > span { left: 24px; top: -12px; }

@media (min-width: 600px) {
  .hero { padding-top: var(--s7); }
  .hero h1 { font-size: clamp(2.75rem, 6.4vw, 3.5rem); }
}
@media (min-width: 960px) {
  .hero { padding-block: var(--s8) var(--s9); }
  .hero-grid {
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    grid-template-areas: "intro media" "form media";
    grid-template-rows: auto 1fr;
    gap: var(--s6) var(--s8);
    align-items: start;
  }
  .hero-intro { grid-area: intro; align-self: end; }
  .hero-media { grid-area: media; align-self: center; }
  .hero-form  { grid-area: form; }
  .hero h1 { font-size: clamp(3rem, 4.4vw, 4rem); }
}

/* ---------- Waitlist form ---------- */
.waitlist { max-width: 540px; }
.field-label { display: block; margin-bottom: var(--s2); font-size: 0.9375rem; font-weight: 600; }
.field-row { display: flex; flex-direction: column; gap: var(--s3); }
.waitlist input[type="email"] {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--s4);
  border: 1.5px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--text);
  font: 500 1rem var(--body); /* 16px: no iOS zoom on focus */
}
.waitlist input[type="email"]::placeholder { color: var(--faint); }
.waitlist input[type="email"]:hover { border-color: var(--muted); }
.waitlist input[type="email"]:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; border-color: var(--honey); }
.waitlist input[aria-invalid="true"] { border-color: var(--error); }
@media (min-width: 600px) {
  .field-row { flex-direction: row; gap: var(--s2); }
  .field-row input[type="email"] { flex: 1; }
}
.field-error { margin-top: var(--s2); color: var(--error); font-size: 0.9375rem; font-weight: 600; }
.field-error[hidden] { display: none; }
.form-note { margin-top: var(--s3); color: var(--faint); font-size: 0.875rem; }
.form-note a { color: var(--muted); }
.form-status:empty { display: none; }
.form-status {
  margin-top: var(--s3);
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--error);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: rgba(255, 159, 138, 0.08);
  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: 540px;
  padding: var(--s4) var(--s5);
  border: 1px solid rgba(232, 173, 61, 0.45);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: rgba(232, 173, 61, 0.08);
}
.form-done:focus { outline: none; }
.form-done:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.form-done strong { display: block; font: 650 1.375rem/1.2 var(--display); }
.form-done p { margin-top: var(--s1); color: var(--muted); }

/* ---------- Section heads ---------- */
.section-head { margin-bottom: var(--s6); }
.section-head h2 { max-width: 20ch; }
.section-head-split > p { margin-top: var(--s4); max-width: 44ch; color: var(--muted); }
@media (min-width: 960px) {
  .section-head { margin-bottom: var(--s7); }
  .section-head-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); align-items: end; }
  .section-head-split > p { margin-top: 0; }
}

/* ---------- Gameplay ---------- */
.gameplay { border-top: 1px solid var(--line); }
.play-grid { display: grid; gap: var(--s6); }
.play-num { margin: var(--s4) 0 var(--s2); color: var(--honey); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.play-main-text .play-num { margin-top: 0; }
.play-grid h3 { font-size: 1.5rem; max-width: 20ch; }
.play-grid h3 + p { margin-top: var(--s2); max-width: 42ch; color: var(--muted); }
.play-main-text h3 { font-size: clamp(1.625rem, 4vw, 2rem); }
.play-main-text { margin-top: calc(-1 * var(--s3)); }

.facts { padding: var(--s5); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.facts-title { margin-bottom: var(--s3); font: 650 1.25rem/1.2 var(--display); }
.facts dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--s4); padding-block: var(--s3); border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font-size: 0.9375rem; }
.facts dd { font-size: 0.9375rem; font-weight: 600; }
.gameplay .dev-note { margin-top: var(--s5); }

@media (min-width: 600px) and (max-width: 959px) {
  .play-grid { grid-template-columns: 1fr 1fr; column-gap: var(--s5); }
  .play-main, .play-main-text, .facts { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .play-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--s7) var(--s6);
    align-items: start;
  }
  .play-main      { grid-column: 1 / 9; grid-row: 1; }
  .play-main-text { grid-column: 9 / 13; grid-row: 1; align-self: center; margin: 0; }
  .play-card:nth-of-type(1) { grid-column: 1 / 5; grid-row: 2; }
  .play-card:nth-of-type(2) { grid-column: 5 / 9; grid-row: 2; }
  .facts          { grid-column: 9 / 13; grid-row: 2; }
}

/* ---------- Species ---------- */
.species { background: var(--band); border-block: 1px solid var(--line); }
.species-list { display: grid; gap: var(--s5); }
.species-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.species-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--line); }
.species-body { padding: var(--s5); }
.species-role { color: var(--honey); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.species-body h3 { margin-top: var(--s2); font-size: 1.75rem; }
.species-body h3 + p { margin-top: var(--s3); color: var(--muted); }
@media (min-width: 760px) {
  .species-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
  .species-body { padding: var(--s4) var(--s4) var(--s5); }
  .species-body h3 { font-size: 1.5rem; }
}
@media (min-width: 960px) {
  .species-list { gap: var(--s5); }
  .species-body { padding: var(--s5) var(--s5) var(--s6); }
  .species-body h3 { font-size: 1.75rem; }
}

.planned { margin-top: var(--s7); border-top: 1px solid var(--line); }
.planned summary {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4);
  padding-block: var(--s5);
  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: 700 1.25rem/1 var(--body); }
.planned[open] summary::before { content: "\2212"; }
.planned summary span { color: var(--faint); font: 500 0.9375rem var(--body); }
.planned-note { margin-bottom: var(--s5); color: var(--muted); font-size: 0.9375rem; }
.planned-list { display: grid; gap: var(--s4); }
.planned-list li { display: grid; grid-template-columns: 104px 1fr; gap: var(--s1) var(--s4); align-items: center; }
.planned-list img { grid-row: span 2; width: 104px; border-radius: var(--radius-sm); }
.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-size: 0.8125rem; font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; }
@media (min-width: 960px) {
  .planned-list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s5); }
  .planned-list li { grid-template-columns: 1fr; align-items: start; }
  .planned-list img { grid-row: auto; width: 100%; margin-bottom: var(--s2); }
}

/* ---------- Final waitlist ---------- */
.waitlist-panel {
  display: grid;
  gap: var(--s6);
  padding: var(--s6) var(--s5);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-2);
}
.waitlist-copy h2 { max-width: 14ch; }
.waitlist-copy > p:last-child { margin-top: var(--s4); max-width: 46ch; color: var(--muted); font-size: 1.0625rem; }
@media (min-width: 600px) {
  .waitlist-panel { padding: var(--s7); }
}
@media (min-width: 960px) {
  .waitlist-panel { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s8); align-items: center; padding: var(--s8); }
}

/* ---------- Footer ---------- */
.site-footer { padding-block: var(--s6) var(--s7); 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: var(--s3) var(--s6); }
.footer-brand strong { margin-right: var(--s2); color: var(--text); font: 650 1.0625rem var(--display); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.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: var(--s7) var(--s10); }
.prose > * { max-width: 760px; }  /* text column, left-aligned with the header */
.prose h1 { font-size: clamp(2.25rem, 8vw, 3.25rem); margin-bottom: var(--s3); }
.prose h2 { font-size: clamp(1.375rem, 4.6vw, 1.75rem); margin: var(--s7) 0 var(--s3); scroll-margin-top: var(--s5); }
.prose h3 { margin: var(--s5) 0 var(--s2); font: 700 1.125rem var(--body); letter-spacing: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--s4); }
.prose ul, .prose ol { padding-left: 1.3em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--honey); }
.prose .meta { color: var(--muted); }
.prose .callout { padding: var(--s1) 0 var(--s1) var(--s4); border-left: 3px solid var(--honey); }
.prose .todo { padding: 1px 5px; border-radius: 3px; background: rgba(232, 173, 61, 0.16); color: var(--honey-hover); font-weight: 700; }
.table-wrap { overflow-x: auto; margin-bottom: var(--s4); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.9375rem; }
.prose th, .prose td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface); font-weight: 700; }
.prose tr:last-child td { border-bottom: 0; }
.prose .toc { padding-block: var(--s4); border-block: 1px solid var(--line); }
.prose .toc ol { margin: var(--s2) 0 0; }
.prose hr { margin: var(--s8) 0; border: 0; border-top: 1px solid var(--line); }

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