/* ==========================================================================
   GhostCode — shared styles for index.html and help.html
   ------------------------------------------------------------------------
   EDIT: brand colors live in :root below. Change them once, they apply
   everywhere.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0a0a0f;
  --bg-tint: #0d0b1a;
  --surface: #13111f;
  --surface-2: #1a1729;
  --border: rgba(139, 92, 246, 0.16);
  --border-strong: rgba(139, 92, 246, 0.45);

  /* Text */
  --text: #f1effa;
  --text-muted: #a9a4c4;
  --text-dim: #7d7899;

  /* Accent (purple) */
  --accent: #7c3aed;
  --accent-2: #8b5cf6;
  --accent-3: #c4b5fd;
  --accent-glow: rgba(139, 92, 246, 0.55);

  /* Type */
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Consolas, monospace;

  /* Layout */
  --container: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 72px;
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(1200px 600px at 50% -10%, var(--bg-tint), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-3); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

/* Visible keyboard focus everywhere */
:focus-visible {
  outline: 2px solid var(--accent-3);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Sections land below the sticky header when scrolled to */
section[id], [id].anchor { scroll-margin-top: calc(var(--header-h) + 16px); }

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

.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;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1;
  cursor: pointer;
  transition: box-shadow .25s ease, transform .2s ease, background-color .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  color: #fff;
  box-shadow: 0 0 28px 2px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(139, 92, 246, 0.08);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: #fff;
  background: rgba(139, 92, 246, 0.16);
  box-shadow: 0 0 24px 0 rgba(139, 92, 246, 0.35);
}

.btn-lg { padding: 16px 26px; font-size: 16px; border-radius: 14px; }
.btn-lg svg { width: 20px; height: 20px; }
.btn-block { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(10, 10, 15, 0.62);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 34px; width: auto; }
/* Text wordmark shown only if assets/logo.png is missing (see script.js) */
.brand-text {
  display: none;
  font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--text);
}
.brand.logo-missing img { display: none; }
.brand.logo-missing .brand-text { display: inline; }

.main-nav ul { list-style: none; display: flex; gap: 6px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 10px;
  color: var(--text-muted); font-weight: 500; font-size: 15px;
  transition: color .2s, background-color .2s;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--text); background: rgba(139, 92, 246, 0.1); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border);
  cursor: pointer; align-items: center; justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--text); position: relative; transition: transform .25s, opacity .25s;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 130px;
  text-align: center;
  isolation: isolate;
}

/* Slow-drifting background blobs */
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(80px); opacity: .5;
  will-change: transform;
}
.blob-1 { width: 520px; height: 520px; left: -120px; top: -140px;
  background: radial-gradient(circle, #6d28d9, transparent 65%);
  animation: drift-1 26s ease-in-out infinite alternate; }
.blob-2 { width: 460px; height: 460px; right: -120px; top: 40px;
  background: radial-gradient(circle, #8b5cf6, transparent 65%);
  opacity: .35;
  animation: drift-2 32s ease-in-out infinite alternate; }
.blob-3 { width: 600px; height: 380px; left: 30%; bottom: -220px;
  background: radial-gradient(circle, #4c1d95, transparent 65%);
  animation: drift-3 38s ease-in-out infinite alternate; }
/* Faint grid texture fading out toward the edges */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, .06) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
          mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}

@keyframes drift-1 { to { transform: translate(160px, 90px) scale(1.15); } }
@keyframes drift-2 { to { transform: translate(-140px, 120px) scale(.9); } }
@keyframes drift-3 { to { transform: translate(-120px, -80px) scale(1.1); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(139, 92, 246, .08);
  color: var(--accent-3); font-size: 13px; font-weight: 600; letter-spacing: .02em;
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5.25rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.hero-title .line { display: block; }
.hero-title .sub {
  display: block;
  margin-top: 18px;
  font-size: clamp(1.15rem, 2.6vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

/* ---- The showpiece: "visible" ----
   Two independent loops:
   - gradient-flow (3s): slides a 200%-wide gradient through the letters
   - haunt (5s): opacity drifts 1 → 0.18 → 1, and the glow rides along
   Only opacity/filter change, so the layout never shifts. */
.visible-word {
  display: inline-block;
  padding: 0 .04em .08em;           /* room so descenders/glow aren't clipped */
  background-image: linear-gradient(90deg,
    #6d28d9 0%, #a78bfa 20%, #e9d5ff 35%, #8b5cf6 50%,
    #6d28d9 65%, #c4b5fd 80%, #6d28d9 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation:
    gradient-flow 3s linear infinite,
    haunt 5s ease-in-out infinite;
}

@keyframes gradient-flow {
  from { background-position: 0% 50%; }
  to   { background-position: -200% 50%; }
}

@keyframes haunt {
  0%, 100% {
    opacity: 1;
    filter: drop-shadow(0 0 18px rgba(139, 92, 246, .75)) drop-shadow(0 0 42px rgba(124, 58, 237, .45));
  }
  50% {
    opacity: .18;
    filter: drop-shadow(0 0 2px rgba(139, 92, 246, .15)) drop-shadow(0 0 0 rgba(124, 58, 237, 0));
  }
}

.hero-lead {
  max-width: 620px; margin: 26px auto 0;
  color: var(--text-muted); font-size: 18px;
}

.hero-cta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 14px;
  margin-top: 40px;
}
.hero-note { margin-top: 18px; color: var(--text-dim); font-size: 14px; }

/* ==========================================================================
   Hero before/after demo
   ========================================================================== */
.demo {
  --split: 68%;
  position: relative;
  margin: 64px auto 0;
  max-width: 1080px;
  text-align: left;
  border-radius: 22px;
  border: 1px solid rgba(196, 181, 253, .16);
  background: linear-gradient(180deg, #100e1c, #0b0a13);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, .08), 0 40px 120px -30px rgba(124, 58, 237, .45), 0 30px 60px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.demo-chrome {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 52px;
  border-bottom: 1px solid rgba(196, 181, 253, .1);
}
.dots { position: absolute; left: 20px; display: flex; gap: 8px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.demo-url {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 9px;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(196, 181, 253, .1);
  color: var(--text-dim); font-family: var(--font-mono); font-size: 12px;
}
.url-dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; }

.demo-stage { position: relative; height: 470px; overflow: hidden; }
.demo-base, .demo-you { position: absolute; inset: 0; }
.demo-you { clip-path: inset(0 calc(100% - var(--split)) 0 0); z-index: 2; pointer-events: none; }

.demo-tag {
  position: absolute; top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(10, 10, 15, .85); border: 1px solid rgba(196, 181, 253, .16);
  color: var(--text); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.tag-left { left: 20px; }
.tag-right { right: 20px; }
.rec-dot.is-you { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }

.demo-problem {
  position: absolute; top: 66px; left: 24px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 14px;
}
.dp-title { color: var(--text); font-weight: 700; }
.dp-level { padding: 2px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fcd34d; background: rgba(252, 211, 77, .1); border: 1px solid rgba(252, 211, 77, .3); }
.dp-timer { color: #fcd34d; font-size: 13px; }

.demo-chat {
  position: absolute; top: 100px; left: 24px;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.demo-chat.is-shown { opacity: 1; transform: none; }
.chat-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #f97316, #db2777);
  color: #fff; font-size: 11px; font-weight: 800;
}
.chat-bubble {
  padding: 8px 14px; border-radius: 12px;
  background: rgba(52, 211, 153, .06); border: 1px solid rgba(52, 211, 153, .25);
  color: var(--text); font-size: 14px;
}
.chat-who { color: var(--text-dim); font-size: 12px; margin-right: 6px; }

.demo-editor {
  position: absolute; top: 148px; left: 20px; right: 20px; bottom: 20px;
  padding: 16px 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, .015);
  border: 1px solid rgba(196, 181, 253, .08);
  overflow: hidden;
}
.demo-code {
  list-style: none; margin: 0; padding: 0;
  counter-reset: ln;
  font-family: var(--font-mono); font-size: 14px; line-height: 27px;
  color: #e5e1f5;
}
.demo-code li { counter-increment: ln; white-space: pre; padding-left: 58px; position: relative; }
.demo-code li::before {
  content: counter(ln);
  position: absolute; left: 0; width: 38px; text-align: right;
  color: var(--text-dim);
}
.demo-code .kw { color: #c084fc; }
.demo-code .fn { color: #93c5fd; }
.demo-code .nm { color: #fcd34d; }
.caret {
  display: inline-block; width: 8px; height: 17px; margin-left: 1px;
  vertical-align: -3px; background: var(--accent-3);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.demo-tests {
  margin: 10px 0 0 58px;
  color: #34d399; font-family: var(--font-mono); font-size: 13px;
  opacity: 0; transition: opacity .4s ease;
}
.demo-tests.is-shown { opacity: 1; }

.demo-status {
  position: absolute; right: 20px; bottom: 20px; z-index: 1;
  width: 300px; padding: 16px 20px;
  border-radius: 14px;
  background: rgba(6, 22, 20, .9);
  border: 1px solid rgba(52, 211, 153, .35);
  box-shadow: 0 0 40px -10px rgba(52, 211, 153, .35);
  font-family: var(--font-mono); font-size: 12px;
}
.ds-head { display: flex; align-items: center; gap: 8px; color: #34d399; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; margin-bottom: 10px; }
.ds-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
.demo-status dl { margin: 0; display: grid; gap: 6px; }
.demo-status dl div { display: flex; justify-content: space-between; }
.demo-status dt { color: var(--text-dim); }
.demo-status dd { margin: 0; color: #6ee7b7; font-weight: 700; }

/* The GhostCode panel — only exists in "your" layer */
.gc-panel {
  position: absolute; top: 132px; left: 47%; width: 31%;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(76, 29, 149, .55), rgba(30, 20, 60, .7));
  border: 1px solid rgba(196, 181, 253, .35);
  box-shadow: 0 0 60px -10px rgba(139, 92, 246, .6), 0 20px 50px rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  color: var(--text);
}
.gc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.gc-logo {
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  font-family: var(--font-mono); font-size: 11px; font-weight: 800;
}
.gc-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.gc-btns { margin-left: auto; display: flex; gap: 6px; }
.gc-btns i { width: 22px; height: 22px; border-radius: 6px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(196, 181, 253, .15); }
.gc-btns i.on { background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }
.gc-label { color: var(--accent-3); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 10px 0 4px; }
.gc-approach { font-size: 13px; color: #ede9fe; line-height: 1.5; }
.gc-why { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 12.5px; }
.gc-why li { display: flex; gap: 8px; color: rgba(237, 233, 254, .6); line-height: 1.45; }
.gc-why li span { font-family: var(--font-mono); color: var(--accent-3); flex: none; width: 14px; text-align: right; }
.gc-why li.is-active { color: #fff; }
/* keep only the latest 5 explanations visible */
.gc-why li:nth-last-child(n + 6) { display: none; }

/* Divider + slider */
.demo-divider {
  position: absolute; top: 0; bottom: 0; left: var(--split); z-index: 3;
  width: 2px; transform: translateX(-1px);
  background: linear-gradient(180deg, transparent, #a78bfa 15%, #8b5cf6 85%, transparent);
  box-shadow: 0 0 16px rgba(139, 92, 246, .8);
  pointer-events: none;
}
.demo-handle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #c4b5fd, #8b5cf6);
  border: 4px solid #0b0a13;
  box-shadow: 0 0 0 1px rgba(196, 181, 253, .5), 0 0 30px rgba(139, 92, 246, .8);
  color: #1e1b4b; font-size: 9px; letter-spacing: 2px;
}
.demo-range {
  position: absolute; inset: 0; z-index: 4;
  width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none;
}
.demo-stage:has(.demo-range:focus-visible) .demo-handle { outline: 2px solid #fff; outline-offset: 3px; }
.demo-caption { margin-top: 18px; color: var(--text-dim); font-size: 14px; }
.demo-caption strong { color: var(--text-muted); }

@media (max-width: 860px) {
  .demo-status { display: none; }
  .gc-panel { left: 6%; width: 64%; }
}
@media (max-width: 640px) {
  .demo { margin-top: 44px; border-radius: 16px; }
  .demo-chrome { height: 42px; }
  .dots { left: 14px; gap: 6px; }
  .dots i { width: 9px; height: 9px; }
  .demo-url { font-size: 10px; padding: 4px 10px; margin-left: 40px; }
  .demo-stage { height: 440px; }
  .demo-tag { font-size: 11px; padding: 5px 10px; top: 12px; }
  .tag-left { left: 12px; } .tag-right { right: 12px; }
  .tag-right { top: 46px; }
  .demo-problem { top: 84px; left: 14px; font-size: 12px; gap: 8px; }
  .dp-timer { display: none; }
  .demo-chat { top: 112px; left: 14px; }
  .chat-avatar { width: 26px; height: 26px; font-size: 9px; }
  .chat-bubble { font-size: 12px; padding: 6px 10px; }
  .demo-editor { top: 156px; left: 10px; right: 10px; bottom: 10px; padding: 10px 0; }
  .demo-code { font-size: 11px; line-height: 21px; }
  .demo-code li { padding-left: 34px; }
  .demo-code li::before { width: 22px; }
  .demo-tests { margin-left: 34px; font-size: 11px; }
  .gc-panel { top: auto; bottom: 16px; left: 5%; width: 78%; padding: 12px 14px; }
  .gc-why, .gc-label-why { display: none; }
  .demo-handle { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .caret { display: none; }
}

/* ==========================================================================
   Generic section
   ========================================================================== */
.section { padding: 110px 0; position: relative; }
.section + .section { border-top: 1px solid rgba(139, 92, 246, .07); }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.section-kicker {
  display: block; color: var(--accent-2);
  font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 700; }
.section-sub { margin-top: 16px; color: var(--text-muted); font-size: 17px; }

/* Shared card surface */
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .12), 0 12px 40px -12px rgba(139, 92, 246, .45);
}

/* ==========================================================================
   Features
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(139, 92, 246, .12);
  border: 1px solid var(--border-strong);
  color: var(--accent-3);
  margin-bottom: 20px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: 15px; }

/* Standout card: spans two columns and shows the code + reasoning mock */
.feature-standout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  border-color: var(--border-strong);
  background:
    radial-gradient(600px 220px at 0% 0%, rgba(124, 58, 237, .18), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: rgba(139, 92, 246, .16); color: var(--accent-3);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 14px;
}

.explain-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0b0a13;
  font-size: 13px;
}
.explain-col { min-width: 0; }
.explain-col + .explain-col { border-left: 1px solid var(--border); }
.explain-label {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.explain-label::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
}
.explain-rows { list-style: none; padding: 8px 0; }
.explain-rows li {
  display: flex; align-items: center; gap: 12px;
  min-height: 34px; padding: 4px 14px;
}
.explain-rows li.is-active { background: rgba(139, 92, 246, .1); }
.code-rows li { font-family: var(--font-mono); color: #ddd6fe; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.code-rows .ln { color: var(--text-dim); width: 16px; text-align: right; flex: none; }
.code-rows .kw { color: #c084fc; }
.code-rows .fn { color: #a5b4fc; }
.code-rows .cm { color: var(--text-dim); }
.why-rows li { color: var(--text-muted); line-height: 1.35; }
.why-rows li.is-active { color: var(--text); }

/* ==========================================================================
   Feature rows (visual + text, alternating sides)
   ========================================================================== */
.features-stack { display: grid; gap: 28px; }

@media (min-width: 961px) {
  .feature-standout { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 36px; padding: 36px; }
}

.frow {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
  padding: 36px 0;
}
.frow.is-reversed .fviz { order: 2; }
.frow-text h3 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); font-weight: 700; margin: 18px 0 14px; }
.frow-text p { color: var(--text-muted); font-size: 17px; max-width: 460px; }

.pill {
  display: inline-block;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: rgba(124, 58, 237, .12);
  color: var(--accent-3);
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}

/* Visual canvas */
.fviz {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(124, 58, 237, .2), transparent 70%),
    #0b0a13;
  overflow: hidden;
  isolation: isolate;
}
.fviz::before {          /* faint dot grid */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(196, 181, 253, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}
.fviz svg { width: 100%; height: 100%; }
.fviz kbd { font-size: 11px; padding: 1px 6px; }

/* 1 — Screenshare-proof */
.share-pill {
  position: absolute; top: 18px; right: 18px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(10, 10, 15, .8); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 12px; font-weight: 600;
}
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #f43f5e; box-shadow: 0 0 8px #f43f5e; }
.mock-panel {
  position: absolute; left: 9%; right: 9%; top: 16%; bottom: -8%;
  padding: 18px;
  border-radius: 16px;
  background: rgba(26, 23, 41, .75);
  border: 1px solid var(--border);
  opacity: .5;
  -webkit-mask-image: linear-gradient(#000 35%, transparent 92%);
          mask-image: linear-gradient(#000 35%, transparent 92%);
}
.mp-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.mp-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 9px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(196, 181, 253, .12);
  color: var(--text-muted); font-size: 12px;
}
.mp-chip.is-faint { flex: 1; min-width: 120px; color: var(--text-dim); }
.mp-title { font-family: var(--font-display); font-weight: 600; margin-bottom: 6px; }
.mp-line { display: block; height: 8px; border-radius: 4px; background: rgba(196, 181, 253, .16); margin-top: 12px; }
.stealth-badge {
  position: absolute; left: 50%; top: 54%; z-index: 2;
  transform: translate(-50%, -50%);
  width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-items: center;
  color: #ddd6fe;
  background: radial-gradient(circle, rgba(139, 92, 246, .45), rgba(76, 29, 149, .35) 55%, rgba(10, 10, 15, .9) 72%);
  border: 1px solid rgba(196, 181, 253, .3);
  box-shadow:
    0 0 0 22px rgba(139, 92, 246, .06),
    0 0 0 46px rgba(139, 92, 246, .03),
    0 0 70px 10px rgba(139, 92, 246, .45);
}
.stealth-badge svg { width: 58px; height: 58px; filter: drop-shadow(0 0 10px rgba(196, 181, 253, .9)); }

/* 2 — Completely undetectable (hover controls) */
.fviz-hover { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; padding: 24px; }
.hover-bar {
  position: relative;
  display: flex; gap: 10px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(26, 23, 41, .85);
  border: 1px solid rgba(196, 181, 253, .18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.hb-btn {
  position: relative;
  width: 56px; height: 56px; border-radius: 13px;
  display: grid; place-items: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(196, 181, 253, .1);
}
.hb-btn svg { width: 24px; height: 24px; }
.hb-btn.is-hover {
  color: #fff;
  background: linear-gradient(180deg, #8b5cf6, #6d28d9);
  border-color: #a78bfa;
  box-shadow: 0 0 36px rgba(139, 92, 246, .7);
}
.hb-tip {
  position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  padding: 4px 10px; border-radius: 7px;
  background: #ede9fe; color: #2e1065;
  font-size: 12px; font-weight: 700; white-space: nowrap;
}
.fviz .hb-cursor {
  position: absolute; width: 26px; height: 26px;
  left: 108px; top: 44px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6));
}
.scan-list { list-style: none; width: min(100%, 340px); display: grid; gap: 8px; }
.scan-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 9px 14px; border-radius: 10px;
  background: rgba(255, 255, 255, .03); border: 1px solid rgba(196, 181, 253, .1);
  color: var(--text-muted); font-size: 13px;
}
.scan-list b { color: #6ee7b7; font-family: var(--font-mono); font-weight: 600; }

/* 3 — Structured output */
.chart-svg { position: absolute; inset: 0; }
.chart-nodes circle { fill: rgba(139, 92, 246, .22); stroke: rgba(196, 181, 253, .45); stroke-width: 1.2; }
.term-card {
  position: absolute; left: 16%; right: 16%; bottom: 10%;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(15, 13, 26, .92);
  border: 1px solid rgba(196, 181, 253, .18);
  box-shadow: 0 12px 0 -6px rgba(26, 23, 41, .8), 0 20px 40px rgba(0, 0, 0, .5);
}
.term-icon { color: var(--accent-2); flex: none; }
.term-icon svg { width: 26px; height: 26px; }
.term-lines { flex: 1; display: grid; gap: 10px; }
.term-lines span { display: block; height: 8px; border-radius: 4px; background: rgba(139, 92, 246, .3); }

/* 4 — Multimodal */
.chip-labels text { fill: var(--text-dim); font-size: 13px; font-family: var(--font-body); }
.chip-out { fill: var(--text); font-size: 20px; font-family: var(--font-display); font-weight: 500; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2.4fr);
  gap: 56px;
  align-items: start;
}
.testimonials-head { position: sticky; top: calc(var(--header-h) + 40px); }
.testimonials-head .section-title { font-size: clamp(2rem, 3.6vw, 2.6rem); }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
  padding-top: 32px;           /* room for the raised middle column */
}
/* Stagger: middle column sits higher */
.testimonials-grid > :nth-child(3n + 2) { transform: translateY(-32px); }
.testimonials-grid .testimonial { padding: 26px 24px; gap: 26px; border-radius: 20px; }
.testimonials-grid .testimonial blockquote { font-size: 16px; line-height: 1.6; color: #e4e1ee; }
.testimonials-grid .testimonial blockquote::before { content: none; }
.testimonials-grid .avatar { width: 56px; height: 56px; background: #1a1729; border-color: rgba(196, 181, 253, .15); }
.testimonials-grid figcaption { gap: 14px; }
.testimonials-grid .t-name { font-size: 16px; font-weight: 500; }
.testimonials-grid .t-role {
  margin-top: 2px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1.5;
  text-transform: uppercase;
}
.testimonial { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.testimonial blockquote {
  margin: 0; color: var(--text); font-size: 16px; line-height: 1.65;
}
.testimonial blockquote::before {
  content: "\201C"; display: block;
  font-family: var(--font-display); font-size: 48px; line-height: .6;
  color: var(--accent-2); margin-bottom: 12px;
}
.testimonial figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent), #312e81);
  border: 1px solid var(--border-strong);
}
.t-name { display: block; font-weight: 600; }
.t-role { display: block; color: var(--text-dim); font-size: 14px; }

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}
.price-card { position: relative; display: flex; flex-direction: column; padding: 30px 26px; }
.plan-icon {
  width: 88px; height: 88px;
  margin: -6px 0 14px -6px;
  filter: drop-shadow(0 6px 18px rgba(139, 92, 246, .35));
}
.price-card h3 { font-size: 19px; font-weight: 600; }
.price {
  display: flex; align-items: baseline; gap: 6px;
  margin: 16px 0 0;
}
/* Small line under the price (billing terms) */
.price-note { color: var(--text-dim); font-size: 14px; margin: 4px 0 24px; }
.price-amount { font-family: var(--font-display); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.price-period { color: var(--text-dim); font-size: 15px; }
.price-features { list-style: none; display: grid; gap: 12px; margin-bottom: 28px; flex: 1; }
.price-features li {
  position: relative; padding-left: 28px; color: var(--text-muted); font-size: 15px;
}
.price-features li::before {
  content: ""; position: absolute; left: 0; top: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(139, 92, 246, .16)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c4b5fd' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

/* Features a plan doesn't include: grey X + strikethrough */
.price-features li.is-missing {
  color: var(--text-dim);
  text-decoration: line-through;
  text-decoration-color: rgba(125, 120, 153, .6);
}
.price-features li.is-missing::before {
  background: rgba(125, 120, 153, .12)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d7899' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E")
    center / 10px no-repeat;
}

/* Free plan: intentionally flat and muted next to the paid tiers */
.price-card.is-basic {
  background: var(--bg);
  border-color: rgba(125, 120, 153, .18);
}
.price-card.is-basic:hover { border-color: rgba(125, 120, 153, .3); box-shadow: none; }
.price-card.is-basic .plan-icon { filter: saturate(.35) brightness(.8); opacity: .75; }
.price-card.is-basic h3,
.price-card.is-basic .price-amount { color: var(--text-muted); }
.price-card.is-basic .price-features li:not(.is-missing)::before {
  background-color: rgba(125, 120, 153, .12);
  filter: grayscale(1);
}
.price-card.is-basic .btn-ghost {
  background: transparent;
  border-color: rgba(125, 120, 153, .3);
  color: var(--text-muted);
}

.price-card.is-popular {
  border: 1.5px solid var(--accent-2);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, .2), 0 20px 60px -20px rgba(139, 92, 246, .6);
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(124, 58, 237, .22), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
}
.popular-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 5px 14px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 0 20px var(--accent-glow);
  white-space: nowrap;
}
.pricing-note { text-align: center; margin-top: 28px; color: var(--text-dim); font-size: 14px; }

/* Start-free call-to-action under the pricing cards */
.cta-band {
  position: relative;
  margin-top: 96px;
  padding: 56px 24px 8px;
  text-align: center;
  isolation: isolate;
}
.cta-band::before {          /* soft purple glow behind the heading */
  content: ""; position: absolute; z-index: -1;
  left: 50%; top: 0; width: min(720px, 100%); height: 260px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(124, 58, 237, .28), transparent);
  pointer-events: none;
}
.cta-title { font-size: clamp(2rem, 5.2vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; }
.cta-band .hero-cta { margin-top: 36px; }

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color .25s, box-shadow .25s;
}
.faq-item:has(.faq-q[aria-expanded="true"]) {
  border-color: var(--border-strong);
  box-shadow: 0 8px 30px -14px rgba(139, 92, 246, .5);
}
.faq-item h3 { font-size: inherit; font-family: var(--font-body); letter-spacing: 0; }
.faq-q {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px;
  background: transparent; border: 0; border-radius: 14px;
  text-align: left; cursor: pointer;
  font-size: 17px; font-weight: 600;
}
.faq-q:hover { color: #fff; }
.faq-icon {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(139, 92, 246, .12); color: var(--accent-3);
  transition: transform .25s ease, background-color .25s;
}
.faq-icon svg { width: 14px; height: 14px; }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); background: rgba(139, 92, 246, .25); }
.faq-a { padding: 0 22px 22px; color: var(--text-muted); }
.faq-a[hidden] { display: none; }

.faq-more { text-align: center; margin-top: 36px; color: var(--text-muted); }
.faq-more a { font-weight: 600; }

/* ==========================================================================
   Help page
   ========================================================================== */
.page-hero { padding: 90px 0 30px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.page-hero .hero-bg .blob { opacity: .3; }
.page-title { font-size: clamp(2.25rem, 5.5vw, 3.75rem); font-weight: 700; }
.page-lead { max-width: 560px; margin: 18px auto 0; color: var(--text-muted); font-size: 18px; }

.steps {
  list-style: none;
  counter-reset: step;
  max-width: 760px; margin: 0 auto;
  display: grid; gap: 16px;
}
.step {
  counter-increment: step;
  position: relative;
  display: grid; grid-template-columns: 56px 1fr; gap: 20px; align-items: start;
  padding: 24px 26px;
}
.step::before {
  content: counter(step);
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 24px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 24px -4px var(--accent-glow);
}
.step h2 { font-size: 20px; font-weight: 600; margin: 4px 0 6px; }
.step p { color: var(--text-muted); }
.step-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(139, 92, 246, .06);
  color: var(--text-muted); font-size: 13px;
}
.chip svg { width: 14px; height: 14px; }
.chip strong { color: var(--text); font-weight: 600; }
kbd {
  display: inline-block; padding: 2px 8px; margin: 0 2px;
  border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px;
  background: var(--surface-2); color: var(--text);
  font-family: var(--font-mono); font-size: .85em; line-height: 1.5;
}

.trouble-list { max-width: 760px; margin: 0 auto; list-style: none; display: grid; gap: 12px; }
.trouble-item { padding: 20px 24px; }
.trouble-item h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; font-family: var(--font-body); letter-spacing: 0; }
.trouble-item p { color: var(--text-muted); font-size: 15px; }

.contact-box {
  max-width: 760px; margin: 40px auto 0;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  padding: 26px 28px;
  border-color: var(--border-strong);
}
.contact-box h2 { font-size: 20px; font-weight: 600; }
.contact-box p { color: var(--text-muted); margin-top: 4px; }

/* ==========================================================================
   Legal pages (terms.html, privacy.html)
   ========================================================================== */
.legal-section { padding-top: 40px; }
.legal { max-width: 760px; margin: 0 auto; }
.legal h2 {
  font-size: 22px; font-weight: 600;
  margin: 48px 0 14px;
  scroll-margin-top: calc(var(--header-h) + 20px);
}
.legal h3 { font-size: 16px; font-weight: 600; font-family: var(--font-body); letter-spacing: 0; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--text-muted); font-size: 16px; line-height: 1.7; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 12px; }
.legal ul { padding-left: 22px; display: grid; gap: 8px; }
.legal li::marker { color: var(--accent-2); }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(196, 181, 253, .4); }
.legal-toc, .legal-summary { padding: 22px 26px; margin-bottom: 28px; }
.legal-toc-title { color: var(--text) !important; font-weight: 600; margin-bottom: 10px; }
.legal-toc ol { padding-left: 22px; columns: 2; column-gap: 32px; }
.legal-toc li { font-size: 15px; break-inside: avoid; }
.legal-toc a { text-decoration: none; color: var(--text-muted); }
.legal-toc a:hover { color: var(--text); }
.legal-summary { border-color: var(--border-strong); }
.legal-summary li { color: var(--text); }
/* Highlight for details you still need to fill in — remove the <mark> once done */
mark.todo {
  background: rgba(252, 211, 77, .14);
  color: #fcd34d;
  padding: 0 4px; border-radius: 4px;
}
@media (max-width: 640px) {
  .legal-toc ol { columns: 1; }
  .legal h2 { font-size: 20px; margin-top: 40px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 36px;
  background: linear-gradient(180deg, transparent, rgba(124, 58, 237, .05));
}
.footer-top {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 32px;
}
.footer-brand p { color: var(--text-dim); font-size: 14px; margin-top: 14px; max-width: 280px; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer-nav a { color: var(--text-muted); font-size: 15px; }
.footer-nav a:hover { color: var(--text); }
.socials { list-style: none; display: flex; gap: 10px; }
.socials a {
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--text-muted);
  transition: color .2s, border-color .2s, box-shadow .2s;
}
.socials a:hover { color: #fff; border-color: var(--border-strong); box-shadow: 0 0 18px -2px var(--accent-glow); }
.socials svg { width: 18px; height: 18px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(139, 92, 246, .08);
  color: var(--text-dim); font-size: 14px;
}
.legal-links { list-style: none; display: flex; gap: 20px; }
.legal-links a { color: var(--text-dim); }
.legal-links a:hover { color: var(--text); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .features-grid,
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-standout { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: inline-flex; }
  .header-actions .btn { padding: 10px 16px; font-size: 14px; }

  /* Collapsed mobile nav: a panel that drops below the header */
  .main-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: rgba(10, 10, 15, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px 20px;
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; }
  .main-nav a { padding: 14px 16px; font-size: 17px; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 80px 0; }
  .hero { padding: 80px 0 90px; }

  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }

  .features-grid,
  .testimonials-grid,
  .pricing-grid { grid-template-columns: 1fr; }

  .explain-panel { grid-template-columns: 1fr; }
  .explain-col + .explain-col { border-left: 0; border-top: 1px solid var(--border); }

  .step { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
  .step::before { width: 46px; height: 46px; font-size: 20px; border-radius: 13px; }

  .footer-top { flex-direction: column; }
  .brand img { height: 30px; }
}

/* Two-column testimonials: stagger every second card instead */
@media (min-width: 641px) and (max-width: 1024px) {
  .testimonials-grid > :nth-child(3n + 2) { transform: none; }
  .testimonials-grid > :nth-child(2n) { transform: translateY(-32px); }
}

/* Feature rows + testimonials reflow */
@media (max-width: 960px) {
  .frow { grid-template-columns: 1fr; gap: 28px; padding: 20px 0; }
  .frow.is-reversed .fviz { order: 0; }
  .frow-text p { max-width: none; }
  .testimonials-layout { grid-template-columns: 1fr; gap: 24px; }
  .testimonials-head { position: static; text-align: center; }
}
@media (max-width: 640px) {
  .testimonials-grid { grid-template-columns: 1fr; padding-top: 0; }
  .testimonials-grid > :nth-child(3n + 2) { transform: none; }
  .stealth-badge { width: 100px; height: 100px; }
  .stealth-badge svg { width: 44px; height: 44px; }
  .fviz-hover { aspect-ratio: auto; gap: 24px; padding: 52px 16px 32px; }
}

@media (max-width: 380px) {
  .header-actions .btn-download-label { display: none; } /* icon-only on tiny screens */
}

/* ==========================================================================
   Reduced motion: no drifting, "visible" held at full opacity
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .blob { animation: none !important; }
  .visible-word {
    animation: none !important;
    opacity: 1;
    background-position: 30% 50%;
    filter: drop-shadow(0 0 16px rgba(139, 92, 246, .6));
  }
}
