/* ============================================================
   Metatron — marketing site
   Design system: near-black canvas, single emerald accent,
   Space Grotesk (display) / Hanken Grotesk (prose) / JetBrains Mono (code)
   ============================================================ */

:root {
  /* canvas */
  --bg:            #08090a;
  --bg-1:          #0c0e0f;   /* elevated panels */
  --bg-2:          #111416;   /* cards */
  --bg-3:          #171b1e;   /* inset / hover */

  /* lines */
  --line:          rgba(255,255,255,0.07);
  --line-strong:   rgba(255,255,255,0.13);

  /* ink */
  --ink:           #e9ecee;
  --ink-soft:      #aab1b6;
  --ink-mute:      #767d83;
  --ink-faint:     #4c5256;

  /* accent — emerald */
  --accent:        #34d399;
  --accent-bright: #5ff0bb;
  --accent-dim:    #1b6f54;
  --accent-ink:    #04140e;     /* text on accent fills */
  --accent-glow:   rgba(52,211,153,0.55);
  --accent-wash:   rgba(52,211,153,0.10);

  /* contrast colors for before/after */
  --bad:           #f0716f;
  --bad-wash:      rgba(240,113,111,0.12);
  --good:          var(--accent);
  --good-wash:     var(--accent-wash);

  /* type */
  --sans:    "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* layout */
  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 56px);
  --radius: 14px;
  --radius-sm: 9px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* mono helpers */
.mono { font-family: var(--mono); }
.kicker {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.kicker::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  border-radius: 1px;
  transform: rotate(45deg);
}

/* ---------- layout primitives ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
section { position: relative; }
.section-pad { padding-block: clamp(40px, 5vw, 72px); }
.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 15px var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand svg { width: 26px; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink-soft); font-size: 14.5px; transition: color .18s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 var(--accent-glow); }
.btn-primary:hover { background: var(--accent-bright); box-shadow: 0 8px 30px -8px var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--ink-faint); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 9px; }
.btn svg { width: 17px; height: 17px; }

.link-arrow { color: var(--ink-soft); font-size: 15px; display: inline-flex; align-items: center; gap: 7px; transition: color .18s, gap .18s; }
.link-arrow:hover { color: var(--accent); gap: 11px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(40px, 7vw, 80px); }
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 70px);
  align-items: center; min-height: min(65vh, 580px);
  padding-block: clamp(32px, 4vw, 54px);
}
.hero-copy { max-width: 600px; }
.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 0.98; letter-spacing: -0.035em;
  margin-top: 22px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  margin-top: 24px; font-size: clamp(17px, 1.9vw, 20px);
  color: var(--ink-soft); line-height: 1.55; max-width: 540px; text-wrap: pretty;
}
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero-meta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 18px 26px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); opacity: .8; }

.hero-art { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; margin-inline: auto; }
.hero-art svg { width: 100%; height: 100%; overflow: visible; }
/* faint radial halo behind cube */
.hero-art::after {
  content: ""; position: absolute; inset: 8%;
  background: radial-gradient(circle at 50% 50%, var(--accent-wash), transparent 62%);
  filter: blur(8px); z-index: -1; pointer-events: none;
}

/* background grid + glow for hero */
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg .grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 35%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 60% 35%, #000 0%, transparent 75%);
  opacity: .5;
}

/* cube svg styling (shared) */
.cube-line { stroke: var(--line-strong); stroke-width: 1; fill: none; }
.cube-line.lit { stroke: var(--accent); }
.cube-node { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.cube-node-core { fill: var(--accent); }
.cube-packet { fill: var(--accent); opacity: .9; filter: drop-shadow(0 0 4px var(--accent-glow)); }
.cube-packet.bright { fill: var(--accent-bright); opacity: 1; filter: drop-shadow(0 0 7px var(--accent-glow)); }

/* ---------- generic section header ---------- */
.sec-head { max-width: 720px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -0.03em; margin-top: 16px; }
.sec-head p { margin-top: 18px; color: var(--ink-soft); font-size: clamp(16px,1.8vw,19px); text-wrap: pretty; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head.center .kicker { justify-content: center; }

/* ---------- product screenshot ---------- */
.shot { margin: 48px auto 0; max-width: 1080px; }
.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset,
              0 30px 70px -30px rgba(0,0,0,0.85),
              0 0 0 1px rgba(0,0,0,0.4);
}
.shot figcaption {
  margin-top: 16px; text-align: center;
  color: var(--ink-mute); font-size: 14px;
}
@media (max-width: 820px) { .shot { margin-top: 32px; } }

/* ---------- problem ---------- */
.problem { background: var(--bg); }
.problem-lead { font-family: var(--display); font-size: clamp(24px,3vw,34px); line-height: 1.18; letter-spacing: -0.02em; max-width: 880px; }
.problem-lead .mute { color: var(--ink-faint); }
.fail-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fail { background: var(--bg-1); padding: 28px 26px; }
.fail-n { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: .1em; }
.fail h4 { font-size: 18px; margin-top: 14px; color: var(--ink); }
.fail p { margin-top: 10px; color: var(--ink-mute); font-size: 14.5px; line-height: 1.55; }
.fail h4 .x { color: var(--bad); margin-right: 7px; font-family: var(--mono); }

/* ---------- pipeline / how it works ---------- */
.pipe-stage { margin-top: 40px; position: relative; }
.pstep-mobile { display: none; }   /* shown only on the mobile (vertical) pipeline */
/* the 5 loop cards are placed on the vertices of a regular pentagon by JS */
.pipe {
  position: relative;
  max-width: 1040px;
  margin-inline: auto;
}
.pstep {
  position: absolute;
  width: clamp(172px, 16.5vw, 214px);
  padding: 0;
  opacity: 0;
  transform: translateY(14px);
}
.pstep.in { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.pcard {
  position: relative; z-index: 2;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 16px; min-height: 150px;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.pstep.gate .pcard { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); box-shadow: inset 0 0 0 1px var(--accent-wash); }
.pcard.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-wash), 0 12px 40px -18px var(--accent-glow); transform: translateY(-3px); }
.picon { width: 30px; height: 30px; color: var(--accent); }
.picon svg { width: 100%; height: 100%; }
.ptag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.pcard h4 { font-size: 17px; letter-spacing: -0.01em; line-height: 1.12; }
.pcard p { font-size: 13px; color: var(--ink-mute); line-height: 1.45; margin-top: auto; }
.pstep.proc .pcard { background: var(--bg-1); border-style: dashed; }
.proc-label { color: var(--accent); }

/* connector svg overlay */
.pipe-wires { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wire-base { stroke: var(--line-strong); stroke-width: 2; fill: none; }
.wire-pulse { stroke: var(--accent); stroke-width: 2.4; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--accent-glow)); }
.wire-chevron { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px var(--accent-glow)); }
/* feedback return arc */
.wire-feedback-base { stroke: color-mix(in oklab, var(--accent) 45%, var(--line-strong)); stroke-width: 1.6; fill: none; stroke-dasharray: 2 5; opacity: .65; }
.wire-feedback-pulse { stroke: var(--accent); stroke-width: 2.2; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 5px var(--accent-glow)); }
.fb-arrow-head { fill: var(--accent); }
.wire-label { font-family: var(--mono); font-size: 11px; letter-spacing: .02em; fill: var(--accent); }
.wire-label-bg { fill: var(--bg); stroke: color-mix(in oklab, var(--accent) 30%, transparent); stroke-width: 1; }

.pipe-note { margin-top: 30px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); display: flex; align-items: center; gap: 10px; }
.pipe-note b { color: var(--accent); font-weight: 500; }

/* ---------- anatomy of a decision (flip card) ---------- */
.anat-layout { margin-top: 60px; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px,5vw,64px); align-items: center; }
.anat-copy h3 { font-size: clamp(22px,2.6vw,30px); margin-bottom: 16px; }
.anat-copy p { color: var(--ink-soft); margin-bottom: 18px; text-wrap: pretty; }
.anat-fieldlist { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.anat-fieldlist li { background: var(--bg-1); padding: 12px 16px; display: flex; gap: 14px; align-items: baseline; font-size: 14px; }
.anat-fieldlist .fk { font-family: var(--mono); font-size: 12px; color: var(--accent); min-width: 96px; }
.anat-fieldlist .fv { color: var(--ink-mute); }

.flip-wrap { perspective: 1600px; }
.flip-hint { text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--ink-faint); margin-top: 16px; letter-spacing: .04em; }
.flip-card {
  position: relative; width: 100%; aspect-ratio: 5/4.4;
  transform-style: preserve-3d; transition: transform .8s var(--ease);
  cursor: pointer;
}
.flip-card.flipped { transform: rotateY(180deg); }
.flip-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  padding: 24px; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.8);
}
.flip-back { transform: rotateY(180deg); }
.fcard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fcard-id { font-family: var(--mono); font-size: 12px; color: var(--ink-mute); }
.badge { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--ink-soft); }
.badge.canon { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 45%, transparent); background: var(--accent-wash); }
.fcard-title { font-family: var(--display); font-size: 21px; letter-spacing: -.02em; margin-top: 18px; }
.fcard-sub { color: var(--ink-mute); font-size: 14px; margin-top: 8px; }
.fcard-conf { margin-top: auto; }
.conf-row { display: flex; align-items: center; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--ink-mute); margin-bottom: 7px; }
.conf-bar { height: 6px; border-radius: 999px; background: var(--bg-3); overflow: hidden; }
.conf-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent-dim), var(--accent)); border-radius: 999px; transition: width 1.1s var(--ease); }
.flip-btn { position: absolute; bottom: 16px; right: 16px; z-index: 4; }

/* back face = structured record */
.rec { font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); overflow: auto; }
.rec .k { color: var(--accent); }
.rec .s { color: #e3c08a; }
.rec .n { color: #8ab4ff; }
.rec .c { color: var(--ink-faint); }
.rec .p { color: var(--ink-mute); }

/* ---------- before / after ---------- */
.ba-toggle { display: inline-flex; padding: 4px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; margin-top: 30px; gap: 4px; }
.ba-toggle button {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .02em;
  padding: 9px 16px; border-radius: 8px; border: none; cursor: pointer;
  background: transparent; color: var(--ink-mute); transition: color .2s, background .2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.ba-toggle button .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .6; }
.ba-toggle button[data-on="bad"].active { background: var(--bad-wash); color: var(--bad); }
.ba-toggle button[data-on="good"].active { background: var(--good-wash); color: var(--good); }

.editor {
  margin-top: 22px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--bg-1); overflow: hidden; box-shadow: 0 30px 80px -50px rgba(0,0,0,.9);
}
.editor-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); display: block; }
.editor-file { font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); }
.editor-state { margin-left: auto; font-family: var(--mono); font-size: 11.5px; padding: 3px 10px; border-radius: 999px; letter-spacing: .05em; transition: all .3s; }
.editor-state.bad { color: var(--bad); background: var(--bad-wash); }
.editor-state.good { color: var(--good); background: var(--good-wash); }

.code { margin: 0; padding: 22px 4px 22px 0; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; overflow-x: auto; }
.code .ln { display: grid; grid-template-columns: 46px 1fr; align-items: start; }
.code .ln > .gut { color: var(--ink-faint); text-align: right; padding-right: 16px; user-select: none; font-size: 12px; }
.code .ln > .src { white-space: pre; }
.code .ln.mark-bad { background: var(--bad-wash); box-shadow: inset 3px 0 0 var(--bad); }
.code .ln.mark-good { background: var(--good-wash); box-shadow: inset 3px 0 0 var(--good); }
.tok-kw { color: #c699ff; } .tok-fn { color: #8ab4ff; } .tok-str { color: #e3c08a; }
.tok-com { color: var(--ink-faint); } .tok-num { color: #7fd0ff; } .tok-typ { color: var(--accent-bright); }
.code-anno { padding: 14px 20px; border-top: 1px solid var(--line); font-size: 13.5px; display: flex; gap: 11px; align-items: flex-start; }
.code-anno .tag { font-family: var(--mono); font-size: 11px; padding: 2px 8px; border-radius: 6px; flex-shrink: 0; margin-top: 1px; }
.code-anno.bad .tag { color: var(--bad); background: var(--bad-wash); } .code-anno.bad { color: var(--ink-soft); }
.code-anno.good .tag { color: var(--good); background: var(--good-wash); } .code-anno.good { color: var(--ink-soft); }
.swap { display: none; } .swap.show { display: block; animation: codeIn .45s var(--ease); }
@keyframes codeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- pillars (why self-hosted) ---------- */
.pillars { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 56px; }
.pillar { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: border-color .25s, transform .25s; }
.pillar:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.pillar .picon2 { width: 34px; height: 34px; color: var(--accent); margin-bottom: 18px; }
.pillar h3 { font-size: 19px; margin-bottom: 11px; }
.pillar p { color: var(--ink-mute); font-size: 14.5px; line-height: 1.55; text-wrap: pretty; }

/* ---------- open source ---------- */
.oss { background: linear-gradient(180deg, var(--bg), var(--bg-1)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.oss-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px,5vw,60px); align-items: center; }
.oss h2 { font-size: clamp(32px,4.6vw,54px); letter-spacing: -.03em; }
.oss h2 em { font-style: normal; color: var(--accent); }
.oss p { margin-top: 20px; color: var(--ink-soft); font-size: 18px; text-wrap: pretty; max-width: 520px; }
.oss-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.oss-saas { margin-top: 26px; font-size: 14.5px; color: var(--ink-mute); }
.oss-saas a { color: var(--accent); }
.oss-saas a:hover { text-decoration: underline; }
/* terminal install card */
.term { background: #060708; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px -50px rgba(0,0,0,.9); }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.term-bar .dots i { background: var(--bg-3); }
.term-bar span { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-left: 6px; }
.term-body { padding: 18px; font-family: var(--mono); font-size: 13px; line-height: 1.95; }
.term-body .pr { color: var(--accent); }
.term-body .cm { color: var(--ink); }
.term-body .ot { color: var(--ink-mute); }
.term-body .hl { color: var(--accent-bright); }

/* repo meta chips */
.repo-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-mute); }
.repo-meta span { display: inline-flex; align-items: center; gap: 8px; }
.repo-meta svg { width: 15px; height: 15px; color: var(--ink-soft); }

/* ---------- email capture ---------- */
.capture { text-align: center; }
.capture-card {
  max-width: 620px; margin: 0 auto; margin-top: 12px;
}
.email-form { margin-top: 34px; display: flex; gap: 10px; max-width: 480px; margin-inline: auto; }
.email-form input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 13px 16px; color: var(--ink); font-family: var(--sans); font-size: 15px; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.email-form input::placeholder { color: var(--ink-faint); }
.email-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash); }
.email-note { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); display: inline-flex; align-items: center; gap: 8px; }
.email-ok { margin-top: 22px; color: var(--accent); font-size: 15px; min-height: 22px; opacity: 0; transition: opacity .3s; }
.email-ok.show { opacity: 1; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 54px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.foot-brand { max-width: 320px; }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { color: var(--ink-mute); font-size: 13.5px; line-height: 1.55; }
.foot-cols { display: flex; gap: clamp(30px,6vw,80px); flex-wrap: wrap; }
.foot-col h5 { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 14px; font-weight: 500; }
.foot-col a { display: block; color: var(--ink-soft); font-size: 14.5px; margin-bottom: 11px; transition: color .18s; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* ---------- scroll reveal (generic) ---------- */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* ---------- mobile nav toggle ---------- */
.nav-burger { display: none; background: none; border: none; color: var(--ink); cursor: pointer; padding: 6px; }
.nav-burger svg { width: 24px; height: 24px; }

/* ============================================================
   FAQ — accordion of common questions
   ============================================================ */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 22px; transition: border-color .2s var(--ease), background .2s var(--ease);
}
.faq-item[open] { border-color: var(--line-strong); background: var(--bg-1); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 0; display: flex; align-items: center; gap: 14px;
  font-family: var(--display); font-size: clamp(16px, 2.1vw, 19px); font-weight: 500; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; margin-left: auto; flex: none; width: 11px; height: 11px;
  border-right: 2px solid var(--ink-mute); border-bottom: 2px solid var(--ink-mute);
  transform: rotate(45deg); transition: transform .25s var(--ease); transform-origin: 60% 60%;
}
.faq-item[open] summary::after { transform: rotate(225deg); border-color: var(--accent); }
.faq-a { padding: 0 0 20px; }
.faq-a p { color: var(--ink-soft); line-height: 1.7; max-width: 70ch; margin: 0; }
.faq-a a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-dim); }
.faq-a a:hover { border-bottom-color: var(--accent); }

/* ============================================================
   responsive
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 10px; min-height: 0; padding-block: 30px 10px; }
  .hero-art { grid-row: 1; max-width: 360px; }
  .hero-copy { order: 2; }
  .anat-layout { grid-template-columns: 1fr; }
  .oss-inner { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .fail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-burger { display: inline-flex; }
  /* pipeline → vertical */
  .pipe { min-height: 0; display: flex; flex-direction: column; gap: 38px; max-width: none; }
  .pstep { position: relative; left: auto !important; top: auto !important; width: 100%; padding: 0; }
  .pipe-wires { display: none; }
  .pcard { min-height: 0; flex-direction: row; align-items: center; gap: 14px; }
  .pcard p { display: none; }
  .pcard .ptag { margin-left: auto; }
  .pstep::after {
    content: ""; position: absolute; left: 28px; bottom: -38px; height: 38px; width: 2px;
    background: var(--line-strong); transform: translateY(0);
  }
  .pstep:last-child::after { display: none; }
  /* mobile-only feedback step (no edges to draw a return arc on mobile) */
  .pstep-mobile { display: block; opacity: 1; transform: none; }
  /* the connector leading into the feedback step is a dashed accent (it's a loop-back) */
  .pstep:has(+ .pstep.loopback)::after {
    background: repeating-linear-gradient(var(--accent) 0 5px, transparent 5px 10px);
    opacity: .9;
  }
  .pstep.loopback .pcard {
    flex-direction: column; align-items: flex-start; gap: 8px;
    border-style: dashed; border-color: color-mix(in oklab, var(--accent) 45%, var(--line));
    box-shadow: inset 0 0 0 1px var(--accent-wash);
  }
  .pstep.loopback .pcard p { display: block; font-size: 12.5px; color: var(--ink-mute); }
  .pstep.loopback .ptag { margin-left: 0; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .email-form { flex-direction: column; }
  .email-form .btn { justify-content: center; }
  .ba-toggle { width: 100%; }
  .ba-toggle button { flex: 1; justify-content: center; }
}

/* ============================================================
   voices / testimonials — agent quotes, looping marquee
   ============================================================ */
.voices .voice-marquee {
  margin-top: 38px;
  overflow: hidden;
  /* fade the cards in/out at the edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.voices .voice-track {
  display: flex; gap: 18px;
  width: max-content;
}
.voices .voice-set {
  display: flex; gap: 18px;
  animation: voices-scroll 48s linear infinite;
}
/* each set slides exactly one set-width (+ one gap) left, then the loop is seamless */
@keyframes voices-scroll {
  to { transform: translateX(calc(-100% - 18px)); }
}
.voices .voice-marquee:hover .voice-set,
.voices .voice-marquee:focus-within .voice-set {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .voices .voice-marquee { -webkit-mask-image: none; mask-image: none; }
  .voices .voice-track { width: auto; flex-wrap: wrap; }
  .voices .voice-set { animation: none; flex-wrap: wrap; }
  .voices .voice-set[aria-hidden="true"] { display: none; }
}
.voice-logo { flex: none; }
.voice-card {
  margin: 0;
  flex: 0 0 min(460px, 84vw);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
  display: flex; flex-direction: column; gap: 18px;
}
.voice-card blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.voice-card blockquote::before { content: "\201C"; color: var(--accent); }
.voice-card blockquote::after  { content: "\201D"; color: var(--accent); }
.voice-card blockquote em { font-style: normal; color: var(--accent-bright); }
.voice-by {
  margin-top: auto;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-family: var(--mono);
}
.voice-badge { color: var(--accent); font-size: 11px; }
.voice-who  { color: var(--ink); font-weight: 600; font-size: 13px; letter-spacing: .02em; }
.voice-meta { color: var(--ink-mute); font-size: 12px; }
.voice-meta::before { content: "\00B7\00A0"; color: var(--ink-faint); }

/* ============================================================
   reduced motion: show end-state, kill loops
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal, .pstep { opacity: 1 !important; transform: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
