/* =========================================================================
   editorial.css — intentional top-layer polish (Anthropic-style).
   Loads LAST so these refinements win the cascade. Foundation = tokens.css.
   ========================================================================= */

/* ---- Missing scale/responsive utilities the templates already reference ---- */
.text-5xl { font-size: 3rem;    line-height: 1.08; }
.text-6xl { font-size: 3.75rem; line-height: 1.04; }
@media (min-width: 640px) {
  .sm\:text-5xl { font-size: 3rem;   line-height: 1.08; }
  .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 1024px) {
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1.04; }
}

/* ---- The single orchestrated page-load reveal (fade + gentle rise) ---- */
@keyframes heroReveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.animate-fade-in         { animation: heroReveal .6s cubic-bezier(.16,1,.3,1) .00s both; }
.animate-fade-in-delay-1 { animation: heroReveal .6s cubic-bezier(.16,1,.3,1) .08s both; }
.animate-fade-in-delay-2 { animation: heroReveal .6s cubic-bezier(.16,1,.3,1) .16s both; }
.animate-fade-in-delay-3 { animation: heroReveal .6s cubic-bezier(.16,1,.3,1) .24s both; }
.animate-fade-in-delay-4 { animation: heroReveal .6s cubic-bezier(.16,1,.3,1) .32s both; }

/* =========================== Hero =========================== */
.hero { padding: var(--s-7) 1rem var(--s-4); }

.hero-eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 var(--s-2);
}

.hero-title {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  color: var(--ink);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.25rem);
  line-height: 1.07;
  letter-spacing: -0.021em;
  max-width: 900px;
  margin: 0 auto var(--s-3);
}

/* Brand moment: the keyword carries the one accent in the headline */
.hero-title .highlight {
  display: inline-block;
  color: var(--accent);
  margin-top: 0.25rem;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto var(--s-4);
}

.hero-cta-row {
  display: flex;
  gap: var(--s-2);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--s-2);
}

.btn-lg { padding: 0.9rem 1.6rem; font-size: 1.0625rem; }

.trusted-by { margin-top: var(--s-2); margin-bottom: var(--s-5); }

.hero-video { margin-top: var(--s-4); }
.hero-video-player { box-shadow: var(--shadow-lg); border-radius: var(--r-xl); }

/* =========================== Section rhythm =========================== */
.features-showcase,
.home-faq,
.pricing { padding-block: var(--s-7); }

.showcase-text > h2,
.pricing-header h2,
.home-faq-header h2,
.cta h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.pricing-header p,
.home-faq-header p { color: var(--muted); }

/* Quiet CTA band to close the page */
.cta {
  padding-block: var(--s-7);
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cta p { color: var(--muted); }

/* =========================== Buttons (shared) =========================== */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  font-weight: 500;
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease;
}
.btn-secondary:hover { background: var(--bg-sunken); border-color: var(--muted-faint); color: var(--ink); }

.btn-primary, .nav-cta, .form-btn-purple, .btn-secondary { border-radius: var(--r-md); }

/* =========================== Pricing cards =========================== */
.pricing-card { background: var(--surface-raised); }
.pricing-card.featured { transform: none; }

/* =========================== Cards / showcase media =========================== */
.step-media-card,
.feature-card { border-radius: var(--r-lg); }

/* =========================== Footer =========================== */
.footer {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }
.footer h4 { color: var(--ink-soft); font-family: var(--font-sans); }

@media (max-width: 640px) {
  .hero { padding: var(--s-5) 1rem var(--s-3); }
  .features-showcase, .home-faq, .pricing, .cta { padding-block: var(--s-5); }
}

/* =========================================================================
   v2 — SPATIAL REFINEMENT. Generous, intentional negative space; an
   alternating editorial showcase; a real type scale; subtle atmosphere.
   This block intentionally overrides the inherited (cramped) spacing.
   ========================================================================= */

/* ---- Atmosphere: one soft warm-purple bloom behind the hero, nothing loud ---- */
.grid-background { isolation: isolate; }
.grid-background::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 760px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 460px at 50% -120px, rgba(106, 76, 156, 0.10), transparent 70%),
    radial-gradient(680px 380px at 88% 60px, rgba(106, 76, 156, 0.05), transparent 70%);
}

/* ---- Generous, committed section rhythm (was 4rem everywhere) ---- */
.features-showcase { padding-top: var(--s-5); padding-bottom: clamp(var(--s-6), 9vw, var(--s-8)); }
.pricing           { padding-block: clamp(var(--s-6), 7.5vw, 106px); }
.home-faq          { padding-block: clamp(var(--s-6), 7.5vw, 106px); }
.cta               { padding-block: clamp(var(--s-6), 7.5vw, 106px); }
.container         { max-width: 1180px; }

/* ---- Hero: more air, tighter measure, a touch larger ---- */
.hero { padding: clamp(var(--s-6), 7.5vw, 112px) 1.5rem var(--s-4); }
.hero-content { max-width: 1100px; }
.hero-title { font-size: clamp(2.85rem, 6.2vw, 4.6rem); margin-bottom: var(--s-4); max-width: 18ch; }
.hero-subtitle { font-size: clamp(1.1rem, 2.2vw, 1.32rem); max-width: 600px; margin-bottom: var(--s-5); }
.hero-eyebrow { margin-bottom: var(--s-3); }
.trusted-by { margin-bottom: var(--s-6); }
.hero-video { max-width: 1080px; margin-top: var(--s-2); }
.hero-video-player {
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255,255,255,.6), var(--shadow-lg);
}

/* ============================ Section headers ============================ */
.showcase-header { max-width: 720px; margin: 0 auto 80px; text-align: center; }
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 var(--s-2);
}
.showcase-header h2,
.pricing-header h2,
.home-faq-header h2 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.021em;
  color: var(--ink);
  margin: 0 auto var(--s-2);
  max-width: 16ch;
}
.section-lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto;
}
.pricing-header, .home-faq-header { margin-bottom: var(--s-5); }

/* ===================== Alternating two-column showcase ===================== */
.feature-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--s-6), 7.5vw, 112px);
  max-width: 1140px;
  margin: 0 auto;
}
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.feature-row:nth-child(even) .feature-step { order: 2; }

/* Copy column */
.feature-row .feature-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  text-align: left;
  max-width: 30rem;
}
.feature-row .step-number {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: var(--r-pill);
  background: var(--accent-tint);
  color: var(--accent-ink);
  border: 1px solid var(--accent-tint-border);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.15rem;
}
.feature-row .step-content { display: block; }
.feature-row .step-content h3,
.feature-row .step-header-with-badge h3 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 var(--s-1);
}
.feature-row .step-header-with-badge { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.feature-row .step-content > p {
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 var(--s-2);
  max-width: 44ch;
}
.feature-row .step-detail { margin-top: var(--s-1); }
.editor-features { display: grid; gap: .7rem; margin-top: var(--s-2); }
.editor-feature-item,
.step-detail-caption,
.step-detail-text {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink-soft);
  font-size: .98rem;
  font-weight: 500;
}
.editor-feature-item svg,
.step-detail-caption svg,
.step-detail-text svg { color: var(--accent); flex-shrink: 0; }

/* Media column */
.feature-row .step-media-card { margin: 0; padding: 0; width: 100%; }
.step-media-wrapper {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.step-media-preview { display: block; width: 100%; height: auto; }
.step-media-label {
  gap: var(--s-2);
  padding: var(--s-3);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.step-media-label .label-icon {
  width: 2.4rem; height: 2.4rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-md);
  background: var(--accent-tint);
  color: var(--accent-ink);
}
.step-media-label h4 {
  font-family: var(--font-sans);
  font-size: 1rem; font-weight: 600; color: var(--ink); margin: 0 0 .15rem;
}
.step-media-label p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.5; }

@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; gap: var(--s-3); }
  .feature-row:nth-child(even) .feature-step { order: 0; }
  .feature-row .feature-step { max-width: none; }
  .feature-rows { gap: var(--s-6); }
}

/* ============================== Pricing ============================== */
.pricing-grid { gap: clamp(1.25rem, 3vw, 2rem); max-width: 1040px; margin: 0 auto; }
.pricing-card { padding: clamp(1.75rem, 3vw, 2.5rem); }
.pricing-card h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.5rem; color: var(--ink); }
.pricing-card .amount { font-family: var(--font-serif); font-weight: 600; letter-spacing: -0.02em; }
.pricing-card.featured { box-shadow: var(--shadow-lg); }

/* ============================== FAQ ============================== */
.home-faq { background: var(--bg-sunken); }
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { font-size: 1.075rem; font-weight: 500; color: var(--ink); padding-block: var(--s-3); }
.faq-question .icon { color: var(--accent); }

/* ============================== CTA ============================== */
.cta h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); max-width: 18ch; margin-inline: auto; }
.cta p { font-size: 1.12rem; max-width: 46ch; margin: var(--s-2) auto var(--s-4); }

/* ============================== Brand wordmark ==============================
   The header (and footer) wordmark uses the editorial serif so it matches the
   Fraunces headlines rather than the Inter body. */
.nav-logo-text,
.footer-logo span {
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.nav-logo-text { font-size: clamp(1.2rem, 2.6vw, 1.6rem); }

/* Fix: `.charts-table a { color: var(--primary) }` (misc.css) outranks .btn-primary,
   which painted the empty-state CTA text purple-on-purple (invisible). Restore it
   for the button only; the table's other links stay accent-colored. */
.charts-table .btn-primary,
.charts-table .btn-primary:hover {
  color: var(--on-accent);
  text-decoration: none;
}

/* =========================================================================
   Mobile — appended LAST so it overrides the v2 desktop type scale. The big
   hero/section headlines must shrink on narrow screens or they overflow and
   widen the page (which clipped the centered hero on phones).
   ========================================================================= */
@media (max-width: 640px) {
  .hero { padding: var(--s-5) 1.25rem var(--s-3); }
  .hero-content { max-width: 100%; }
  .hero-title {
    font-size: clamp(2rem, 8.6vw, 2.7rem);
    max-width: 100%;
    letter-spacing: -0.015em;
  }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-eyebrow { letter-spacing: .12em; }

  .showcase-header,
  .pricing-header,
  .home-faq-header { margin-bottom: var(--s-5); }
  .showcase-header h2,
  .pricing-header h2,
  .home-faq-header h2 { font-size: clamp(1.7rem, 7.2vw, 2.2rem); max-width: 100%; }
  .cta h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); }

  .feature-rows { gap: var(--s-6); }
  .features-showcase, .home-faq, .pricing, .cta { padding-block: var(--s-5); }

  /* Word-break guard so no long token can force horizontal scroll */
  .hero-title, .showcase-header h2, .pricing-header h2, .home-faq-header h2, .cta h2 {
    overflow-wrap: break-word;
  }
}
