/* Sections used across pages */

/* Hero — split layout. Heading left, animated bug-catching stage right.
   Spacing tuned 2026-05-24 — hero-copy now fills its grid column instead of
   being constrained to ~300px by a ch-unit max-width on the parent. Individual
   constraints live on .lede only (for readability) and the SVG centers in
   its column instead of pushing right via margin-left:auto. */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-top: calc(var(--section-y) * 1.0);
  padding-bottom: calc(var(--section-y) * 0.7);
}
.hero-split .hero-copy {
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0; /* allow flex children to shrink correctly inside grid */
}
.hero-split .hero-copy .eyebrow { margin-bottom: -8px; }
.hero-split .hero-copy .h-display {
  /* Cap the headline font size in this context so the 50-char headline
     wraps into 2-3 punchy lines instead of fighting the column width.
     Default h-display clamp tops at 84px which produced 6-line cramping. */
  font-size: clamp(40px, 4.4vw, 60px);
  line-height: 1.04;
  /* No max-width — let the grid column be the constraint. */
}
.hero-split .hero-copy .lede { max-width: 44ch; font-size: clamp(17px, 1.3vw, 20px); }
.hero-split .hero-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.hero-split .hero-stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 480px;
  border-radius: var(--r-lg);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.hero-split .hero-stage::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, color-mix(in oklab, var(--rule) 80%, transparent) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(-45deg, color-mix(in oklab, var(--rule) 80%, transparent) 0 1px, transparent 1px 22px);
  opacity: .55;
  pointer-events: none;
}
.hero-stage .stage-tag {
  position: absolute; top: 16px; left: 16px;
}
.hero-stage .stage-arrow {
  position: absolute; right: 28px; bottom: 22px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 8px;
}
.hero-stage .stage-arrow .arrow-svg {
  width: 60px; height: 14px;
}

/* Hero — variant B: centered editorial. */
.hero-centered {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  padding-top: calc(var(--section-y) * 0.9);
  padding-bottom: calc(var(--section-y) * 0.4);
}
.hero-centered .h-display { max-width: 18ch; }
.hero-centered .lede { margin: 0 auto; }
.hero-centered .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-centered .hero-strip {
  margin-top: 56px;
  width: 100%;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase;
}
.hero-centered .hero-strip .center-mark {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}

/* Hero — variant C: asymmetric editorial. */
.hero-asym {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 48px;
  padding-top: calc(var(--section-y) * 0.7);
  padding-bottom: calc(var(--section-y) * 0.5);
  align-items: end;
}
.hero-asym .hero-left { display: flex; flex-direction: column; gap: 24px; }
.hero-asym .hero-left .h-display em { display: inline; }
.hero-asym .hero-meta {
  display: flex; flex-direction: column; gap: 18px;
  border-left: 1px solid var(--rule);
  padding-left: 28px;
  font-size: 14.5px;
  color: var(--ink-2);
}
.hero-asym .hero-meta .meta-row {
  display: flex; justify-content: space-between; padding-bottom: 14px; border-bottom: 1px dashed var(--rule);
  gap: 18px;
}
.hero-asym .hero-meta .meta-row:last-child { border-bottom: none; padding-bottom: 0; }
.hero-asym .hero-meta .meta-key {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.hero-asym .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-asym .hero-stage-strip {
  grid-column: 1 / -1;
  margin-top: 48px;
  border-top: 1px solid var(--rule);
  padding-top: 24px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 36px;
}
.hero-asym .strip-cell .strip-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: .1em;
}
.hero-asym .strip-cell .strip-title { font-weight: 600; margin-top: 4px; }
.hero-asym .strip-cell .strip-body { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 32ch; }

/* Flow diagram */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 48px;
}
.flow-step {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex; flex-direction: column; gap: 8px;
}
.flow-num { color: var(--accent); font-size: 12px; letter-spacing: .1em; }
.flow-label { font-weight: 600; font-size: 22px; letter-spacing: -0.015em; }
.flow-sub { color: var(--muted); font-size: 14.5px; max-width: 30ch; }
.flow-line {
  align-self: center;
  width: 56px; height: 2px;
  background: linear-gradient(to right, var(--rule) 0 8px, transparent 8px 16px) repeat-x;
  background-size: 16px 2px;
  margin-top: 36px;
}

/* Reasons-to-believe (RTB) grid — 3-up legacy + 4-up pain/receipt variant */
.rtb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
}
.rtb-grid-4 {
  grid-template-columns: repeat(2, 1fr);
}
.rtb-cell {
  padding: 32px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper);
}
.rtb-cell:nth-child(3n) { border-right: none; }
.rtb-cell:nth-last-child(-n+3) { border-bottom: none; }
.rtb-grid-4 .rtb-cell:nth-child(3n) { border-right: 1px solid var(--rule); }
.rtb-grid-4 .rtb-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--rule); }
.rtb-grid-4 .rtb-cell:nth-child(2n) { border-right: none; }
.rtb-grid-4 .rtb-cell:nth-last-child(-n+2) { border-bottom: none; }
.rtb-kicker { color: var(--accent); font-size: 12px; letter-spacing: .1em; }
.rtb-title { margin-top: 4px; }
.rtb-body { font-size: 15px; max-width: 32ch; }

/* Pain → Receipt structure (4-card variant) */
.rtb-pain, .rtb-receipt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
  padding-top: 6px;
}
.rtb-receipt {
  border-top: 1px dashed var(--rule);
  padding-top: 14px;
  margin-top: 2px;
}
.rtb-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.rtb-pain .rtb-label { color: var(--warn); }
.rtb-receipt .rtb-label { color: var(--accent-deep); }

/* VS table — native <table> with column widths via :nth-child */
.vs-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--paper);
  table-layout: fixed;
}
.vs-row { border-bottom: 1px solid var(--rule); }
.vs-table tbody tr:last-child { border-bottom: none; }
.vs-table thead tr { background: var(--paper-2); }
.vs-cell {
  padding: 14px 18px;
  font-size: 14.5px;
  border-right: 1px solid var(--rule);
  vertical-align: middle;
  text-align: left;
  line-height: 1.45;
}
.vs-table tr > *:last-child { border-right: none; }
.vs-cell.vs-label { font-weight: 500; }
.vs-cell.vs-us {
  background: color-mix(in oklab, var(--accent-soft) 60%, var(--paper));
  font-weight: 500;
  color: var(--accent-deep);
  text-align: center;
}
.vs-table tbody .vs-cell:not(.vs-label):not(.vs-us) {
  text-align: center;
}
/* Column widths — first column is the feature label, then 4 equal-ish columns */
.vs-table th:nth-child(1), .vs-table td:nth-child(1) { width: 36%; }
.vs-table th:not(:first-child), .vs-table td:not(:first-child) { width: 16%; }
.vs-yes { color: var(--ok); font-weight: 700; }
.vs-no { color: var(--muted); }
.vs-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 13.5px;
}

/* Integrations */
.integ-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.integ-cell {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
}
.integ-mark {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--ink); color: var(--paper);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0;
}

/* Trust */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trust-cell {
  padding: 24px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
}

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  background: transparent;
  border: none;
  padding: 24px 4px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.faq-icon { color: var(--accent); font-size: 20px; }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 70ch;
}
.faq-a > div { overflow: hidden; padding-left: 4px; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-item.open .faq-a > div { padding-bottom: 24px; }

/* Signup */
.signup-form { display: flex; gap: 12px; max-width: 520px; }
.signup-input {
  flex: 1;
  padding: 14px 18px;
  font: inherit;
  font-size: 15px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}
.signup-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.signup-thanks {
  background: var(--accent-soft);
  border: 1px solid color-mix(in oklab, var(--accent) 25%, var(--rule));
  padding: 18px 22px;
  border-radius: var(--r-md);
  max-width: 520px;
}

/* Two-up section header */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 56px;
}
.section-head .h-1 { max-width: 18ch; }
.section-head .lede { margin: 0; }

/* CTA band */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-xl);
  padding: 80px 64px;
  display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center;
}
.cta-band .h-1 { color: var(--paper); max-width: 22ch; }
.cta-band .lede { color: var(--paper-3); }
.cta-band .btn-primary { background: var(--accent); color: var(--paper); }
.cta-band .btn-primary:hover { background: var(--paper); color: var(--ink); }
.cta-band .btn-secondary { color: var(--paper); border-color: var(--paper); }
.cta-band .btn-secondary:hover { background: var(--paper); color: var(--ink); }

/* Active nav */
.nav a[data-active="true"] {
  color: var(--accent);
}
.nav a[data-active="true"]::after {
  content: ""; display: block; height: 2px; background: var(--accent);
  border-radius: 2px; margin-top: 2px;
}

/* Stats row */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

/* Page hero (sub-pages) */
.page-hero {
  padding-top: 80px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
.page-hero .lede { margin: 0; }
@media (max-width: 900px) {
  .hero-split, .hero-asym, .page-hero, .section-head, .cta-band { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rtb-grid, .rtb-grid-4, .price-grid, .integ-grid, .trust-grid, .stats-row, .vs-row { grid-template-columns: 1fr; }
  .rtb-cell { border-right: none; }
  .rtb-grid-4 .rtb-cell:nth-child(3n) { border-right: none; }
  .rtb-grid-4 .rtb-cell:nth-last-child(-n+3) { border-bottom: 1px solid var(--rule); }
  .rtb-grid-4 .rtb-cell:last-child { border-bottom: none; }
  .flow { grid-template-columns: 1fr; }
  .flow-line { display: none; }
  /* On mobile, collapse the VS table into stacked rows */
  .vs-table, .vs-table thead, .vs-table tbody, .vs-table tfoot { display: block; }
  .vs-table thead { display: none; }
  .vs-row { display: flex; flex-direction: column; border-bottom: 2px solid var(--rule); }
  .vs-cell { display: block; width: 100% !important; border-right: none; border-bottom: 1px solid var(--rule); text-align: left !important; }
  .vs-cell.vs-label { background: var(--paper-2); font-weight: 600; }
  .cta-band { padding: 48px 32px; }
}
