/* =========================================================
   Generative History — Design System
   One job: turn a visitor into a YouTube viewer, then subscriber.
   ========================================================= */

/* ---- Tokens ---- */
:root {
  /* Color */
  --ink:        #0A0A0A;   /* near-black background */
  --ink-2:      #111114;   /* raised surfaces */
  --ink-3:      #17171b;   /* cards */
  --gold:       #C9A24B;   /* antique gold from the logo */
  --gold-soft:  #d9b96e;
  --gold-dim:   rgba(201,162,75,.18);
  --paper:      #F4F1EA;   /* off-white body text */
  --muted:      #a7a39a;   /* secondary text */
  --line:       rgba(244,241,234,.10);
  --yt:         #FF0033;   /* YouTube-red watch action */
  --yt-hover:   #ff2b52;

  /* Type */
  --display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --serif:   "Playfair Display", Georgia, serif;
  --body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --header-h: 68px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---- Type scale ---- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: .005em; }
.eyebrow {
  font-family: var(--display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: .78rem;
  color: var(--gold);
}
.logline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--paper);
  line-height: 1.32;
}

/* ---- Layout helpers ---- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3.5rem, 9vw, 7rem); }
.section--tight { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.center { text-align: center; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 56ch; }
.center .lead { margin-inline: auto; }

/* Gold star divider (echoes the logo motif) */
.divider {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  margin: 1.4rem auto; max-width: 360px; color: var(--gold);
}
.divider::before, .divider::after {
  content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}
.divider span { font-size: 1.1rem; line-height: 1; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  font-size: .95rem;
  padding: .85rem 1.5rem; border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn .play { font-size: .85em; }

/* Primary = the Watch action (YouTube red) */
.btn--watch {
  background: var(--yt); color: #fff;
  box-shadow: 0 10px 30px rgba(255,0,51,.30);
}
.btn--watch:hover { background: var(--yt-hover); transform: translateY(-2px); box-shadow: 0 14px 38px rgba(255,0,51,.42); }

/* Gold = subscribe / secondary strong */
.btn--gold { background: var(--gold); color: #1a1407; }
.btn--gold:hover { background: var(--gold-soft); transform: translateY(-2px); }

/* Ghost */
.btn--ghost { background: transparent; color: var(--paper); border-color: rgba(244,241,234,.34); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.02rem; }
.btn--block { width: 100%; justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }
.center .btn-row { justify-content: center; }

/* =========================================================
   Header (sticky, persistent Watch CTA)
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(10,10,10,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.site-header.scrolled { background: rgba(10,10,10,.92); border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand img { height: 34px; width: auto; }
.brand .brand-text { font-family: var(--display); font-weight: 700; letter-spacing: .04em; font-size: 1.02rem; text-transform: uppercase; }
.brand .brand-text b { color: var(--gold); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a.navlink {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .12em;
  font-size: .82rem; color: var(--muted); transition: color .2s ease;
}
.nav a.navlink:hover, .nav a.navlink[aria-current="page"] { color: var(--paper); }
.nav .btn { padding: .55rem 1.05rem; font-size: .82rem; }
.nav-links { display: flex; align-items: center; gap: 1.6rem; }

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; isolation: isolate; }
.hero--film { min-height: 88svh; }
.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10,10,10,.55) 0%, rgba(10,10,10,.25) 40%, rgba(10,10,10,.85) 100%),
    linear-gradient(90deg, rgba(10,10,10,.80) 0%, rgba(10,10,10,.30) 60%, rgba(10,10,10,.10) 100%);
}
.hero .wrap { padding-block: clamp(3rem, 10vh, 7rem); }
.hero__inner { max-width: 760px; }
.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5.4rem);
  text-transform: uppercase;
  text-shadow: 0 2px 30px rgba(0,0,0,.6);
  margin-top: 1rem;
}
.hero h1 .accent { color: var(--gold); display: block; }
.hero__sub { margin-top: 1.4rem; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--paper); max-width: 50ch; }
.hero__sub em { color: var(--gold); font-style: normal; }
.hero .btn-row { margin-top: 2rem; }
.hero__meta { margin-top: 1.5rem; display: flex; gap: 1.4rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.hero__meta span { display: inline-flex; align-items: center; gap: .4rem; }
.hero__meta b { color: var(--paper); font-weight: 600; }

/* scroll cue */
.scroll-cue { position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: .4rem; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,6px);} }

/* =========================================================
   Hook section (big lines)
   ========================================================= */
.hook-lines { display: grid; gap: .35rem; }
.hook-lines p {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.5rem, 4.6vw, 2.9rem);
  line-height: 1.12; text-transform: uppercase; letter-spacing: .01em;
  color: var(--paper);
}
.hook-lines p .gold { color: var(--gold); }
.hook-lines p.dim { color: var(--muted); }

/* =========================================================
   Video facade (lazy YouTube)
   ========================================================= */
.video-embed {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  background: #000; cursor: pointer; border: 1px solid var(--line); box-shadow: var(--shadow);
}
.video-embed img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, filter .3s ease; }
.video-embed:hover img { transform: scale(1.04); filter: brightness(.85); }
.video-embed__play {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.video-embed__play::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(0,0,0,.15), rgba(0,0,0,.55));
}
.play-btn {
  position: relative; width: 84px; height: 84px; border-radius: 50%;
  background: var(--yt); display: grid; place-items: center;
  box-shadow: 0 10px 40px rgba(255,0,51,.5); transition: transform .2s ease, background .2s ease;
}
.video-embed:hover .play-btn { transform: scale(1.08); background: var(--yt-hover); }
.play-btn svg { width: 34px; height: 34px; fill: #fff; margin-left: 4px; }
.video-embed__label { position: absolute; left: 16px; bottom: 14px; right: 16px; z-index: 2; font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =========================================================
   Cards / grids
   ========================================================= */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.film-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--ink-3); border: 1px solid var(--line);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.film-card:hover { transform: translateY(-4px); border-color: var(--gold-dim); box-shadow: var(--shadow); }
.film-card__media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.film-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.film-card:hover .film-card__media img { transform: scale(1.06); }
.film-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem;
  padding: .3rem .6rem; border-radius: 6px; background: rgba(10,10,10,.7); color: var(--gold); border: 1px solid var(--gold-dim);
}
.film-card__badge--soon { color: var(--muted); }
.film-card__body { padding: 1.1rem 1.2rem 1.3rem; }
.film-card__title { font-size: 1.25rem; text-transform: uppercase; }
.film-card__hook { color: var(--muted); font-size: .94rem; margin-top: .45rem; }
.film-card__meta { margin-top: .8rem; font-family: var(--display); letter-spacing: .1em; text-transform: uppercase; font-size: .74rem; color: var(--gold); display: flex; gap: .9rem; }
.film-card.is-soon { pointer-events: none; }
.film-card.is-soon .film-card__media img { filter: grayscale(.5) brightness(.5); }

/* Discover bullets (curiosity gaps) */
.discover { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.discover__item { background: var(--ink-3); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; position: relative; overflow: hidden; }
.discover__item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold); opacity: .8; }
.discover__num { font-family: var(--display); color: var(--gold-dim); font-size: 2.4rem; font-weight: 700; line-height: 1; }
.discover__item h3 { font-size: 1.18rem; text-transform: uppercase; margin-top: .3rem; }
.discover__item p { color: var(--muted); font-size: .94rem; margin-top: .5rem; }

/* Series parts list */
.parts { display: grid; gap: .8rem; }
.part {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.1rem;
  padding: 1rem 1.2rem; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.part:hover { border-color: var(--gold-dim); background: var(--ink-3); transform: translateX(3px); }
.part__no { font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: var(--gold); width: 2.2rem; text-align: center; }
.part__title { font-family: var(--display); text-transform: uppercase; letter-spacing: .04em; font-size: 1.05rem; }
.part__title small { display: block; font-family: var(--body); text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .85rem; font-weight: 400; margin-top: .15rem; }
.part__cta { color: var(--gold); font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: .76rem; white-space: nowrap; }

/* Split feature (image + text) */
.split { display: grid; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; grid-template-columns: 1fr 1fr; }
.split--rev .split__media { order: 2; }
.split__media img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); width: 100%; }
.split__body h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); text-transform: uppercase; }
.split__body p { color: var(--muted); margin-top: 1rem; }

/* =========================================================
   Email capture
   ========================================================= */
.capture {
  background:
    linear-gradient(rgba(10,10,10,.78), rgba(10,10,10,.92)),
    var(--cap-img, none);
  background-size: cover; background-position: center;
  border-block: 1px solid var(--line);
}
.capture__card { max-width: 620px; margin-inline: auto; text-align: center; }
.capture h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); text-transform: uppercase; }
.email-form { display: flex; gap: .6rem; margin-top: 1.5rem; flex-wrap: wrap; }
.email-form input[type=email] {
  flex: 1 1 240px; min-width: 0;
  background: var(--ink-2); border: 1.5px solid var(--line); color: var(--paper);
  padding: .9rem 1.1rem; border-radius: 999px; font-size: 1rem;
}
.email-form input[type=email]:focus { outline: none; border-color: var(--gold); }
.email-form input::placeholder { color: var(--muted); }
.form-note { margin-top: .8rem; font-size: .8rem; color: var(--muted); }
.form-success { margin-top: 1rem; color: var(--gold); font-weight: 600; display: none; }
.email-form.is-done + .form-success { display: block; }
.email-form.is-done { display: none; }

/* =========================================================
   Sticky mobile watch bar
   ========================================================= */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(10,10,10,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: none;
  transform: translateY(110%); transition: transform .3s ease;
}
.mobile-cta.show { transform: translateY(0); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { border-top: 1px solid var(--line); background: var(--ink-2); padding-block: 3rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
.site-footer .brand img { height: 40px; }
.footer-col h4 { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; color: var(--gold); margin-bottom: .9rem; }
.footer-col a { display: block; color: var(--muted); font-size: .92rem; padding: .25rem 0; transition: color .2s ease; }
.footer-col a:hover { color: var(--paper); }
.footer-bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .82rem; }

/* =========================================================
   About
   ========================================================= */
.prose { max-width: 64ch; }
.prose p { color: var(--paper); margin-bottom: 1.1rem; }
.prose p.lead { color: var(--muted); }

/* =========================================================
   Scroll reveal
   ========================================================= */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .split, .split--rev .split__media { grid-template-columns: 1fr; order: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }            /* collapse text links on mobile; Watch stays */
  .mobile-cta { display: block; }
  .hero .btn-row .btn--watch { display: none; } /* avoid duplicate with sticky bar */
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
  .btn { width: 100%; justify-content: center; }
  .hero .btn-row { flex-direction: column; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
