/* 1000 DAYS: THE GAME · public beta page.
   Tokens from the game (game/src/ui/ui.css): steel plates with rivets and cut corners, gold only for light,
   selection and the main button, amber for warnings with a sign. No red anywhere in the interface:
   red belongs to the infected. Surfaces are flat; depth comes from tone steps and bevel edges. */

@font-face {
  font-family: 'Saira Stencil One';
  src: url('../fonts/saira-stencil-one-400-latin.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
  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: 'Montserrat';
  src: url('../fonts/montserrat-var-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  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: 'Caveat';
  src: url('../fonts/caveat-700-latin.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
  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;
}

:root {
  /* steel and paper, from the game */
  --steel-1: #4b5159; --steel-2: #3a3f46; --steel-3: #2a2e33; --steel-4: #1d2024;
  --steel-edge: #6b727b; --rivet: #8d959e; --rivet-dark: #2b2f34;
  --ink: #1b1714; --paper: #efe6d2; --paper-2: #e2d6bb; --note: #f7f1e1; --note-ink: #2a241f; --print: #ebe9e4;
  --text: #eef0f2; --text-dim: #aab1b9; --title-white: #f4efe4;
  --gold: #e8b64a; --amber: #e08a1e; --ok: #8fc06a; --night: #15181d;
  --water: #7fb6d6; --food: #b8c77a; --scrap: #c9b48f; --power: #f3d27a;
  /* day: a cool, light ground with steel ink (no warm cream as a surface) */
  --day: #e3e8ed; --day-2: #d5dce3; --day-ink: #1d2024; --day-soft: #3a3f46;
  /* fence and yard at night */
  --wood: #6b5137; --wood-dark: #4a3827; --yard: #1b211c; --yard-far: #171c19;
  --glass-off: #3a3f46; --glass-on: #fff2c2;
  --light: rgba(243, 210, 122, 0.15); --light-pool: rgba(243, 210, 122, 0.24);
  /* the bunker in cross-section (day section): grass, earth, concrete, the rooms' walls */
  --grass: #86a656; --earth: #4b3a2c; --concrete: #2c3035; --room: #e5e1d7;

  --cut: 9px;
  --dur-s: 120ms; --dur-m: 240ms; --dur-l: 420ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);

  --font-title: 'Saira Stencil One', 'Montserrat', system-ui, sans-serif;
  --font-ui: 'Montserrat', system-ui, sans-serif;
  --font-hand: 'Caveat', 'Comic Sans MS', cursive;

  /* five working sizes plus the monument and the hand */
  --fs-h1: clamp(56px, 10.2vw, 152px);
  --fs-h1b: clamp(18px, 3vw, 45px);
  --fs-h2: clamp(34px, 4.3vw, 64px);
  --fs-hand: clamp(28px, 2.6vw, 38px);
  --fs-h3: clamp(21px, 1.85vw, 27px);
  --fs-lead: clamp(18px, 1.45vw, 21px);
  --fs-body: clamp(17px, 1.25vw, 18px);
  --fs-small: 15px;

  --m: clamp(20px, 2.3vw, 32px);
  --gap: clamp(16px, 1.7vw, 24px);
  --sec: clamp(88px, 9.4vw, 136px);

  --cut-shape: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));

  color-scheme: dark;
  scrollbar-color: var(--steel-1) var(--night);
  accent-color: var(--gold);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--night); color: var(--text);
  font-family: var(--font-ui); font-weight: 500; font-size: var(--fs-body); line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p, dd, li { text-wrap: pretty; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.day :focus-visible, .legal :focus-visible { outline-color: var(--day-ink); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hand { font-family: var(--font-hand); font-weight: 700; }
.nowrap { white-space: nowrap; }

.skip {
  position: absolute; left: var(--m); top: 8px; z-index: 50; padding: 10px 14px;
  background: var(--gold); color: var(--ink); font-weight: 800; text-decoration: none;
  transform: translateY(-160%); transition: transform var(--dur-m) var(--ease-out);
}
.skip:focus { transform: none; }

.wrap { width: min(100% - 2 * var(--m), 1680px); margin-inline: auto; }

/* section grounds: night and day alternate */
.night { background: var(--night); color: var(--text); --soft: var(--text-dim); }
.day { background: var(--day); color: var(--day-ink); --soft: var(--day-soft); color-scheme: light; }
.day--2 { background: var(--day-2); }

h2 {
  font-family: var(--font-title); font-weight: 400; font-size: var(--fs-h2);
  line-height: 1; letter-spacing: 0.01em;
}
h3 { font-size: var(--fs-h3); font-weight: 800; line-height: 1.2; letter-spacing: -0.005em; }

/* ---------- steel: plates and buttons ---------- */
.plate {
  position: relative; color: var(--text);
  background-color: var(--steel-3);
  clip-path: var(--cut-shape);
  /* the bevel of a steel plate: a lit top edge, a dark lower edge */
  border-style: solid; border-width: 2px 2px 3px; border-color: #4a5058 #22262a #121416 #33383e;
}

/* rivets: four real dots on a plate */
.rivets i { position: absolute; z-index: 1; width: 10px; height: 10px; border-radius: 50%; background: var(--rivet); border: 2px solid var(--rivet-dark); pointer-events: none; }
.rivets i::after { content: ''; position: absolute; left: 1px; top: 1px; width: 3px; height: 3px; border-radius: 50%; background: #c3c9cf; }
.rivets i:nth-child(1) { left: 9px; top: 9px; }
.rivets i:nth-child(2) { right: 9px; top: 9px; }
.rivets i:nth-child(3) { left: 9px; bottom: 10px; }
.rivets i:nth-child(4) { right: 9px; bottom: 10px; }

.btn {
  --cut: 7px; --rv: 5px; --rv-x: 7px; --rv-y: 5px; --rv-dy: 24px; --rv-c: var(--rivet);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  height: 44px; min-height: 44px; padding: 0 1.45em; margin: 0;
  border: 0; border-top: 2px solid #5d646d; border-bottom: 3px solid #15171a;
  font-family: var(--font-ui); font-weight: 900; font-size: var(--fs-small); line-height: 1.1; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  color: var(--text); background-color: var(--steel-2);
  clip-path: var(--cut-shape);
  transition: transform var(--dur-s) var(--ease-out), background-color var(--dur-s) var(--ease-out), filter var(--dur-s) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active, .btn.is-pressed { transform: translateY(1px) scale(0.97); filter: brightness(0.92); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background-color: var(--steel-1); } }
.btn-bolt { width: 1.25em; height: 1.25em; flex: none; fill: var(--gold); }
/* clip-path cuts an outline off, so the focus ring sits inside the plate */
/* two rivets per side: a dot and its copy one button-height lower (the button height is fixed) */
.btn::before, .btn::after {
  content: ''; position: absolute; top: var(--rv-y); width: var(--rv); height: var(--rv); border-radius: 50%;
  background: var(--rv-c); pointer-events: none;
  box-shadow: 0 var(--rv-dy) 0 0 var(--rv-c); /* taste-skill-ignore: the copy is the lower rivet, drawn, not a shadow */
}
.btn::before { left: var(--rv-x); }
.btn::after { right: var(--rv-x); }
/* clip-path cuts an outer outline off, so the focus ring sits inside the plate */
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; background-color: var(--steel-1); }

.btn--gold {
  --rv-c: #a87a22;
  color: var(--ink); background-color: var(--gold);
  border-top-color: #f6d683; border-bottom-color: #9a6f1c;
}
@media (hover: hover) and (pointer: fine) { .btn--gold:hover { background-color: #f0c463; } }
.btn--gold:focus-visible { background-color: #f0c463; outline-color: var(--ink); }
.btn--big {
  --cut: 9px; --rv: 7px; --rv-x: 10px; --rv-y: 7px; --rv-dy: 34px;
  width: 100%; min-height: 60px; height: 60px; padding: 0.4em 1.6em;
  font-family: var(--font-title); font-weight: 400; font-size: var(--fs-h3); letter-spacing: 0.08em;
}
.btn[disabled] { cursor: default; opacity: 0.6; transform: none; }

.lampdot { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #16181b; }

/* ---------- header and footer (all public pages) ---------- */
.site-head {
  position: relative; z-index: 3;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px;
  width: min(100% - 2 * var(--m), 1680px); margin-inline: auto;
  padding-block: clamp(16px, 2vw, 26px);
}
.wordmark {
  font-family: var(--font-title); font-weight: 400; font-size: clamp(17px, 1.5vw, 21px);
  letter-spacing: 0.04em; line-height: 1.1; color: var(--text); text-decoration: none; white-space: nowrap;
}
.wordmark:hover { color: #fff; }
.site-head .btn { flex: none; }

.site-foot {
  position: relative;
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "nav c" "mark mark";
  gap: clamp(56px, 9vw, 140px) 24px; align-items: baseline;
  padding: clamp(40px, 5vw, 64px) var(--m) clamp(26px, 3vw, 40px);
  background-color: var(--steel-4); color: var(--text);
  border-top: 2px solid var(--steel-3);
}
.site-foot nav { grid-area: nav; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.site-foot nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-weight: 700; font-size: var(--fs-body); color: var(--text);
  text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color var(--dur-m) ease, color var(--dur-m) ease;
}
@media (hover: hover) and (pointer: fine) { .site-foot nav a:hover { text-decoration-color: var(--gold); } }
.wordmark-big {
  grid-area: mark; display: block; font-size: 8.4vw; line-height: 0.92; letter-spacing: 0.005em;
  white-space: normal;
}
.foot-c { grid-area: c; font-size: var(--fs-small); color: var(--text-dim); }

/* ---------- pencil notes and prints ---------- */
.note {
  position: absolute; z-index: 2; display: inline-block;
  padding: 0.3em 0.75em 0.34em;
  font-family: var(--font-hand); font-weight: 700; font-size: var(--fs-lead); line-height: 1;
  color: var(--note-ink); background: var(--note); border-bottom: 3px solid #d8caa6;
  white-space: nowrap; rotate: -4deg;
}
.note::before {
  content: ''; position: absolute; left: 50%; top: -6px; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: #c9cfd4; border: 2px solid #868e97;
}

.print { position: relative; margin: 0; padding: clamp(5px, 0.55vw, 8px); background: var(--print); }
.print img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; background: var(--steel-4); }
.print figcaption { display: block; }

/* ---------- hero (night) ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(8px, 1.6vw, 24px) 0 var(--sec); }
.hero-cone { position: absolute; z-index: 0; top: -40px; left: -6%; width: 64%; height: calc(100% + 40px); pointer-events: none; }
.hero-cone::before, .hero-cone span { content: ''; position: absolute; inset: 0; }
.hero-cone::before { background: rgba(255, 226, 150, 0.05); clip-path: polygon(34% 0, 50% 0, 100% 100%, 0 100%); }
.hero-cone span { background: rgba(255, 226, 150, 0.04); clip-path: polygon(38% 0, 46% 0, 78% 100%, 16% 100%); }
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: start;
}
.hero-left { grid-column: 1 / span 7; min-width: 0; }
.hero-copy { padding-top: clamp(8px, 2.4vw, 40px); }
.lockup {
  display: inline-flex; flex-direction: column; align-items: center;
  font-family: var(--font-title); font-weight: 400; color: var(--title-white); line-height: 0.9;
}
.lk-1 { display: block; font-size: var(--fs-h1); letter-spacing: 0.01em; }
.lk-2 { display: block; margin-top: 0.22em; font-size: var(--fs-h1b); letter-spacing: 0.34em; padding-left: 0.34em; color: var(--gold); }
.tagline { margin-top: clamp(14px, 1.6vw, 22px); font-size: var(--fs-hand); line-height: 1.1; color: #e9dfc8; }
.lead { margin-top: clamp(10px, 1.1vw, 16px); max-width: 33ch; font-size: var(--fs-lead); line-height: 1.5; }

.hero-prints {
  position: relative;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.6vw, 40px);
  margin-top: clamp(28px, 3.2vw, 48px); padding-right: clamp(0px, 2vw, 32px);
}
.print--a { rotate: -2.2deg; }
.print--b { rotate: 1.7deg; margin-top: clamp(10px, 1.4vw, 22px); }
.print--a .note { left: -12px; top: -14px; }
.print--b .note { right: -10px; bottom: -14px; rotate: 3deg; }

/* the sign-up plate */
.join { grid-column: 8 / -1; align-self: start; margin-top: clamp(4px, 1vw, 12px); scroll-margin-top: 12px; }
.join:focus { outline: 0; }
.signup { padding: clamp(24px, 2.2vw, 32px) clamp(20px, 2.2vw, 32px) clamp(22px, 2vw, 28px); }
.form-body { display: grid; gap: 15px; }
.row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 16px; align-items: start; }
.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend { padding: 0; font-size: var(--fs-small); font-weight: 700; line-height: 1.3; color: var(--text); }
.field > legend { margin-bottom: 6px; }
.choice .hint, .choice .err { margin-top: 6px; }

.signup input[type="email"], .signup input[type="text"], .signup textarea {
  display: block; width: 100%; min-height: 46px; margin: 0; padding: 10px 12px;
  font-weight: 500; font-size: 16px; line-height: 1.4; color: var(--text);
  background: var(--steel-4); border: 2px solid var(--steel-1); border-radius: 0;
  caret-color: var(--gold); -webkit-appearance: none; appearance: none;
  transition: border-color var(--dur-s) ease;
}
.signup textarea { min-height: 70px; resize: vertical; }
.signup input::placeholder, .signup textarea::placeholder { color: #8b939c; opacity: 1; }
.signup input:hover, .signup textarea:hover { border-color: var(--steel-edge); }
.signup input:focus-visible, .signup textarea:focus-visible { outline: 0; border-color: var(--gold); }
.signup [aria-invalid="true"] { border-color: var(--amber); }

.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg label { position: relative; display: block; cursor: pointer; }
.seg input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span {
  --cut: 6px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 8px; font-weight: 800; font-size: var(--fs-small); line-height: 1.1;
  background-color: var(--steel-2); clip-path: var(--cut-shape);
  border-top: 2px solid #50565e; border-bottom: 3px solid #23272b;
  transition: background-color var(--dur-s) var(--ease-out), transform var(--dur-s) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) { .seg label:hover span { background-color: var(--steel-1); } }
.seg input:active + span { transform: translateY(1px) scale(0.97); }
.seg input:checked + span { background-color: var(--steel-1); outline: 2px solid var(--gold); outline-offset: -2px; }
.seg input:checked + span .lampdot { background: var(--gold); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.choice.is-invalid .seg span { outline: 2px solid var(--amber); outline-offset: -2px; }

.checks { gap: 0; }
.check { display: flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; font-weight: 600; font-size: var(--fs-small); line-height: 1.3; }
.check input {
  -webkit-appearance: none; appearance: none; flex: none; display: grid; place-items: center;
  width: 22px; height: 22px; margin: 0; border-radius: 0; cursor: pointer;
  background: var(--steel-4); border: 2px solid var(--steel-edge);
  transition: background-color var(--dur-s) ease, border-color var(--dur-s) ease;
}
.check input::after { content: ''; width: 6px; height: 11px; margin-top: -3px; border: solid var(--ink); border-width: 0 3px 3px 0; rotate: 45deg; scale: 0; transition: scale var(--dur-s) var(--ease-out); }
.check input:checked { background: var(--gold); border-color: var(--gold); }
.check input:checked::after { scale: 1; }
.check input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.check input[aria-invalid="true"] { border-color: var(--amber); }

.hint { font-size: var(--fs-small); line-height: 1.4; color: var(--text-dim); }
.fine { font-size: var(--fs-small); line-height: 1.45; color: var(--text-dim); }
.fine a { color: var(--text); font-weight: 700; }
.free { margin-top: -3px; text-align: center; font-size: var(--fs-small); font-weight: 700; color: var(--text-dim); }
.hp { position: absolute; left: -9999px; width: 0; height: 0; overflow: hidden; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.err { display: none; align-items: flex-start; gap: 8px; font-size: var(--fs-small); font-weight: 700; line-height: 1.35; color: var(--amber); }
.err.is-on { display: flex; }
.err--form.is-on { margin-top: -2px; }
.closed { margin-top: -4px; text-align: center; font-weight: 700; color: var(--text); }

.signup.is-busy .btn--big .lampdot { animation: busy 0.8s steps(2, jump-none) infinite; }
@keyframes busy { from { background: #23262a; } to { background: #fff2c2; } }

/* after sign-up */
.joined { display: grid; justify-items: start; gap: 14px; padding: 6px 0 4px; }
.joined:focus { outline: 0; }
.joined-pos { font-family: var(--font-title); font-weight: 400; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: 0.02em; }
.joined-pos b { font-weight: 400; color: var(--gold); }
.joined-next { color: var(--text); }
.joined-link { font-weight: 700; color: var(--text); text-decoration-color: var(--gold); }
.joined-lamp { position: relative; width: 64px; height: 88px; }
.lamp-ico { position: absolute; inset: 0; }
.lamp-ico::before { content: ''; position: absolute; left: 50%; top: 18px; bottom: 0; width: 4px; margin-left: -2px; background: var(--wood); }
.lamp-ico::after { content: ''; position: absolute; left: 50%; top: 4px; width: 34px; height: 16px; margin-left: -17px; background: var(--steel-4); border-bottom: 7px solid var(--glass-off); }
.joined-lamp.is-on .lamp-ico::after { border-bottom-color: var(--glass-on); }
.joined-lamp::before { content: ''; position: absolute; left: 50%; top: 20px; width: 92px; height: 68px; margin-left: -46px; background: var(--light); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); opacity: 0; }
.joined-lamp.is-on::before { opacity: 1; }

/* ---------- the fence (night) ---------- */
.fence-sec { padding: clamp(24px, 3vw, 48px) 0 var(--sec); overflow: hidden; }
.fence-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px var(--gap); align-items: end; }
.fence-head h2 { grid-column: 1 / span 7; }
.fence-head p { grid-column: 8 / -1; max-width: 42ch; color: var(--text); }

.fence { position: relative; margin-top: clamp(40px, 5vw, 72px); padding-top: 48px; overflow: hidden; }
.fence::before { content: ''; position: absolute; left: 0; right: 0; top: 46%; bottom: 0; background: var(--yard-far); }
.fence-row { --s: 1; position: relative; display: flex; width: calc(100% * var(--s)); margin-inline: auto; }
.fence-row + .fence-row { margin-top: clamp(4px, 0.8vw, 12px); }
.fence-art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; }
.fa-ground { fill: var(--yard); }
.fa-rail { fill: var(--wood-dark); }
.fa-post { fill: var(--wood); }
.lamp { position: relative; flex: 1 1 0; min-width: 0; aspect-ratio: 1 / 3.6; }
.lamp .pool { position: absolute; z-index: 1; left: 50%; bottom: 2%; width: 300%; height: 9%; margin-left: -150%; border-radius: 50%; background: var(--light-pool); opacity: 0; }
.lamp .cone { position: absolute; z-index: 3; left: 50%; top: 15%; height: 80%; width: 320%; margin-left: -160%; background: var(--light); clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); opacity: 0; }
.lamp .head { position: absolute; z-index: 4; left: 50%; top: 6%; width: 66%; height: 8%; min-height: 5px; margin-left: -33%; background: var(--steel-4); }
.lamp .head::after { content: ''; position: absolute; left: 12%; right: 12%; bottom: 0; height: 48%; background: var(--glass-off); }
.lamp.is-on .pool, .lamp.is-on .cone { opacity: 1; }
.lamp.is-on .head::after { background: var(--glass-on); }
.lamp.is-mine .head { outline: 2px solid var(--gold); outline-offset: 2px; }
.lamp-tag { position: absolute; z-index: 6; left: 50%; bottom: calc(94% + 12px); translate: -50% 0; font-size: 19px; }
.lamp.is-flick .cone, .lamp.is-flick .pool { animation: flick 620ms linear both; }
.lamp.is-flick .head::after { animation: flick-glass 620ms linear both; }
@keyframes flick { 0% { opacity: 0; } 12% { opacity: 1; } 20% { opacity: 0.15; } 34% { opacity: 0.9; } 42% { opacity: 0.3; } 60% { opacity: 1; } 100% { opacity: 1; } }
@keyframes flick-glass { 0%, 19%, 41% { background: var(--glass-off); } 12%, 34%, 60%, 100% { background: var(--glass-on); } }

.fence-foot { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px var(--gap); align-items: start; margin-top: clamp(36px, 4.4vw, 64px); }
.survey { grid-column: 1 / span 7; }
.survey-q { font-weight: 700; font-size: var(--fs-lead); }
.fig { display: flex; align-items: baseline; gap: 18px; margin-top: 10px; }
.fig-n { flex: none; min-width: 3.4em; text-align: right; font-family: var(--font-title); font-size: var(--fs-h2); line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.fig-t { font-weight: 700; font-size: var(--fs-h3); }
.fig--no .fig-n, .fig--no .fig-t { color: var(--text-dim); }
.tally { grid-column: 8 / -1; justify-self: end; text-align: right; }
.tally-on { display: flex; align-items: baseline; justify-content: flex-end; gap: 14px; }
.tally-n { font-family: var(--font-title); font-size: var(--fs-h2); line-height: 1; color: var(--gold); }
.tally-t { font-weight: 700; font-size: var(--fs-h3); }
.tally-full { max-width: 26ch; font-weight: 700; font-size: var(--fs-h3); line-height: 1.3; }
.tally-full [data-odo] { color: var(--gold); }

/* rolling figures */
.odo { display: inline-flex; line-height: 1; }
.odo-col { display: inline-block; height: 1em; overflow: hidden; text-align: center; }
.odo-strip { display: block; line-height: 1; translate: 0 calc(var(--d, 0) * -1em); }
.odo-strip::before { content: "0\A 1\A 2\A 3\A 4\A 5\A 6\A 7\A 8\A 9"; display: block; white-space: pre; text-align: center; }
.odo-sep { display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .odo-strip { transition: translate 1000ms var(--ease-expo) calc(var(--i, 0) * 70ms); } }

/* ---------- the game (day) ---------- */
.game { padding: clamp(80px, 9vw, 136px) 0 0; }
.game h2 { max-width: 15ch; }
.garden { position: relative; height: 22px; margin-top: clamp(44px, 5.5vw, 80px); background: var(--grass); }
.earth { --earth-top: clamp(26px, 3vw, 44px); background: var(--earth); padding: var(--earth-top) 0 clamp(56px, 5.5vw, 84px); }
/* the walls are the concrete showing between the rooms; each room is a different width, like in the game */
.game-cols {
  display: grid; grid-template-columns: 1.12fr 1fr 0.94fr 1.06fr; gap: 8px;
  padding: 8px 8px 14px; background: var(--concrete);
}
.game-col { position: relative; min-width: 0; padding: clamp(30px, 2.8vw, 40px) clamp(18px, 2vw, 30px) clamp(26px, 2.6vw, 38px); background: var(--room); color: var(--day-ink); }
/* a lamp on every ceiling: the bunker is always lit */
.game-col::before { content: ''; position: absolute; top: 0; right: clamp(18px, 2vw, 30px); width: 30px; height: 8px; background: var(--steel-2); border-bottom: 4px solid var(--power); }
/* the way in: a hatch in the grass and a ladder down into the first room */
.game-col--entry { padding-right: clamp(64px, 5.4vw, 84px); }
.game-col--entry::before { right: auto; left: clamp(18px, 2vw, 30px); }
.game-col--entry .hatch { position: absolute; z-index: 2; right: 12px; top: calc(-8px - var(--earth-top) - 8px); width: 44px; height: 8px; background: var(--steel-2); }
.game-col--entry .ladder { position: absolute; z-index: 1; right: 20px; top: calc(-8px - var(--earth-top)); width: 28px; height: calc(8px + var(--earth-top) + 118px); fill: var(--steel-edge); }
.game-col h3 { margin-bottom: 0.6em; }
.game-col p { max-width: 34ch; }

/* ---------- pictures (night) ---------- */
.shots { padding: var(--sec) 0; }
.shots-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(36px, 3.6vw, 56px) var(--gap); align-items: start; margin-top: clamp(44px, 5.5vw, 80px);
}
.shot figcaption { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px 3px; }
.shot .cap { font-weight: 800; font-size: var(--fs-small); color: var(--ink); }
.shot .note { right: -10px; top: -14px; }
.shot-img { position: relative; overflow: hidden; }
.shot-dark { position: absolute; inset: 0; background: rgba(8, 10, 14, 0.84); opacity: 0; pointer-events: none; }
.shot--lead { grid-column: 1 / span 8; grid-row: 1 / span 2; rotate: -0.8deg; }
.shot--map { grid-column: 9 / -1; rotate: 1.4deg; }
.shot--mission { grid-column: 9 / -1; rotate: -1.1deg; }
.shot--build { grid-column: 2 / span 5; rotate: 1deg; }
.shot--people { grid-column: 7 / span 5; rotate: -1.4deg; margin-top: clamp(24px, 4vw, 64px); }
.shot--lead .note { top: auto; bottom: 40px; right: -12px; rotate: 3deg; }

/* ---------- how the beta works (day) ---------- */
.beta { padding: var(--sec) 0 clamp(72px, 8vw, 120px); }
.beta-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 56px var(--gap); align-items: start; }
.beta-steps { grid-column: 1 / span 6; }
.steps { margin-top: clamp(36px, 4.4vw, 64px); padding-left: 1.9em; display: grid; gap: 26px; list-style: decimal; }
.steps li { padding-left: 0.5em; max-width: 46ch; }
.steps li::marker { font-family: var(--font-title); font-size: var(--fs-h3); color: var(--day-soft); }
.steps strong { font-weight: 800; }
.beta-side { grid-column: 8 / -1; display: grid; gap: 44px; padding-top: clamp(8px, 2vw, 32px); }
.slip {
  position: relative; padding: clamp(34px, 3vw, 44px) clamp(22px, 2.4vw, 36px) clamp(24px, 2.4vw, 32px);
  background: var(--note); color: var(--note-ink); border-bottom: 4px solid #d8caa6; rotate: 1.2deg;
}
.slip .tape { position: absolute; left: 50%; top: -13px; width: 104px; height: 28px; margin-left: -52px; background: rgba(214, 198, 152, 0.92); rotate: -2.5deg; }
.slip h3 { font-family: var(--font-hand); font-weight: 700; font-size: var(--fs-hand); line-height: 1.05; letter-spacing: 0; padding-bottom: 8px; margin-bottom: 14px; border-bottom: 2px solid rgba(96, 140, 184, 0.55); }
.slip p { font-weight: 600; }
.slip .slip-fine { margin-top: 14px; font-size: var(--fs-small); font-weight: 600; color: #4a423a; }
.money { max-width: 46ch; }
.money strong { font-weight: 800; }

/* ---------- questions (day) ---------- */
.faq { padding: clamp(72px, 8vw, 120px) 0 var(--sec); }
.qa { margin-top: clamp(28px, 3.4vw, 48px); }
.qa-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 10px var(--gap); padding-block: clamp(20px, 2.4vw, 34px); }
.qa dt { grid-column: 1 / span 6; font-size: var(--fs-h3); font-weight: 800; line-height: 1.2; }
.qa dd { grid-column: 8 / -1; max-width: 46ch; }
.qa dd a { font-weight: 700; }

/* ---------- the series (night) ---------- */
.series { padding: var(--sec) 0 clamp(72px, 8vw, 128px); overflow: hidden; }
.series-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 48px var(--gap); align-items: end; }
.series-copy { grid-column: 1 / span 6; display: grid; gap: 22px; justify-items: start; padding-bottom: clamp(0px, 3vw, 48px); }
.series-copy h2 { margin-bottom: 6px; }
.series-copy > p { max-width: 44ch; }
.gfm { max-width: 46ch; color: var(--text-dim); }
.gfm a { color: var(--text); font-weight: 700; }

.cast { grid-column: 7 / -1; position: relative; height: clamp(320px, 33vw, 470px); }
.cast-light { position: absolute; inset: 0; }
.cast-light > span { position: absolute; display: block; }
.cast-post { left: 4%; bottom: 34px; width: 6px; height: 88%; background: var(--wood); }
.cast-head { left: calc(4% - 18px); top: calc(12% - 30px); width: 42px; height: 17px; background: var(--steel-4); border-bottom: 7px solid var(--glass-on); }
.cast-cone { left: 4%; top: calc(12% - 13px); width: 100%; bottom: 34px; background: var(--light); clip-path: polygon(0 0, 3% 0, 100% 100%, 0 100%); }
.cast-pool { left: 0; right: 0; bottom: 26px; height: 30px; border-radius: 50%; background: var(--light-pool); }
.cast::after { content: ''; position: absolute; left: -6%; right: -40%; bottom: 26px; height: 9px; background: var(--yard); }
.cast-who { position: absolute; bottom: 34px; margin: 0; z-index: 1; }
.cast-who img { height: 100%; width: auto; max-width: none; transition: filter 700ms var(--ease-out); }
.cast-who figcaption { position: absolute; left: 50%; top: calc(100% + 14px); translate: -50% 0; font-size: var(--fs-small); font-weight: 700; color: var(--text-dim); white-space: nowrap; }
/* a grown man, a girl, a sitting shepherd: sizes kept in proportion, Ranger anchored to the right edge */
.cast-mason { left: 11%; height: 84%; }
.cast-lily { left: 36%; height: 62%; z-index: 2; }
.cast-ranger { right: 0; height: 46%; }

/* ---------- confirm and unsubscribe ---------- */
.status { padding: clamp(24px, 4vw, 64px) 0 var(--sec); overflow: hidden; }
.status-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px var(--gap); align-items: center; }
.status-copy { grid-column: 1 / span 7; display: grid; gap: 20px; justify-items: start; }
.status-copy h1 { font-family: var(--font-title); font-weight: 400; font-size: clamp(40px, 5.6vw, 84px); line-height: 0.98; letter-spacing: 0.01em; color: var(--text); max-width: 17ch; }
.status-copy p { font-size: var(--fs-lead); max-width: 36ch; }
.status-copy p b { font-weight: 400; font-family: var(--font-title); color: var(--gold); }
.status .cast { grid-column: 8 / -1; height: clamp(300px, 30vw, 440px); }
/* the lamp on these pages: dark, on with a flicker, or going out */
.cast.is-dark .cast-cone, .cast.is-dark .cast-pool { opacity: 0; }
.cast.is-dark .cast-head { border-bottom-color: var(--glass-off); }
.cast.is-dark .cast-who img { filter: brightness(0.42); }
.cast.is-flick .cast-cone, .cast.is-flick .cast-pool { animation: flick 700ms linear both; }
.cast.is-out .cast-cone, .cast.is-out .cast-pool { animation: flick-out 700ms linear both; }
@keyframes flick-out { 0% { opacity: 1; } 18% { opacity: 0.2; } 30% { opacity: 0.85; } 48% { opacity: 0.1; } 60% { opacity: 0.5; } 100% { opacity: 0; } }

/* ---------- legal pages (built elsewhere, styled here) ---------- */
.legal { background: var(--day); color: var(--day-ink); color-scheme: light; padding: clamp(48px, 7vw, 112px) var(--m) var(--sec); }
/* one text column with one left edge: a fixed width, not ch (ch follows each element's own size) */
.legal > * { max-width: 720px; margin-inline: auto; }
.legal h1 { margin-top: 18px; font-family: var(--font-title); font-weight: 400; font-size: clamp(30px, 7.6vw, 64px); line-height: 1; letter-spacing: 0.01em; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.legal h2 { margin-top: 2.2em; font-family: var(--font-ui); font-size: var(--fs-h3); font-weight: 800; line-height: 1.2; letter-spacing: 0; }
.legal h3 { margin-top: 1.6em; font-size: var(--fs-body); font-weight: 800; }
.legal p, .legal ul, .legal ol { margin-top: 0.9em; }
.legal h1 + p, .legal h2 + p, .legal h2 + ul, .legal h3 + p { margin-top: 0.6em; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li + li { margin-top: 0.35em; }
.legal a { font-weight: 700; color: var(--day-ink); }
.legal mark { background: var(--power); color: var(--ink); padding: 0 0.2em; }
.legal mark.todo { background: var(--amber); color: var(--ink); padding: 0.05em 0.3em; font-weight: 700; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.legal > p:first-child { font-size: var(--fs-small); color: var(--day-soft); }
.legal table { width: 100%; margin-top: 1em; border-collapse: collapse; font-size: var(--fs-small); }
.legal th, .legal td { padding: 8px 10px 8px 0; text-align: left; vertical-align: top; border-bottom: 1px solid #b9c2cb; }

/* ---------- motion: entrances (only with script, never under reduced motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-in] { transition: opacity 700ms var(--ease-out) var(--delay, 0ms), translate 1000ms var(--ease-expo) var(--delay, 0ms); }
  .js [data-in]:not(.is-in) { opacity: 0; }
  .js [data-in="rise"]:not(.is-in) { translate: 0 26px; }
  .js [data-in="print"]:not(.is-in) { translate: 0 44px; }
  .js [data-in="plate"]:not(.is-in) { translate: 0 36px; }
  .js [data-in="lights"]:not(.is-in) { translate: 0 30px; }
  .js [data-in="slip"] { transition: opacity 600ms var(--ease-out) var(--delay, 0ms), translate 900ms var(--ease-expo) var(--delay, 0ms), rotate 1100ms var(--ease-expo) var(--delay, 0ms); }
  .js [data-in="slip"]:not(.is-in) { translate: 0 -28px; rotate: 5deg; }
  .js [data-in="cast"]:not(.is-in) { opacity: 1; }
  .js [data-in="cast"] .cast-who { transition: opacity 600ms var(--ease-out), translate 1000ms var(--ease-expo); }
  .js [data-in="cast"] .cast-mason { transition-delay: 520ms; }
  .js [data-in="cast"] .cast-lily { transition-delay: 600ms; }
  .js [data-in="cast"] .cast-ranger { transition-delay: 680ms; }
  .js [data-in="cast"]:not(.is-in) .cast-who { opacity: 0; translate: 0 24px; }
  .js [data-in="cast"]:not(.is-in) .cast-cone, .js [data-in="cast"]:not(.is-in) .cast-pool { opacity: 0; }
  .js [data-in="cast"]:not(.is-in) .cast-head { border-bottom-color: var(--glass-off); }
  .js [data-in="cast"].is-in .cast-cone, .js [data-in="cast"].is-in .cast-pool { animation: flick 700ms linear both 80ms; }
  .js [data-in="lights"] .shot-dark { opacity: 1; }
  .js [data-in="lights"].is-in .shot-dark { animation: lights-on 1300ms linear 260ms both; }
  @keyframes lights-on { 0% { opacity: 1; } 14% { opacity: 0.25; } 22% { opacity: 0.9; } 36% { opacity: 0.15; } 44% { opacity: 0.6; } 70% { opacity: 0; } 100% { opacity: 0; } }

  .js .hero-cone { opacity: 0; }
  .js.is-ready .hero-cone { animation: cone-on 1100ms linear 150ms both; }
  @keyframes cone-on { 0% { opacity: 0; } 10% { opacity: 1; } 18% { opacity: 0.1; } 30% { opacity: 0.9; } 38% { opacity: 0.35; } 56% { opacity: 1; } 100% { opacity: 1; } }

  .joined-lamp.is-on::before { animation: flick 700ms linear both; }
  .joined { animation: plate-up var(--dur-l) var(--ease-out) both; }
  @keyframes plate-up { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
}

/* ---------- touch ---------- */
@media (pointer: coarse) {
  .check { min-height: 44px; }
  .seg span { min-height: 48px; }
}

/* ---------- tablet ---------- */
@media (max-width: 1099px) {
  .hero-left { grid-column: 1 / -1; }
  .hero-prints { max-width: 760px; padding-right: 0; }
  .join { grid-column: 1 / -1; margin-top: clamp(48px, 7vw, 72px); }
  .fence-head h2, .fence-head p { grid-column: 1 / -1; }
  .survey { grid-column: 1 / span 7; }
  .tally { grid-column: 8 / -1; }
  .game-cols { grid-template-columns: 1.06fr 0.94fr; }
  .shot--lead { grid-column: 1 / -1; grid-row: auto; }
  .shot--map, .shot--build { grid-column: 1 / span 6; }
  .shot--mission, .shot--people { grid-column: 7 / -1; }
  .shot--people { margin-top: 0; }
  .beta-steps, .beta-side { grid-column: 1 / -1; }
  .beta-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 40px; padding-top: 0; }
  .qa dt { grid-column: 1 / span 5; }
  .qa dd { grid-column: 6 / -1; }
  .series-copy { grid-column: 1 / -1; }
  .cast { grid-column: 1 / -1; height: clamp(300px, 52vw, 440px); max-width: 640px; }
  .status-copy, .status .cast { grid-column: 1 / -1; }
  .status .cast { max-width: 560px; }
}

/* ---------- phone ---------- */
@media (max-width: 699px) {
  :root { --fs-h1: clamp(52px, 16.4vw, 72px); --fs-h1b: var(--fs-h3); }
  .wordmark { font-size: 15px; letter-spacing: 0.02em; }
  .site-head .btn { --rv-x: 5px; font-size: 13px; letter-spacing: 0.04em; padding: 0 14px; }
  .site-head .btn-bolt { display: none; }
  .hero-prints { grid-template-columns: 1fr; max-width: 520px; padding: 0 6px; }
  .hero-prints .print--a { width: 74%; }
  .hero-prints .print--b { width: 74%; justify-self: end; margin-top: -18%; }
  .print--b .note { left: auto; right: -6px; top: auto; bottom: -14px; }
  .print--a .note { right: auto; left: -6px; top: -14px; bottom: auto; }
  .row-2 { grid-template-columns: 1fr; }
  .signup { padding: 24px 18px 22px; }
  .fence-sec { padding-top: 8px; }
  .fence { padding-top: 40px; }
  .lamp-tag { font-size: 17px; }
  .fence-foot { grid-template-columns: 1fr; }
  .survey, .tally { grid-column: 1 / -1; }
  .tally { justify-self: start; text-align: left; }
  .tally-on { justify-content: flex-start; }
  .fig { gap: 14px; }
  .fig-n { min-width: 2.9em; }
  .game-cols { grid-template-columns: 1fr; }
  .shots-grid { grid-template-columns: 1fr; gap: 40px; }
  .shot--lead, .shot--map, .shot--mission, .shot--build, .shot--people { grid-column: 1 / -1; }
  .shot--lead .note { bottom: 34px; }
  .beta-side { grid-template-columns: 1fr; }
  .qa-row { grid-template-columns: 1fr; gap: 10px; padding-block: 20px; }
  .qa dt, .qa dd { grid-column: 1 / -1; }
  .cast { height: 300px; }
  .cast-post { left: 1%; }
  .cast-head { left: calc(1% - 18px); }
  .cast-cone { left: 1%; }
  .cast-mason { left: 8%; height: 80%; }
  .cast-lily { left: 33%; height: 63%; }
  .cast-ranger { left: auto; right: 0; height: 46%; }
  .site-foot { grid-template-columns: 1fr; grid-template-areas: "nav" "mark" "c"; gap: 40px; }
  .wordmark-big { font-size: 15.6vw; }
  .status .cast { height: 280px; }
}
@media (max-width: 380px) {
  .site-head .btn { font-size: 12px; letter-spacing: 0.03em; padding-inline: 0.8em; }
  .wordmark { font-size: 13.5px; }
}
