/* ============================================================
   Madgrowth — style.css
   Black / white, accent #0099FF, Inter + mono accents.
   ============================================================ */

:root {
  --ink: #0a0a0a;
  --ink-soft: #3d3d3d;
  --muted: #7a7a7a;
  --line: #e6e6e6;
  --bg: #ffffff;
  --bg-alt: #f7f7f7;
  --accent: #0099ff;
  --accent-ink: #0077cc;
  --accent-glow: rgba(0, 153, 255, 0.16);
  --radius: 14px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 0.22s;
  --dur-base: 0.45s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* html.js is added by an inline head script before paint. Reveal/hero
   hidden states only exist under it, so a no-JS visitor (or a failed
   script load) always sees full, visible content — progressive
   enhancement, not a hidden-by-default gamble. */
html:not(.js) .reveal { opacity: 1 !important; transform: none !important; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 16px;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); margin-bottom: 18px; }
h3 { font-size: 1.05rem; }

section { padding: 88px 0; }
section.alt { background: var(--bg-alt); }

.lead { font-size: 1.02rem; color: var(--ink-soft); max-width: 620px; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) ease,
    color var(--dur-fast) ease, border-color var(--dur-fast) ease,
    box-shadow var(--dur-fast) ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover {
  background: #2b2b2b;
  border-color: #2b2b2b;
  color: #fff;
  box-shadow: 0 14px 32px -14px rgba(10, 10, 10, 0.35);
}
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { display: block; text-align: center; width: 100%; }

/* Shine sweep on hover — a soft diagonal highlight crosses the button */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.35) 48%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 0.65s var(--ease-out);
  pointer-events: none;
}
.btn:hover::before { transform: translateX(120%); }
.btn-outline::before { background: linear-gradient(115deg, transparent 30%, rgba(0, 0, 0, 0.06) 48%, transparent 66%); }

/* Magnetic pull — main.js sets --mx/--my on pointer-fine devices */
.btn-magnetic { transform: translate(var(--mx, 0), var(--my, 0)) translateY(0); }
.btn-magnetic:hover { transform: translate(var(--mx, 0), var(--my, 0)) translateY(-2px); }
.textlink {
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
}
.textlink:hover { color: var(--accent-ink); text-decoration: none; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2.5px;
  width: 0%;
  background: var(--ink);
  z-index: 200;
  transition: width 0.1s linear;
  pointer-events: none;
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  transition: box-shadow var(--dur-fast) ease, backdrop-filter var(--dur-fast) ease;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px -18px rgba(10, 10, 10, 0.28);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
  transition: height var(--dur-fast) var(--ease-out);
}
.site-header.scrolled .nav { height: 58px; }
.brand {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a { color: var(--ink-soft); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-cta { padding: 10px 20px; font-size: 0.92rem; }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  padding: 8px;
}
@media (max-width: 899px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 820px; margin-bottom: 22px; }
.hero .lead { margin-bottom: 34px; }
.hero-ctas { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }

/* Ambient background: minimal by design — no color wash, no drifting
   shapes. Just a hairline-faint neutral vignette and grain for a touch
   of depth/texture. Entirely decorative — aria-hidden, pointer-events: none. */
/* Hero with portrait (homepage + startups) */
.hero-split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 64px; align-items: center; }
.hero-split h1 { max-width: none; }
.hero-portrait { position: relative; margin: 0; }
.hero-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; border-radius: 20px; box-shadow: 0 40px 80px -48px rgba(10, 10, 10, 0.45); }
.hero-portrait figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 12px; padding: 11px 14px; font-size: 0.84rem; line-height: 1.4; color: var(--ink-soft); }
.hero-portrait figcaption strong { display: block; color: var(--ink); font-size: 0.95rem; font-weight: 600; }
.hero .hero-portrait.reveal.is-visible { transition-delay: 0.3s; }
@media (min-width: 960px) { .hero-split .founder-line img { display: none; } }
@media (max-width: 959px) { .hero-split { grid-template-columns: 1fr; gap: 0; } .hero-portrait { display: none; } }

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(720px circle at 82% -10%, rgba(10, 10, 10, 0.035), transparent 60%);
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Hero entrance choreography — staggered fade/rise on load */
html.js .hero .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
html.js .hero .reveal.is-visible { opacity: 1; transform: none; }
.hero .eyebrow.reveal.is-visible { transition-delay: 0.02s; }
.hero h1.reveal.is-visible { transition-delay: 0.12s; }
.hero .lead.reveal.is-visible { transition-delay: 0.24s; }
.hero-ctas.reveal.is-visible { transition-delay: 0.36s; }
.hero .logo-bar.reveal.is-visible { transition-delay: 0.5s; }

.logo-bar { margin-top: 72px; }
.logo-bar p {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.logo-marquee {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.logo-track {
  display: flex;
  flex: none;
  align-items: center;
  gap: 56px;
  width: max-content;
  padding-right: 56px; /* same as gap, so the seam between the two tracks is invisible */
  animation: logo-scroll 70s linear infinite;
}
/* No hover pause: the rows crawl continuously */
@keyframes logo-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
/* Three rows of logos: alternate direction and speed so the rows never sync up */
.logo-rows { display: flex; flex-direction: column; gap: 28px; }
.logo-marquee-reverse .logo-track { animation-direction: reverse; animation-duration: 84s; }
.logo-marquee-slow .logo-track { animation-duration: 98s; }
.logo-track img {
  height: 34px;
  width: auto;
  flex: none;
  filter: grayscale(1);
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.logo-track img:hover { opacity: 0.9; }
/* Logos drawn white on dark in their source files: invert to dark, push the old dark box to white, blend it away */
.logo-track img.logo-invert { filter: invert(1) grayscale(1) brightness(1.15); mix-blend-mode: multiply; }
@media (prefers-reduced-motion: reduce) {
  .logo-marquee { -webkit-mask-image: none; mask-image: none; }
  .logo-track { animation: none; flex-wrap: wrap; width: auto; gap: 28px 40px; }
  .logo-track[aria-hidden="true"] { display: none; }
}

/* ---------- Pain marquee ---------- */
.marquee {
  display: flex;
  overflow: hidden;
  margin-top: 44px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  flex: none;
  gap: 12px;
  padding-right: 12px;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.marquee .pain {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee-track[aria-hidden="true"] { display: none; }
}
.marquee-caption { margin-top: 26px; font-weight: 600; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 44px; }
@media (max-width: 1099px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .steps { grid-template-columns: 1fr; } }
.step {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 20px;
}
.step .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 12px;
}
.step h3 { margin-bottom: 8px; font-size: 1.05rem; }
.step p { font-size: 0.92rem; color: var(--ink-soft); }
.steps-footer { margin-top: 32px; font-weight: 600; }

.step .step-q {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ---------- Hero credibility line ---------- */
.founder-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  font-size: 0.9rem;
  color: var(--muted);
}
.founder-line:hover { text-decoration: none; color: var(--ink-soft); }
.founder-line img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 1px solid var(--line);
}
.founder-line strong { color: var(--ink); font-weight: 600; }

/* ---------- About: photo beside the story ---------- */
.about-grid { display: grid; grid-template-columns: 300px 1fr; gap: 56px; align-items: start; }
@media (max-width: 767px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
/* No photo file yet → the figure hides itself; let the story take the full width */
.about-grid:has(> .about-photo[hidden]) { grid-template-columns: 1fr; }
.about-photo img {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ---------- The real problem: four questions ---------- */
.questions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; }
@media (max-width: 1023px) { .questions { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 599px) { .questions { grid-template-columns: 1fr; } }
.question {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 24px 22px;
}
.question .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 12px;
}
.question h3 { margin-bottom: 8px; }
.question p { font-size: 0.93rem; color: var(--ink-soft); }

/* ---------- Why not just… ---------- */
.alt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 40px; }
@media (max-width: 767px) { .alt-grid { grid-template-columns: 1fr; } }
.alt-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  background: var(--bg-alt);
}
.alt-card h3 { margin-bottom: 10px; }
.alt-card p { color: var(--ink-soft); }
.alt-card ul { list-style: none; display: grid; gap: 10px; }
.alt-card li { padding-left: 24px; position: relative; color: var(--ink-soft); }
.alt-card li::before { content: "→"; position: absolute; left: 0; color: var(--accent-ink); }
.alt-card.fit-no li::before { content: "×"; color: var(--muted); }
section.alt .alt-card { background: #fff; }

/* ---------- Startups page: single offer card ---------- */
.offer-single { max-width: 620px; margin-top: 40px; }

/* Plain descriptor under each product name */
.card-sub {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: -12px;
}
.card-more { font-size: 0.92rem; text-align: center; }

/* ---------- Stack page ---------- */
/* ---- Stack page ---- */
.stack-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; align-items: center; }
@media (max-width: 959px) { .stack-hero { grid-template-columns: 1fr; gap: 48px; } }
.stack-hero h1 { max-width: 600px; }
.hero .spec-card.reveal.is-visible { transition-delay: 0.3s; }
.pill { display: inline-block; font-size: 0.78rem; font-weight: 500; line-height: 1.5; padding: 3px 10px; border-radius: 999px; background: #f1f1f1; color: var(--ink-soft); white-space: nowrap; }

.spec-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 32px 64px -40px rgba(10, 10, 10, 0.28); display: grid; gap: 22px; }
.spec-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.spec-name { font-weight: 700; font-size: 1.1rem; }
.spec-price { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.spec-price small { font-size: 0.82rem; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.spec-phases { list-style: none; border-top: 1px solid var(--line); }
.spec-phases li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.spec-phases a { color: var(--ink); font-weight: 500; }
.spec-phases li span { color: var(--muted); }
.spec-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.spec-models { display: flex; flex-wrap: wrap; gap: 6px; }
.spec-note { font-size: 0.82rem; color: var(--muted); }

.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
@media (max-width: 859px) { .flow { grid-template-columns: 1fr; } }
.flow-step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; display: grid; gap: 10px; align-content: start; }
.flow-num { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.flow-step p { color: var(--ink-soft); font-size: 0.94rem; }

.models-strip { margin-top: 18px; display: grid; grid-template-columns: repeat(6, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.models-strip > div { padding: 18px; }
.models-strip > div + div { border-left: 1px solid var(--line); }
.models-strip strong { display: block; font-size: 0.92rem; margin-bottom: 4px; }
.models-strip span { display: block; font-size: 0.84rem; line-height: 1.45; color: var(--muted); }
@media (max-width: 959px) {
  .models-strip { grid-template-columns: repeat(3, 1fr); }
  .models-strip > div:nth-child(3n+1) { border-left: 0; }
  .models-strip > div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 519px) {
  .models-strip { grid-template-columns: repeat(2, 1fr); }
  .models-strip > div + div { border-left: 1px solid var(--line); }
  .models-strip > div:nth-child(odd) { border-left: 0; }
  .models-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.phase-index { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 36px; }
@media (max-width: 959px) { .phase-index { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 519px) { .phase-index { grid-template-columns: repeat(2, 1fr); } }
.phase-index a { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); display: grid; gap: 2px; background: #fff; transition: border-color var(--dur-fast) ease, transform var(--dur-fast) ease; }
.phase-index a:hover { text-decoration: none; border-color: var(--ink); transform: translateY(-2px); }
.phase-index strong { font-size: 0.95rem; }
.phase-index span { font-size: 0.8rem; color: var(--muted); }

.phase { margin-top: 64px; scroll-margin-top: 96px; }
.phase-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; margin-bottom: 18px; flex-wrap: wrap; }
.phase-head h3 { font-size: 1.4rem; }
.phase-head p { color: var(--ink-soft); font-size: 0.97rem; margin-top: 4px; }
.phase-range { font-size: 0.85rem; color: var(--muted); }
.skill-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.skill-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; padding: 26px 28px; }
.skill-row + .skill-row { border-top: 1px solid var(--line); }
@media (max-width: 767px) { .skill-row { grid-template-columns: 1fr; gap: 16px; padding: 22px 20px; } }
.skill-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.skill-num { font-size: 0.85rem; font-weight: 600; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.skill-head h4 { font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em; }
.skill-out { color: var(--ink-soft); font-size: 0.95rem; }
.fw-list { list-style: none; display: grid; gap: 10px; align-content: start; }
.fw-list li { display: grid; grid-template-columns: 104px 1fr; gap: 8px; align-items: baseline; font-size: 0.92rem; color: var(--ink-soft); }
.fw-list .pill { justify-self: start; }
@media (max-width: 767px) { .fw-list li { display: block; } .fw-list .pill { margin-right: 8px; } }

.stack-buy { margin-top: 64px; border-radius: 18px; padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; background: var(--ink); color: #fff; }
.stack-buy h3 { font-size: 1.3rem; color: #fff; }
.stack-buy p { color: #c9c9c9; font-size: 0.95rem; margin-top: 4px; }
.stack-buy .btn-primary { background: #fff; color: var(--ink); }
.stack-buy .btn-primary:hover { background: var(--accent-ink); color: #fff; }

/* ---------- Who it's for ---------- */
.who-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
@media (max-width: 899px) { .who-grid { grid-template-columns: 1fr; } }
#who .who-card { background: #fff; }
.who-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  background: var(--bg-alt);
}
.who-card h3 { margin-bottom: 10px; }
.who-card p { color: var(--ink-soft); }
.routing { margin-top: 30px; color: var(--muted); font-size: 0.98rem; }

/* ---------- Products ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; align-items: start; }
@media (max-width: 1023px) { .cards { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; } }
.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
}
.card.featured { border: 2px solid var(--ink); }
.badge {
  position: absolute;
  top: -13px;
  left: 28px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 5px 14px;
}
.card h3 { font-size: 1.3rem; }
.price { font-family: var(--font-mono); font-size: 0.95rem; color: var(--ink-soft); }
.card > p { color: var(--ink-soft); font-size: 0.97rem; }
.card ul { list-style: none; display: grid; gap: 10px; }
.card li { padding-left: 24px; position: relative; font-size: 0.94rem; color: var(--ink-soft); }
.card li::before { content: "→"; position: absolute; left: 0; color: var(--accent-ink); }
.card .cta-zone { margin-top: auto; display: grid; gap: 12px; }
.smalltext { font-size: 0.82rem; color: var(--muted); }
.fit-check { font-size: 0.92rem; text-align: center; }

.subscribe-form { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  font: inherit;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.subscribe-form input[type="email"]:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form-note { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
.form-status { margin-top: 10px; font-size: 0.9rem; font-weight: 600; }
.form-status.ok { color: #0a7a3d; }
.form-status.err { color: #c22525; }

/* ---------- About ---------- */
.about-body { max-width: 720px; color: var(--ink-soft); display: grid; gap: 18px; font-size: 1.05rem; }

/* ---------- Testimonials (two-row opposing marquee) ---------- */
#testimonials .wrap { margin-bottom: 40px; }
.testi-marquee {
  display: flex;
  overflow: hidden;
  margin-top: 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.testi-track {
  display: flex;
  flex: none;
  gap: 20px;
  padding-right: 20px;
  width: max-content;
  animation: testi-scroll 65s linear infinite;
}
.testi-track.reverse { animation-name: testi-scroll-reverse; }
.testi-marquee:hover .testi-track { animation-play-state: paused; }
@keyframes testi-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@keyframes testi-scroll-reverse {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}
.testimonial {
  flex: none;
  width: 360px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 26px 24px;
}
.testimonial blockquote { font-size: 0.97rem; color: var(--ink-soft); margin-bottom: 16px; }
.testimonial figcaption strong { display: block; font-size: 0.95rem; }
.testimonial figcaption span { font-size: 0.85rem; color: var(--muted); }
@media (max-width: 649px) { .testimonial { width: 280px; } }
@media (prefers-reduced-motion: reduce) {
  .testi-marquee { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
  .testi-track { animation: none; }
  .testi-track[aria-hidden="true"] { display: none; }
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin-top: 36px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  padding: 20px 36px 20px 0;
  position: relative;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--accent-ink);
}
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { padding: 0 0 20px; color: var(--ink-soft); }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; background: var(--ink); color: #fff; }
.final-cta h2 { color: #fff; max-width: 700px; margin-left: auto; margin-right: auto; }
.final-cta p { color: #c9c9c9; max-width: 560px; margin: 0 auto 32px; }
.final-cta .btn-primary { background: #fff; border-color: #fff; color: var(--ink); }
.final-cta .btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

/* ---------- Footer ---------- */
.site-footer { padding: 48px 0 40px; border-top: 1px solid var(--line); font-size: 0.92rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--ink-soft); }
.footer-meta { color: var(--muted); display: grid; gap: 8px; }

/* ============================================================
   Motion system — scroll reveal, stagger, card tilt
   Hidden-by-default states only exist under html.js (see the
   html:not(.js) escape hatch at the top), so this is additive
   polish, never a content-blocking dependency.
   ============================================================ */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }
html.js .reveal-scale { transform: translateY(20px) scale(0.96); }
html.js .reveal-scale.is-visible { transform: none; }

.reveal-d1 { transition-delay: 0s; }
.reveal-d2 { transition-delay: 0.08s; }
.reveal-d3 { transition-delay: 0.16s; }

.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.07s; }
.stagger > *:nth-child(3) { transition-delay: 0.14s; }
.stagger > *:nth-child(4) { transition-delay: 0.21s; }
.stagger > *:nth-child(5) { transition-delay: 0.28s; }
.stagger > *:nth-child(6) { transition-delay: 0.35s; }
.stagger > *:nth-child(7) { transition-delay: 0.42s; }

/* Pointer-fine tilt/lift — main.js applies inline transform on
   mousemove with no transition (crisp cursor tracking), then adds
   .settling on mouseleave for a smooth spring back to rest. */
.tilt {
  transition: box-shadow var(--dur-fast) ease, border-color var(--dur-fast) ease;
  will-change: transform;
}
.tilt.settling { transition: transform 0.5s var(--ease-out), box-shadow var(--dur-fast) ease, border-color var(--dur-fast) ease; }
.tilt:hover { border-color: #d5d5d5; box-shadow: 0 28px 52px -28px rgba(10, 10, 10, 0.22); }
.card.tilt:hover { border-color: var(--ink); }
.card.featured.tilt:hover { border-color: var(--ink); }

/* ============================================================
   Diagnostic page
   ============================================================ */
.diag-main { max-width: 720px; margin: 0 auto; padding: 64px 24px 96px; }
.diag-header { margin-bottom: 40px; }
.diag-header h1 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 14px; }

.diag-progress { margin-bottom: 28px; }
.diag-progress .meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.progress-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--ink);
  border-radius: 999px;
  transition: width 0.5s var(--ease-out);
}

.statement-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 40px 32px;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.statement-card.is-switching { opacity: 0; transform: translateY(10px); }
.statement-card .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 16px;
}
.statement-card .statement {
  font-size: clamp(1.15rem, 2.4vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 30px;
  min-height: 2.4em;
}
.answer-row { display: flex; gap: 14px; flex-wrap: wrap; }
.answer-row .btn { flex: 1; min-width: 140px; text-align: center; }
.diag-back {
  margin-top: 18px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
}
.diag-back:hover { color: var(--ink); }
.diag-back[disabled] { visibility: hidden; }

/* Scenario options */
.option-stack { display: grid; gap: 10px; }
.option-stack .opt {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px 18px 15px 22px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) ease;
}
.option-stack .opt::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform var(--dur-fast) var(--ease-out);
}
.option-stack .opt:hover {
  border-color: var(--ink);
  transform: translateX(3px);
  box-shadow: 0 10px 24px -16px rgba(10, 10, 10, 0.25);
}
.option-stack .opt:hover::before { transform: scaleY(1); }
.option-stack .opt:active { transform: translateX(3px) scale(0.99); }
.option-stack .opt .key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-ink);
  flex: none;
}

/* Result */
.result-score {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.result-profile { font-size: clamp(1.6rem, 3.6vw, 2.1rem); margin-bottom: 10px; }
.result-tagline { color: var(--ink-soft); font-size: 1.02rem; font-weight: 500; margin-bottom: 32px; }

.wiring-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 26px 24px;
  margin-bottom: 32px;
}
.wiring-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.dim-grid { display: grid; gap: 16px; }
.dim-row { display: grid; gap: 6px; }
.dim-row .dim-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.dim-row .dim-labels .active { color: var(--ink); font-weight: 700; }
.dim-row .dim-bar {
  position: relative;
  height: 8px;
  background: var(--line);
  border-radius: 999px;
}
.dim-row .dim-bar .fill {
  position: absolute;
  inset: 0;
  width: 50%;
  background: linear-gradient(90deg, rgba(0, 153, 255, 0.3), rgba(0, 153, 255, 0.55));
  border-radius: 999px;
  transition: width 0.9s var(--ease-out);
}
.dim-row .dim-bar .marker {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
  z-index: 1;
  transition: left 0.9s var(--ease-out);
}
.dim-row .dim-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ink);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-narrative { display: grid; gap: 16px; color: var(--ink-soft); font-size: 1.02rem; margin-bottom: 32px; }
.result-narrative strong { color: var(--ink); }

.fit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 649px) { .fit-grid { grid-template-columns: 1fr; } }
.fit-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.fit-card h3 { font-size: 0.95rem; margin-bottom: 14px; }
.fit-card ul { list-style: none; display: grid; gap: 10px; }
.fit-card li { padding-left: 22px; position: relative; font-size: 0.93rem; color: var(--ink-soft); }
.fit-card li::before { content: "→"; position: absolute; left: 0; color: var(--accent-ink); }
.fit-card.avoid li::before { content: "✕"; color: var(--muted); font-size: 0.8em; top: 2px; }

.edge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 40px; }
@media (max-width: 649px) { .edge-grid { grid-template-columns: 1fr; } }
.edge-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
  padding: 20px 22px;
  font-size: 0.93rem;
  color: var(--ink-soft);
}
.edge-card .edge-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.gate-sub { font-size: 0.95rem; color: var(--ink-soft); margin: -8px 0 18px; }
.gate-list { list-style: none; display: grid; gap: 10px; margin: 0 0 22px; }
.gate-list li { padding-left: 24px; position: relative; font-size: 0.93rem; color: var(--ink-soft); }
.gate-list li::before { content: "🔒"; position: absolute; left: 0; font-size: 0.8em; top: 3px; }
#full-report > .btn { margin-top: 8px; }

.email-gate {
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.email-gate h2 { font-size: 1.3rem; margin-bottom: 18px; }
.email-gate .subscribe-form { margin-bottom: 6px; }
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 0.88rem; color: var(--ink-soft); }
.consent-row input { margin-top: 4px; }

.thanks h2 { margin-bottom: 14px; }
.thanks p { color: var(--ink-soft); margin-bottom: 24px; }

.hidden { display: none !important; }

/* Screen-reader-only */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Cookie banner ---- */
.consent-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 460px; background: var(--ink); color: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.55); display: grid; gap: 12px; font-size: 0.9rem; line-height: 1.5; }
@media (min-width: 600px) { .consent-bar { right: auto; } }
.consent-bar p { color: #d9d9d9; }
.consent-bar a { color: #fff; text-decoration: underline; }
.consent-actions { display: flex; gap: 8px; }
.consent-actions button { font: inherit; font-weight: 600; border-radius: 999px; padding: 8px 18px; cursor: pointer; border: 1px solid #fff; }
.consent-accept { background: #fff; color: var(--ink); }
.consent-decline { background: transparent; color: #fff; border-color: #5a5a5a; }
