/* ============================================================
   HUNTERWHEATON.COM — The Film Room
   Drenched-pine editorial. Anton display / Barlow text.
   One amber moment per composition.
   ============================================================ */

:root {
  --pine: #0E0B14;
  --pine-deep: #08060D;
  --pine-line: rgba(197, 178, 232, 0.14);
  --ink: #08060C;
  --chalk: #ECE8F2;
  --chalk-dim: rgba(236, 232, 242, 0.78);
  --amber: #8B5CF6;
  --tape: #9B8FB5;
  --slate: #6E6580;
  --chalk-line: rgba(20, 19, 17, 0.16);

  --font-display: "Gloock", Georgia, serif;
  --font-text: "Source Serif 4", Georgia, serif;
  --font-label: "Barlow Condensed", "Arial Narrow", sans-serif;

  --step-0: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --step-1: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem);
  --step-2: clamp(1.75rem, 1.4rem + 1.7vw, 2.6rem);
  --step-3: clamp(2.4rem, 1.8rem + 3vw, 4rem);
  --step-4: clamp(3rem, 2rem + 5.2vw, 5.4rem);

  --space: clamp(5.5rem, 11vw, 9.5rem);
  --wrap: min(1200px, 92vw);

  --z-nav: 30;
  --z-chrome: 2;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--pine);
  color: var(--chalk);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--amber); color: var(--ink); }

.wrap { width: var(--wrap); margin-inline: auto; }

/* ---------- shared type devices ---------- */

.tag {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tape);
}

.eyebrow {
  display: block;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.9rem;
}

.marker {
  width: 64px;
  height: 4px;
  background: var(--amber);
  margin: 1.1rem 0 1.6rem;
}

h1, .h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.002em;
  text-wrap: balance;
}

.h2 {
  font-size: var(--step-3);
  line-height: 1.08;
  max-width: 16ch;
}

p { max-width: 62ch; }

.btn {
  display: inline-block;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2.1rem;
  border-radius: 3px;
  transition: transform 0.25s var(--ease-out), filter 0.25s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }

.btn--amber { background: var(--amber); color: var(--ink); }

.btn--ghost {
  border: 1px solid var(--pine-line);
  color: var(--chalk);
}
.btn--ghost:hover { border-color: var(--chalk); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  background: var(--pine);
  border-bottom: 1px solid var(--pine-line);
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 0.85rem;
}

.brand { display: block; color: var(--chalk); transition: color 0.25s var(--ease-out); }
.brand svg { height: 15px; width: auto; display: block; }
.brand:hover { color: var(--amber); }

.nav nav { margin-left: auto; }

.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tape);
  transition: color 0.2s var(--ease-out);
}
.nav-links a:hover { color: var(--chalk); }

.nav .btn { padding: 0.6rem 1.3rem; font-size: 0.85rem; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: calc(100svh - 62px);
  display: flex;
  align-items: center;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0 119px,
    var(--pine-line) 119px 120px
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.9fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}

.hero-kick { color: var(--amber); }

h1 {
  font-size: var(--step-4);
  line-height: 1.02;
  margin-bottom: 1.4rem;
}

.h1-line { display: block; }

.hero-tagline {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.35;
  max-width: 28ch;
  margin-bottom: 1.1rem;
}

.hero-thesis {
  color: var(--chalk-dim);
  max-width: 54ch;
  margin-bottom: 2.2rem;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.hero-alt {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--tape);
  text-decoration: none;
  border-bottom: 1px solid var(--pine-line);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.hero-alt:hover { color: var(--chalk); border-color: var(--chalk); }

.hero-film { position: relative; }

.hero-frame {
  position: relative;
  border: 1px solid var(--pine-line);
  background: var(--pine-deep);
  padding: 10px;
}

.hero-frame img { filter: contrast(1.02); }

.hero-frame .vsl-rec,
.hero-frame-tc {
  position: absolute;
  z-index: var(--z-chrome);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--pine-deep);
  padding: 0.3rem 0.65rem;
}

.hero-frame .vsl-rec { top: 20px; left: 20px; color: var(--chalk); position: absolute; }
.hero-frame .vsl-rec b { color: var(--amber); margin-right: 0.3rem; }
.hero-frame-tc { bottom: 20px; right: 20px; color: var(--tape); }

.hero-frame-cap {
  margin-top: 0.8rem;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--tape);
}

.side-label {
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: rotate(90deg) translateX(-50%);
  transform-origin: right top;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tape);
  opacity: 0.55;
  white-space: nowrap;
}

/* hero load choreography (time-based, never gates visibility) */
@media (prefers-reduced-motion: no-preference) {
  html.js .hero-kick,
  html.js .hero .marker,
  html.js .h1-line,
  html.js .hero-tagline,
  html.js .hero-thesis,
  html.js .hero-cta,
  html.js .hero-film {
    animation: rise 0.9s var(--ease-out) both;
  }
  html.js .hero .marker { animation-name: grow; animation-delay: 0.1s; }
  html.js .h1-line:nth-child(1) { animation-delay: 0.16s; }
  html.js .h1-line:nth-child(2) { animation-delay: 0.26s; }
  html.js .hero-tagline { animation-delay: 0.4s; }
  html.js .hero-thesis { animation-delay: 0.5s; }
  html.js .hero-cta { animation-delay: 0.6s; }
  html.js .hero-film { animation-delay: 0.45s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes grow {
  from { width: 0; }
  to { width: 64px; }
}

/* ---------- sections ---------- */

.sec { padding-block: var(--space); }

.sec--chalk {
  background: #171226;
  color: var(--chalk);
  border-top: 1px solid var(--pine-line);
}
.sec--chalk .tag { color: var(--tape); }
.sec--chalk p { color: var(--chalk-dim); }

.sec--film { border-top: 1px solid var(--pine-line); }

/* ---------- film room (VSL) ---------- */

.film-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.6fr;
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: start;
}

.film-side .eyebrow { margin-bottom: 0.4rem; }
.film-side .tag { display: block; margin-bottom: 1.2rem; }
.film-side p { color: var(--chalk-dim); font-size: 1.05rem; }

.vsl-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--pine-deep);
  border: 1px solid var(--pine-line);
}

.vsl-frame.has-embed { border: none; background: #000; }
.vsl-embed, .vsl-embed iframe { width: 100%; height: 100%; aspect-ratio: 16 / 9; border: 0; }

.vsl-rec, .vsl-tc {
  position: absolute;
  z-index: var(--z-chrome);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tape);
}
.vsl-rec { top: 1.1rem; left: 1.2rem; color: var(--chalk); }
.vsl-rec b { color: var(--amber); margin-right: 0.35rem; }
.vsl-tc { bottom: 1.1rem; right: 1.2rem; }

.vsl-inner {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.vsl-inner .big {
  font-family: var(--font-display);
  font-size: var(--step-2);
  margin-bottom: 0.5rem;
}

.cold-open {
  margin-top: 2rem;
  border-top: 1px solid var(--pine-line);
  padding-top: 1.6rem;
}
.cold-open .tag { display: block; margin-bottom: 0.7rem; color: var(--amber); }
.cold-open p {
  color: var(--chalk-dim);
  font-size: 1.05rem;
  max-width: 68ch;
}

/* ---------- magnet ---------- */

.magnet-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.magnet-copy .h2 { margin-bottom: 1.5rem; }

.promise { font-size: 1.15rem; font-weight: 500; margin-bottom: 1rem; }
.promise-sub { color: var(--tape); }

.rules { margin-bottom: 2rem; }

.rule {
  border-top: 1px solid var(--pine-line);
  padding: 1.05rem 0;
}
.rule:last-of-type { border-bottom: 1px solid var(--pine-line); }
.rule .tag { display: block; margin-bottom: 0.25rem; }
.rule p { font-weight: 600; font-size: 1.08rem; }

.rules-more {
  margin-top: 0.9rem;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--tape);
}

.magnet-form {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.magnet-form input {
  flex: 1 1 220px;
  font-family: var(--font-text);
  font-size: 1rem;
  color: var(--chalk);
  background: transparent;
  border: 1px solid var(--pine-line);
  border-radius: 3px;
  padding: 0.95rem 1.1rem;
}
.magnet-form input::placeholder { color: var(--tape); }

.form-note { margin-top: 0.9rem; font-size: 0.92rem; color: var(--tape); }
.form-note a { color: var(--chalk); }

/* ---------- the read (mechanisms) ---------- */

.mech-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.mech {
  border-top: 1px solid var(--pine-line);
  padding: clamp(1.8rem, 3.5vw, 2.8rem) 0;
}
.mech:last-child { border-bottom: 1px solid var(--pine-line); }

.mech:nth-child(2) > div { margin-left: clamp(0rem, 8vw, 7rem); }
.mech:nth-child(3) > div { margin-left: clamp(0rem, 16vw, 14rem); }

.mech .tag { display: block; margin-bottom: 0.6rem; }

.mech h3 {
  font-size: var(--step-2);
  line-height: 1.12;
  margin-bottom: 0.9rem;
}

.mech p { color: var(--chalk-dim); max-width: 58ch; }

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.about-quote blockquote {
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.1;
  letter-spacing: 0.01em;
  max-width: 14ch;
  text-wrap: balance;
}

.about-body .eyebrow { color: var(--amber); }
.about-body p { margin-bottom: 1.1rem; }
.about-body .btn { margin-top: 0.8rem; }

/* ---------- scoreboard ---------- */

.board-head { margin-bottom: clamp(2.2rem, 4.5vw, 3.5rem); }

.notice {
  margin-top: 1.4rem;
  border: 1px dashed var(--pine-line);
  padding: 0.9rem 1.2rem;
  color: var(--tape);
  font-size: 0.98rem;
  max-width: 56ch;
}
.notice strong { color: var(--chalk); font-weight: 600; }

.wall {
  columns: 3 260px;
  column-gap: 1.1rem;
}

.tile {
  position: relative;
  break-inside: avoid;
  background: var(--chalk);
  color: var(--ink);
  border-radius: 4px;
  padding: 1rem 1.1rem 1.2rem;
  margin-bottom: 1.1rem;
  overflow: hidden;
}

.tile-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.75rem;
  display: grid;
  place-items: center;
}

.tile-name { font-weight: 700; font-size: 0.92rem; }
.tile-meta {
  margin-left: auto;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
}

.bub {
  background: rgba(139, 92, 246, 0.10);
  border-radius: 3px 12px 12px 12px;
  padding: 0.55rem 0.8rem;
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 0.45rem;
  width: fit-content;
  max-width: 100%;
}

.bub--hw {
  background: var(--ink);
  color: var(--chalk);
  border-radius: 12px 3px 12px 12px;
  margin-left: auto;
}

.stamp {
  position: absolute;
  top: 0.55rem;
  right: -1.9rem;
  transform: rotate(32deg);
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.18rem 2.2rem;
  opacity: 0.92;
}

/* ---------- final CTA ---------- */

.sec--cta {
  border-top: 1px solid var(--pine-line);
  text-align: center;
}

.sec--cta .marker { margin-inline: auto; }
.sec--cta .h2 { margin-inline: auto; margin-bottom: 1.3rem; }
.sec--cta p { margin-inline: auto; color: var(--chalk-dim); margin-bottom: 2rem; }
.sec--cta .tag { display: block; margin-top: 1.2rem; }

/* ---------- footer ---------- */

.foot {
  background: var(--ink);
  padding-block: 3rem 2rem;
}

.foot-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.foot-brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.foot-brand .tag { display: block; margin-top: 0.3rem; color: var(--amber); }

.foot-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  flex-wrap: wrap;
}
.foot-links a {
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tape);
  transition: color 0.2s var(--ease-out);
}
.foot-links a:hover { color: var(--chalk); }

.foot-legal { color: var(--slate); font-size: 0.88rem; }

/* ---------- reveal on scroll (JS-gated: full content without JS) ---------- */

html.js .rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
html.js .rv.in {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .rv { opacity: 1; transform: none; transition: none; }
  .btn, .nav-links a, .foot-links a, .hero-alt, .brand { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-film { max-width: 560px; }
  .film-grid, .magnet-grid, .about-grid { grid-template-columns: 1fr; }
  .mech:nth-child(2) > div, .mech:nth-child(3) > div { margin-left: 0; }
  .side-label { display: none; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav .wrap { gap: 1rem; }
  .wall { columns: 1; }
  .about-quote blockquote, .h2 { max-width: none; }
}
