/* 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: #FFFFFF;
  --surface: #F8F9FA;
  --brand: #2DB7CB;
  --brand-soft: #1A2F60;
  --brand-glow: rgba(45, 183, 203, 0.15);
  --text: #111111;
  --text-muted: #555555;
  --border: #E5E7EB;
  --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(--brand);
  text-decoration: none;
}

body.landing a:hover {
  color: var(--brand-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: var(--text);
  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;
}

/* ── Site nav ──────────────────────────────────────────── */

body.landing .site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
}

body.landing .site-nav-brand {
  font-family: var(--serif);
  font-size: 24px;
  color: var(--brand-soft);
}

body.landing .site-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

body.landing .site-nav-links a {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

body.landing .site-nav-links a:hover {
  color: var(--brand);
}

body.landing .site-nav-cta {
  font-size: 14px !important;
  padding: 10px 22px !important;
  color: #FFFFFF !important;
}

@media (max-width: 700px) {
  body.landing .site-nav {
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px;
  }

  body.landing .site-nav-links {
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

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

body.landing .cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-soft) 100%);
  color: #FFFFFF;
  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: linear-gradient(135deg, var(--brand-soft) 0%, var(--brand) 100%);
  color: #FFFFFF;
  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(--brand-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 var(--brand-glow);
  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(--brand);
  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(--brand);
  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(--brand);
}

/* ── Stat row ──────────────────────────────────────────── */

body.landing .stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}

body.landing .stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 20px;
  text-align: center;
}

body.landing .stat-card .icon {
  color: var(--brand);
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
}

body.landing .stat-number {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.1;
  color: var(--brand);
  margin: 0 0 6px;
}

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

/* ── Benefits grid ─────────────────────────────────────── */

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

body.landing .benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px 24px;
}

body.landing .benefit-icon {
  color: var(--brand);
  margin-bottom: 14px;
}

body.landing .benefit-icon .icon {
  width: 32px;
  height: 32px;
}

body.landing .benefit-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 8px;
}

body.landing .benefit-card p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* Inline icon in pricing feature list */
body.landing .pricing-features li .icon {
  color: var(--brand);
  width: 20px;
  height: 20px;
  vertical-align: -4px;
  margin-right: 8px;
}

/* ── 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(--brand);
  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(--brand);
  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(--brand);
  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;
}

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

body.landing .hero-eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin: 0 0 20px;
}

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

body.landing .price-unit {
  font-size: 32px;
  color: var(--text-muted);
}

/* ── Comparison table ──────────────────────────────────── */

body.landing .comparison-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.landing .comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  min-width: 640px;
}

body.landing .comparison-table th,
body.landing .comparison-table td {
  padding: 16px 20px;
  text-align: left;
  border: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

body.landing .comparison-table thead th {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  color: var(--text);
}

body.landing .comparison-table tbody th {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

/* Highlight the StoryDocs column */
body.landing .comparison-table .is-us {
  background: var(--brand-glow);
  color: var(--text);
  border-color: var(--brand);
}

body.landing .comparison-table thead .is-us {
  color: var(--brand);
}

body.landing .comparison-pullquote {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.4;
  color: var(--text);
  text-align: center;
  max-width: 720px;
  margin: 48px auto 0;
}

/* ── 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 .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

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

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

  body.landing .comparison-pullquote {
    font-size: 21px;
  }
}
