/* =========================================================================
   Bone Valley homepage (v3, coming soon). Loads after site.css; the Depot,
   store and 404 pages use site.css alone.
   Direction: one piece of key art, plain prose, and one printed Amberline
   application on paper as the page's single moment of personality.
   Spacing stays on the site.css scale: 8, 16, 24, 40, 64, 96, 160.
   ========================================================================= */

@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../fonts/courier-prime-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo Expanded"; src: url("../fonts/archivo-expanded-900.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --bg: #101418;
  --night: #101418;
  --paper: #E6DAC0;           /* field paper */
  --sheet: #F2EBDB;           /* the form sheet */
  --ink: #2A2219;             /* print on paper, ~12:1 */
  --ink-soft: #5A4C3B;        /* small print on paper, ~6:1 */
  --rust: #9C3F1A;            /* the mark and the stamp, ~6:1 on paper */
  --font-wide: "Archivo Expanded", "Archivo", "Arial Black", sans-serif;
  --font-type: "Courier Prime", "Courier New", monospace;
}

.home { background: var(--night); }

/* nav: over the hero, then a solid bar once you scroll */
.home .nav { position: fixed; transition: background-color 250ms, border-color 250ms; border-bottom: 1px solid transparent; }
.home .nav.is-solid { background: var(--night); border-bottom-color: var(--line); }

/* =========================================================================
   1. HERO
   ========================================================================= */
.h-hero { position: relative; height: 100svh; min-height: 600px; max-height: 1200px; overflow: hidden; background: var(--night); }
.h-hero-media { position: absolute; inset: 0; transform: translate3d(0, calc(var(--hy, 0) * 1px), 0); will-change: transform; }
/* the stage keeps the frame's aspect so the lamps, fog and eyes stay pinned to the art.
   Phones show the right side of the frame: the far figure by the river. */
.h-hero .hero-stage { top: 50%; left: 50%; height: auto; width: max(100vw, 205.2svh); transform: translate(-70%, -50%); }
@media (min-width: 700px) { .h-hero .hero-stage { transform: translate(-50%, -50%); } }
.h-hero-media::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(16, 20, 24, 0.6), rgba(16, 20, 24, 0) 18%),
    linear-gradient(to bottom, rgba(16, 20, 24, 0) 45%, rgba(16, 20, 24, 0.75) 78%, var(--night) 100%); }
.h-hero-inner { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: var(--s64); }
.h-hero-foot { display: grid; gap: var(--s24); align-items: end; }
.h-hero-logo { width: clamp(280px, 60vw, 960px); max-width: 100%; transform: translate3d(0, calc(var(--hy, 0) * -0.35px), 0); }
.h-hero-logo img { width: 100%; height: auto; }
.h-soon { font-weight: 600; font-size: var(--t18); color: var(--amber); }
.h-tagline { margin-top: var(--s8); font-family: var(--font-display); font-weight: var(--dw, 800); font-size: var(--t32); line-height: 1.08; letter-spacing: -0.015em; max-width: 20ch; }
.h-hero-kicker { margin: var(--s16) 0 var(--s24); font-size: var(--t18); line-height: 1.45; max-width: 30ch; }
.h-concept { position: absolute; z-index: 2; right: var(--gutter); top: 88px; font-size: var(--t14); color: var(--muted); }
@media (min-width: 900px) {
  .h-hero-inner { padding-bottom: var(--s96); }
  .h-hero-foot { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s64); }
  .h-hero-side { width: 400px; }
  .h-tagline { font-size: 36px; }
  .h-concept { top: auto; bottom: var(--s24); }
}

/* something in the ferns. Only after you've stayed on the hero a while, then now and again. */
.eyes { position: absolute; left: 91.5%; top: 71%; display: flex; gap: 0.5%; width: 1.6%; justify-content: space-between; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.eyes i { width: 34%; aspect-ratio: 1.6; border-radius: 50%; background: #F4C46A; box-shadow: 0 0 6px 2px rgba(244, 170, 70, 0.5); }
.eyes.is-watching { animation: watch 5.2s ease-in-out forwards; }
.eyes.is-watching i { animation: lids 5.2s steps(1) forwards; }
@keyframes watch { 0% { opacity: 0; } 22% { opacity: 0.8; } 78% { opacity: 0.8; } 100% { opacity: 0; } }
@keyframes lids { 0%, 44% { transform: scaleY(1); } 45% { transform: scaleY(0.1); } 48% { transform: scaleY(1); } }

/* =========================================================================
   2. ABOUT
   ========================================================================= */
.h-about { padding: var(--s96) 0; }
.h-about-grid { display: grid; gap: var(--s64); }
.h-about-text p { font-size: var(--t18); line-height: 1.6; max-width: 42ch; }
.h-about-text .h-kicker-line { margin-top: var(--s40); font-weight: 600; color: var(--amber); }
.h-about-text p + p { margin-top: var(--s24); }
.h-about-text .h-lede { font-family: var(--font-display); font-weight: var(--dw, 800); font-size: var(--t32); line-height: 1.12; letter-spacing: -0.02em; max-width: 22ch; color: var(--text); margin-bottom: var(--s40); }
.facts { margin: 0; align-self: start; }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: var(--s16); padding: var(--s16) 0; border-top: 1px solid var(--line); }
.facts div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (min-width: 900px) {
  .h-about { padding: var(--s160) 0; }
  .h-about-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s96); }
  .h-about-text p { font-size: 22px; line-height: 1.55; }
  .h-about-text .h-lede { font-size: var(--t48); line-height: 1.06; margin-bottom: var(--s64); }
  .facts { margin-top: var(--s16); }
}

/* =========================================================================
   3. THE APPLICATION, on paper
   ========================================================================= */
.h-apply { position: relative; padding: var(--s96) 0; color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.27 0 0 0 0 0.16 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23f)'/%3E%3C/svg%3E"); }
/* torn top edge */
.h-apply::before { content: ""; position: absolute; left: 0; right: 0; top: -29px; height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 30' preserveAspectRatio='none'%3E%3Cpath fill='%23E6DAC0' d='M0,30 L0,14 L11,16.4 L20,14.6 L35,6.9 L52,6.6 L68,7.1 L77,12.8 L100,8.0 L112,16.0 L137,15.2 L152,21.6 L161,19.7 L174,8.3 L184,10.9 L207,8.9 L226,16.2 L240,14.8 L249,7.0 L261,16.9 L277,11.0 L295,13.3 L309,18.7 L329,9.9 L348,14.4 L371,17.7 L385,21.7 L395,12.7 L416,8.4 L433,6.6 L453,18.2 L472,20.0 L485,17.1 L504,15.3 L520,19.4 L545,13.6 L565,7.0 L586,16.4 L612,19.2 L625,12.2 L645,6.4 L661,8.7 L671,6.9 L693,8.1 L705,12.3 L729,7.3 L745,14.8 L769,19.1 L793,10.5 L808,11.7 L832,21.3 L843,8.8 L855,9.7 L872,15.4 L884,6.1 L900,11.9 L918,21.2 L939,14.2 L958,16.8 L967,20.4 L989,20.0 L1011,12.3 L1026,7.7 L1046,7.0 L1055,9.3 L1066,11.4 L1075,6.0 L1085,7.6 L1100,6.4 L1124,15.8 L1134,10.0 L1149,11.8 L1159,19.6 L1185,13.5 L1200,14 L1200,30 Z'/%3E%3C/svg%3E") left top / 1200px 30px repeat-x; }
.h-apply-grid { display: grid; gap: var(--s64); align-items: start; }
@media (min-width: 960px) { .h-apply { padding: var(--s160) 0; } .h-apply-grid { grid-template-columns: 6fr 5fr; gap: var(--s96); } }

.flyer h2 { font-family: var(--font-display); font-weight: var(--dw, 800); font-size: clamp(40px, 5vw, 72px); line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.flyer-body { margin-top: var(--s24); max-width: 36ch; font-size: var(--t18); line-height: 1.55; }
@media (min-width: 900px) { .flyer-body { font-size: var(--t24); line-height: 1.45; } }

.form-sheet { position: relative; padding: var(--s40) var(--s24); background: var(--sheet);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 24px 40px -24px rgba(42, 34, 25, 0.55); }
@media (min-width: 600px) { .form-sheet { padding: var(--s40); } }
.sheet-head { display: flex; align-items: center; gap: var(--s16); padding-bottom: var(--s16); border-bottom: 2px solid var(--ink); font-family: var(--font-type); font-size: var(--t18); }
.sheet-mark { width: 40px; flex: none; color: var(--rust); }
.sheet-head p { display: grid; }
.sheet-head b { color: var(--rust); }
.sheet-head span { color: var(--ink-soft); }
.sheet-small { margin-top: var(--s24); font-family: var(--font-type); font-size: var(--t14); line-height: 1.5; color: var(--ink-soft); max-width: 44ch; }
.form-sheet .form { margin-top: var(--s40); }
.form-sheet label { font-family: var(--font-type); font-weight: 400; font-size: var(--t18); color: var(--ink); }
.form-sheet input[type="email"] { width: 100%; min-height: 56px; padding: 0 var(--s8); font-family: var(--font-type); font-size: var(--t24); color: var(--ink);
  background: transparent; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; }
.form-sheet input[type="email"]::placeholder { color: rgba(42, 34, 25, 0.45); }
.form-sheet input[type="email"]:focus { outline: 2px solid var(--rust); outline-offset: 4px; }
.form-sheet input[aria-invalid="true"] { border-bottom-color: var(--rust); }

/* the one tilted thing on the page: a rubber stamp */
.stamp-btn { margin-top: var(--s40); display: inline-block; cursor: pointer; background: transparent; color: var(--rust); padding: 4px; border: 3px solid var(--rust); border-radius: 6px;
  font-family: var(--font-wide); font-weight: 900; font-size: clamp(14px, 4vw, 18px); letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; transform: rotate(-2deg);
  transition: transform 120ms, background-color 120ms, color 120ms; }
.stamp-btn span { display: block; padding: var(--s8) var(--s16); border: 1px solid currentColor; border-radius: 3px; }
.stamp-btn:hover { background: var(--rust); color: var(--sheet); }
.stamp-btn:active { transform: rotate(-2deg) scale(0.96); }
.stamp-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.stamp-btn:disabled { opacity: 0.6; cursor: progress; }

.form-sheet .form-status { margin-top: var(--s16); color: var(--ink); }
.form-sheet .form-status[data-state="ok"], .form-sheet .form-status[data-state="error"] { color: var(--rust); }
.form-sheet .form-note { color: var(--ink-soft); }
.form-sheet .form-note a { color: var(--rust); }
.form-sheet .wire-note { border-color: var(--rust); color: var(--rust); }

.received { position: absolute; right: 8%; top: 30%; padding: 4px var(--s16); border: 5px solid var(--rust); border-radius: 8px; color: var(--rust);
  font-family: var(--font-wide); font-weight: 900; font-size: clamp(32px, 4vw, 48px); text-transform: uppercase;
  opacity: 0; transform: rotate(-14deg) scale(1.6); pointer-events: none; mix-blend-mode: multiply; }
.form-sheet.is-received .received { animation: stamp 380ms cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes stamp { to { opacity: 0.88; transform: rotate(-14deg) scale(1); } }

/* =========================================================================
   4. LINKS: site.css styles them; just more air above
   ========================================================================= */
.home .links { border-top: 0; }
@media (min-width: 900px) { .home .links { padding: var(--s160) 0 var(--s96); } }

/* small marks on the two links: the Depot's terminal and YouTube's own logo */
.home .big-link { display: inline-flex; align-items: flex-start; gap: var(--s16); }
.link-icon { flex: none; width: 1.15em; height: auto; margin-top: 0.12em; }
@media (min-width: 900px) { .home .links-list { grid-template-columns: 1fr 1fr; gap: var(--s64); } }

/* "Coming soon" note for links that aren't open yet */
.soon-toast { position: fixed; z-index: 60; left: 50%; bottom: var(--s40); transform: translate(-50%, 16px); padding: var(--s8) var(--s24);
  background: var(--amber); color: var(--on-amber); font-weight: 600; border-radius: var(--radius); opacity: 0; pointer-events: none;
  transition: opacity 180ms, transform 180ms; }
.soon-toast.on { opacity: 1; transform: translate(-50%, 0); }
.soon-toast:empty { visibility: hidden; }

/* signup spam trap: off screen, never seen by people */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* reduced motion (often just Windows animations switched off): the same moves, slower */
@media (prefers-reduced-motion: reduce) {
  .form-sheet.is-received .received { animation-duration: 1ms; }
}
