/* StoryDocsAI landing page.
   Everything is scoped under body.landing because the internal tool's layout
   uses stylesheet_link_tag :app, which globs every file in this directory. */

html:has(body.landing) {
  scroll-behavior: smooth;
}

body.landing {
  --bg: #0F0F0F;
  --surface: #1A1A1A;
  --gold: #C9A84C;
  --gold-soft: #D4B96B;
  --gold-glow: rgba(201, 168, 76, 0.15);
  --text: #F5F0E8;
  --text-muted: #9A9590;
  --border: #2A2520;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: "Proxima Nova", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Film grain — felt, not seen */
body.landing::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 9999;
}

body.landing a {
  color: var(--gold);
  text-decoration: none;
}

body.landing a:hover {
  color: var(--gold-soft);
}

/* ── Layout primitives ─────────────────────────────────── */

body.landing .section {
  padding: 120px 24px;
}

body.landing .container {
  max-width: 800px;
  margin: 0 auto;
}

body.landing .container-wide {
  max-width: 960px;
  margin: 0 auto;
}

/* ── Typography ────────────────────────────────────────── */

body.landing h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 60px;
  line-height: 1.1;
  color: #FFFFFF;
  margin: 0 0 16px;
}

body.landing h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 40px;
}

body.landing h2.centered {
  text-align: center;
}

body.landing p {
  margin: 0 0 1em;
}

/* ── CTA button ────────────────────────────────────────── */

body.landing .cta-button {
  display: inline-block;
  background: var(--gold);
  color: #0F0F0F;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 48px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

body.landing .cta-button:hover {
  background: var(--gold-soft);
  color: #0F0F0F;
  transform: scale(1.02);
}

/* ── Hero ──────────────────────────────────────────────── */

body.landing .hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  position: relative;
}

body.landing .hero::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 90vw);
  height: 420px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

body.landing .hero-content {
  position: relative;
  max-width: 800px;
}

body.landing .hero-sub {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 16px auto 32px;
}

body.landing .hero-note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 16px 0 0;
}

body.landing .hero-social-proof {
  font-size: 13px;
  color: var(--text-muted);
  margin: 10px 0 0;
  opacity: 0.75;
}

/* ── Video embed ───────────────────────────────────────── */

body.landing .section-video {
  padding-top: 0;
}

body.landing .video-caption {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

body.landing .video-frame {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 80px rgba(201, 168, 76, 0.08);
  background: var(--surface);
}

body.landing .video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── The problem ───────────────────────────────────────── */

body.landing .problem {
  border-left: 3px solid var(--gold);
  padding-left: 32px;
}

body.landing .problem p {
  font-size: 21px;
  line-height: 1.7;
  color: var(--text-muted);
}

body.landing .problem .problem-punchline {
  color: var(--text);
  font-weight: 600;
  margin-bottom: 0;
}

/* ── Steps ─────────────────────────────────────────────── */

body.landing .steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

body.landing .step {
  padding: 0 32px;
}

body.landing .step:first-child {
  padding-left: 0;
}

body.landing .step:last-child {
  padding-right: 0;
}

body.landing .step + .step {
  border-left: 1px solid var(--border);
}

body.landing .step-number {
  display: block;
  font-family: var(--serif);
  font-size: 48px;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 16px;
}

body.landing .step p {
  color: var(--text-muted);
  margin: 0;
}

/* ── Prose (under the hood) ────────────────────────────── */

body.landing .prose p {
  color: var(--text-muted);
}

body.landing .prose p:last-child {
  color: var(--text);
  margin-bottom: 0;
}

/* ── Example gallery ───────────────────────────────────── */

body.landing .gallery-upcoming {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
}

body.landing .gallery-card {
  aspect-ratio: 16 / 9;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

body.landing .gallery-name {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--text);
}

body.landing .gallery-soon {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
}

/* ── Who this is for ───────────────────────────────────── */

body.landing .audience-block + .audience-block {
  margin-top: 56px;
}

body.landing .audience-block h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 0 0 12px;
}

body.landing .audience-block p {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* ── Pricing ───────────────────────────────────────────── */

body.landing .section-pricing {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

body.landing .price {
  font-family: var(--serif);
  font-size: 80px;
  line-height: 1;
  color: var(--gold);
  margin: 0 0 40px;
}

body.landing .pricing-included {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

body.landing .pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 40px;
}

body.landing .pricing-features li {
  color: var(--text-muted);
  padding: 6px 0;
}

body.landing .pricing-note {
  font-size: 14px;
  color: var(--text-muted);
  margin: 20px 0 0;
}

/* ── FAQ ───────────────────────────────────────────────── */

body.landing .faq details {
  border-bottom: 1px solid var(--border);
}

body.landing .faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

body.landing .faq summary::-webkit-details-marker {
  display: none;
}

body.landing .faq summary::after {
  content: "+";
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

body.landing .faq details[open] summary::after {
  transform: rotate(45deg);
}

body.landing .faq details p {
  color: var(--text-muted);
  margin: 0 0 20px;
  padding-right: 40px;
}

/* ── Footer ────────────────────────────────────────────── */

body.landing .footer {
  text-align: center;
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

body.landing .footer p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 8px;
}

body.landing .footer-brand {
  font-family: var(--serif);
  font-size: 20px;
  color: var(--text);
}

body.landing .footer-copy {
  margin-top: 24px;
}

/* ── Reveal on scroll ──────────────────────────────────── */
/* Hidden state only applies once the Stimulus controller connects
   (.reveal-ready), so content stays visible without JS. */

@media (prefers-reduced-motion: no-preference) {
  body.landing .reveal-ready {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  body.landing .reveal-ready.revealed {
    opacity: 1;
    transform: none;
  }
}

/* ── Mobile ────────────────────────────────────────────── */

@media (max-width: 768px) {
  body.landing {
    font-size: 17px;
  }

  body.landing .section {
    padding: 80px 24px;
  }

  body.landing h1 {
    font-size: 38px;
  }

  body.landing h1 br {
    display: none;
  }

  body.landing h2 {
    font-size: 30px;
    margin-bottom: 32px;
  }

  body.landing .hero {
    min-height: 85vh;
  }

  body.landing .hero-sub {
    font-size: 18px;
  }

  body.landing .cta-button {
    display: block;
    text-align: center;
    font-size: 16px;
    padding: 16px 24px;
  }

  body.landing .problem {
    padding-left: 20px;
  }

  body.landing .problem p {
    font-size: 19px;
  }

  body.landing .steps {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  body.landing .step,
  body.landing .step:first-child,
  body.landing .step:last-child {
    padding: 0;
  }

  body.landing .step + .step {
    border-left: none;
  }

  body.landing .gallery-upcoming {
    grid-template-columns: 1fr;
  }

  body.landing .audience-block p {
    font-size: 18px;
  }

  body.landing .price {
    font-size: 64px;
  }
}
