/* ============================================================
   Scale-Proof — dark judgment-layer design system
   Tavily's structure & calm-premium craft, ScaleProof's identity.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* surfaces */
  --ink:        #0d1117;
  --ink-2:      #0b0e14;
  --surface:    #161b22;
  --surface-2:  #1c2230;
  --border:     #30363d;
  --border-2:   #232a35;

  /* text */
  --text:       #e6edf3;
  --text-2:     #b6c2cf;
  --muted:      #8b949e;

  /* brand + gates */
  --purple:     #8957e5;
  --purple-2:   #a371f7;
  --blue:       #1f6feb;
  --green:      #2ea043;
  --amber:      #d29922;
  --red:        #f85149;

  /* tints */
  --purple-tint: rgba(137, 87, 229, 0.12);
  --green-tint:  rgba(46, 160, 67, 0.12);
  --red-tint:    rgba(248, 81, 73, 0.12);

  /* type */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* geometry */
  --radius:     16px;
  --radius-lg:  22px;
  --pill:       999px;
  --maxw:       1160px;
  --gutter:     24px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--ink);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.035em; line-height: 1.05; margin: 0; }

/* ---------- Focus + skip link (a11y) ---------- */
:where(a, button, .opt, .quiz__back, kbd, [tabindex]):focus-visible {
  outline: 2px solid var(--purple-2);
  outline-offset: 3px;
  border-radius: 10px;
}
.opt:focus-visible { border-color: var(--purple); outline-offset: 2px; }
.skip {
  position: absolute; left: -9999px; top: 10px; z-index: 100;
  background: var(--purple); color: #fff; font-size: 14px; font-weight: 500;
  padding: 10px 18px; border-radius: var(--pill);
}
.skip:focus { left: 16px; }

/* ---------- Layout primitives ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 132px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }
.center { text-align: center; }

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--purple-2);
  text-transform: none;
  margin: 0 0 18px;
  display: inline-block;
}
.eyebrow::before { content: ""; }

.h2 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: -0.04em; }
.lead { color: var(--text-2); font-size: clamp(17px, 2vw, 20px); max-width: 62ch; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: var(--pill);
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  border: 1px solid transparent; transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(180deg, #9a6cf0, var(--purple));
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 8px 24px -10px rgba(137,87,229,.8);
}
.btn--primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 30px -8px rgba(137,87,229,.9); transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: #4a5566; background: var(--surface-2); }
.btn--light { background: var(--text); color: var(--ink); }
.btn--light:hover { transform: translateY(-1px); }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--block { width: 100%; justify-content: center; }
.arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Announcement bar ---------- */
.announce {
  background: linear-gradient(90deg, var(--purple-tint), transparent 60%);
  border-bottom: 1px solid var(--border-2);
  font-size: 13.5px; color: var(--text-2);
  text-align: center; padding: 9px 16px;
}
.announce a { color: var(--text); border-bottom: 1px solid var(--purple); padding-bottom: 1px; }
.announce a:hover { color: var(--purple-2); }
.announce .hex { color: var(--purple-2); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13,17,23,.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-2);
}
.nav__inner { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; letter-spacing: -0.02em; font-size: 16px; }
.brand svg { width: 22px; height: 22px; }
.brand b { font-weight: 600; }
.nav__links { display: flex; gap: 26px; margin-left: 12px; }
.nav__links a { color: var(--text-2); font-size: 14.5px; transition: color .15s; }
.nav__links a:hover { color: var(--text); }
.nav__spacer { flex: 1; }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(56px, 8vw, 104px) clamp(64px, 9vw, 120px);
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(13,17,23,.72) 0%, rgba(13,17,23,.12) 42%, rgba(13,17,23,.10) 68%, rgba(13,17,23,.45) 100%),
    url("assets/hero-bg.jpg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}
/* CSS aurora kept as a faint animated shimmer layered over the HD image */
.aurora {
  position: absolute; inset: auto 0 -30% 0; height: 90%;
  background:
    radial-gradient(40% 55% at 30% 100%, rgba(137,87,229,.30), transparent 70%),
    radial-gradient(38% 52% at 62% 100%, rgba(31,111,235,.24), transparent 70%),
    radial-gradient(30% 45% at 82% 100%, rgba(46,160,67,.20), transparent 72%);
  filter: blur(46px); pointer-events: none; z-index: 0;
  mix-blend-mode: screen; opacity: .55;
  animation: drift 16s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateX(-3%) scale(1); } to { transform: translateX(3%) scale(1.06); } }
.hero__inner { position: relative; z-index: 1; text-align: center; }
.hero h1 {
  font-size: clamp(42px, 7.4vw, 82px);
  letter-spacing: -0.05em; line-height: 0.98;
  margin: 18px auto 0;
}
.hero h1 .line2 {
  background: linear-gradient(100deg, var(--green), var(--purple-2) 70%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__sub { color: var(--text-2); font-size: clamp(17px, 2.3vw, 21px); max-width: 40ch; margin: 22px auto 30px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero__note { margin-top: 16px; font-size: 13px; color: var(--muted); font-family: var(--mono); }

.pill-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 14px; border-radius: var(--pill);
}
.pill-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

/* ---------- Hero scanner mock ---------- */
.scanner {
  margin: 48px auto 0; max-width: 760px; position: relative; z-index: 1;
  background: linear-gradient(180deg, var(--surface), #12161d);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(137,87,229,.06);
  overflow: hidden; text-align: left;
}
.scanner__bar { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--border-2); background: rgba(0,0,0,.2); }
.scanner__bar .tl { width: 11px; height: 11px; border-radius: 50%; background: #30363d; }
.scanner__bar .title { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-left: 8px; }
.scanner__body { display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; }
.scanner__log { padding: 20px; border-right: 1px solid var(--border-2); min-height: 260px; }
.scanner__log .row { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 10px; padding: 5px 0; opacity: .25; transition: opacity .35s; }
.scanner__log .row.on { opacity: 1; }
.scanner__log .row .g { color: var(--muted); }
.scanner__log .row .sev { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.scanner__log .row.on .sev.red { background: var(--red); box-shadow: 0 0 8px var(--red); }
.scanner__log .row.on .sev.amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.scanner__log .row.on .sev.green { background: var(--green); box-shadow: 0 0 8px var(--green); }

.scanner__score { padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.scanner__score .label { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.scanner__num { font-size: 72px; font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.scanner__bucket { font-size: 13px; font-weight: 500; padding: 4px 12px; border-radius: var(--pill); }
.gatebar { display: flex; gap: 4px; margin-top: 16px; width: 100%; }
.gatebar .seg { flex: 1; height: 8px; border-radius: 3px; background: var(--border); transform: scaleY(.4); transform-origin: bottom; transition: transform .3s var(--ease), background .3s; }
.gatebar .seg.fill { transform: scaleY(1); }
.gatebar .seg.red { background: var(--red); }
.gatebar .seg.amber { background: var(--amber); }
.gatebar .seg.green { background: var(--green); }

/* ---------- Trust strip ---------- */
.trust { border-block: 1px solid var(--border-2); background: var(--ink-2); }
.trust__inner { padding-block: 30px; text-align: center; }
.trust__line { font-size: 14.5px; color: var(--text-2); }
.trust__line b { color: var(--text); font-weight: 500; }
.trust__stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; margin-top: 22px; }
.trust__stats .stat { display: flex; flex-direction: column; gap: 2px; }
.trust__stats .stat b { font-size: 24px; font-weight: 500; letter-spacing: -0.03em; }
.trust__stats .stat span { font-size: 12.5px; color: var(--muted); font-family: var(--mono); }
.trust__stats .stat .accent-red { color: var(--red); }

/* ---------- Feature blocks ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 104px); }
.feature--flip .feature__media { order: -1; }
.feature__body h3 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 16px; }
.feature__body p { color: var(--text-2); font-size: 17px; }
.feature__body .kicker { font-family: var(--mono); font-size: 12.5px; color: var(--green); margin-bottom: 14px; }
.feature__link { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; color: var(--purple-2); font-size: 15px; font-weight: 500; }
.feature__link:hover { color: var(--text); }

.card {
  background: linear-gradient(180deg, var(--surface), #12161d);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -40px rgba(0,0,0,.8);
  overflow: hidden;
}
.card__head { padding: 12px 16px; border-bottom: 1px solid var(--border-2); font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card__head .dot3 { display: flex; gap: 5px; }
.card__head .dot3 i { width: 9px; height: 9px; border-radius: 50%; background: #2b3240; }
.card__body { padding: 20px; }

/* score demo card */
.mini-score { display: flex; align-items: baseline; gap: 12px; }
.mini-score b { font-size: 46px; font-weight: 500; letter-spacing: -.04em; color: var(--amber); }
.mini-score .of { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.mini-score .tag { margin-left: auto; font-size: 12px; padding: 4px 11px; border-radius: var(--pill); background: var(--red-tint); color: var(--red); font-weight: 500; }
.mini-gates { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 16px; }
.mini-gates i { height: 26px; border-radius: 4px; }
.mono-list { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); margin-top: 18px; display: grid; gap: 8px; }
.mono-list .f { display: flex; gap: 10px; align-items: flex-start; }
.mono-list .f .d { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; }

/* cheat-code paste card */
.code {
  font-family: var(--mono); font-size: 13px; line-height: 1.7;
  color: var(--text-2); background: var(--ink-2);
  border: 1px solid var(--border-2); border-radius: 12px; padding: 16px; overflow-x: auto;
  white-space: pre;
}
.code .cm { color: var(--muted); }
.code .ok { color: var(--green); }
.code .k { color: var(--purple-2); }
.paste-steps { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.paste-steps .step { display: flex; align-items: center; gap: 7px; }
.paste-steps .chip { background: var(--surface); border: 1px solid var(--border); border-radius: var(--pill); padding: 4px 10px; color: var(--text-2); }
.score-move { color: var(--green); font-weight: 500; }

/* certificate card */
.cert { text-align: center; padding: 36px 24px; position: relative; }
.cert::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 0%, var(--green-tint), transparent 70%); pointer-events: none; }
.cert .seal { width: 62px; height: 62px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--green); color: var(--green); }
.cert h4 { font-size: 20px; font-weight: 500; letter-spacing: -.02em; margin: 0 0 4px; }
.cert .sub { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cert .meta { margin-top: 20px; display: flex; justify-content: center; gap: 26px; font-family: var(--mono); font-size: 11.5px; color: var(--text-2); }
.cert .meta b { display: block; color: var(--green); font-size: 15px; }

/* ---------- Crew ---------- */
.crew-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.agent {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: transform .2s var(--ease), border-color .2s, box-shadow .3s;
  position: relative; overflow: hidden;
}
.agent::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--accent, var(--purple)), transparent); opacity: .5; }
.agent:hover { transform: translateY(-3px); border-color: #45505f; box-shadow: 0 24px 48px -30px rgba(0,0,0,.9); }
.agent .role { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.agent .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; background: var(--surface-2); border: 1px solid var(--border); }
.agent .gates { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.agent h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -.02em; }
.agent .flag { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--purple-2); background: var(--purple-tint); padding: 2px 8px; border-radius: var(--pill); margin-left: 8px; vertical-align: middle; }
.agent p { color: var(--text-2); font-size: 14.5px; margin: 0; }

/* ---------- Gates ---------- */
.gates-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gate {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; padding: 18px 18px;
  transition: border-color .2s, background .2s;
}
.gate:hover { border-color: var(--border); background: var(--surface-2); }
.gate .n { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 24px; flex: none; padding-top: 2px; }
.gate .sev { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.gate h4 { font-size: 15px; font-weight: 500; margin: 0 0 3px; letter-spacing: -.01em; }
.gate p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.5; }
.sev-red { background: var(--red); box-shadow: 0 0 8px var(--red-tint); }
.sev-amber { background: var(--amber); }
.sev-green { background: var(--green); }
.sev-blue { background: var(--blue); }

/* ---------- Comparison ---------- */
.compare { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 720px; }
table.cmp th, table.cmp td { padding: 16px 18px; text-align: center; border-bottom: 1px solid var(--border-2); font-size: 14px; }
table.cmp thead th { font-weight: 500; color: var(--muted); font-size: 13px; font-family: var(--mono); }
table.cmp tbody th { text-align: left; font-weight: 400; color: var(--text-2); font-size: 14px; }
table.cmp td { color: var(--muted); }
table.cmp .win { color: var(--green); font-weight: 600; }
table.cmp col.sp, table.cmp .sp-col { background: var(--purple-tint); }
table.cmp thead .sp-col { color: var(--purple-2); font-weight: 600; }
table.cmp tr:last-child td, table.cmp tr:last-child th { border-bottom: none; }

/* ---------- CLI showcase ---------- */
.cli { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.terminal {
  background: #05070a; border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-family: var(--mono); font-size: 13px; line-height: 1.75; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.95);
}
.terminal__bar { display: flex; align-items: center; gap: 7px; padding: 12px 15px; border-bottom: 1px solid var(--border-2); }
.terminal__bar i { width: 11px; height: 11px; border-radius: 50%; }
.terminal__bar i:nth-child(1){ background:#ff5f57; } .terminal__bar i:nth-child(2){ background:#febc2e; } .terminal__bar i:nth-child(3){ background:#28c840; }
.terminal__bar .t { margin-left: 8px; color: var(--muted); font-size: 12px; }
.terminal__body { padding: 18px 18px 22px; color: var(--text-2); }
.terminal__body .p { color: var(--green); }
.terminal__body .u { color: var(--text); }
.terminal__body .c { color: var(--muted); }
.terminal__body .a { color: var(--purple-2); }
.terminal__body .disp { color: var(--blue); }
.terminal__body .line { display: block; white-space: pre-wrap; }
.terminal__cursor { display: inline-block; width: 8px; height: 15px; background: var(--green); vertical-align: -2px; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.cli__body h2 { margin-bottom: 18px; }
.cli__steps { display: grid; gap: 16px; margin-top: 26px; }
.cli__steps .s { display: flex; gap: 14px; }
.cli__steps .s .num { font-family: var(--mono); font-size: 12px; color: var(--purple-2); border: 1px solid var(--border); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; flex: none; }
.cli__steps .s b { display: block; font-weight: 500; margin-bottom: 2px; font-size: 15px; }
.cli__steps .s p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- Stats band ---------- */
.band { border-block: 1px solid var(--border-2); background: var(--ink-2); }
.band__scroll { display: flex; gap: 18px; overflow-x: auto; padding-block: 40px; scroll-snap-type: x mandatory; }
.band__scroll::-webkit-scrollbar { height: 0; }
.metric { flex: 0 0 auto; min-width: 240px; scroll-snap-align: start; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; }
.metric .div { position: absolute; top: 0; left: 24px; right: 24px; height: 3px; border-radius: 2px; }
.metric b { display: block; font-size: 40px; font-weight: 500; letter-spacing: -.04em; margin-top: 8px; }
.metric span { color: var(--muted); font-size: 13.5px; }

/* ---------- Pricing ---------- */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tier {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 22px; display: flex; flex-direction: column; position: relative;
}
.tier--win { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 30px 60px -35px rgba(137,87,229,.7); background: linear-gradient(180deg, rgba(137,87,229,.08), var(--surface)); }
.tier--win .badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg,#9a6cf0,var(--purple)); color: #fff; font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: var(--pill); letter-spacing: .02em; white-space: nowrap; }
.tier .name { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.tier .amt { font-size: 40px; font-weight: 500; letter-spacing: -.04em; margin: 10px 0 2px; }
.tier .amt small { font-size: 15px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.tier .blurb { color: var(--muted); font-size: 14px; flex: 1; margin: 10px 0 20px; }
.tier .btn { width: 100%; justify-content: center; }
.price-foot { text-align: center; margin-top: 26px; font-size: 13.5px; color: var(--muted); }
.price-foot b { color: var(--text-2); font-weight: 500; }
.b2b-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.b2b { background: var(--ink-2); border: 1px dashed var(--border); border-radius: var(--radius); padding: 22px 24px; display: flex; align-items: center; gap: 18px; }
.b2b .amt { font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.b2b .amt small { font-size: 13px; color: var(--muted); }
.b2b p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

/* ---------- Quiz (final panel) ---------- */
.quiz-section {
  position: relative; overflow: hidden;
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(13,17,23,.80) 0%, rgba(13,17,23,.35) 45%, rgba(13,17,23,.30) 100%),
    url("assets/cta-bg.jpg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
}
.quiz-section .aurora { opacity: .4; }
.quiz {
  max-width: 680px; margin-inline: auto; position: relative; z-index: 1;
  background: linear-gradient(180deg, var(--surface), #12161d);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: 0 50px 100px -50px rgba(0,0,0,.95);
  min-height: 440px;
}
.quiz__progress { height: 4px; background: var(--border-2); border-radius: var(--pill); overflow: hidden; margin: 0; }
.quiz__progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--purple), var(--green)); transition: width .4s var(--ease); }
.quiz__inner { padding: clamp(26px, 4vw, 44px); }

/* intro */
.quiz-intro { text-align: center; }
.quiz-intro h2 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 12px; }
.quiz-intro p { color: var(--text-2); max-width: 46ch; margin: 0 auto 24px; }
.quiz-intro .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 16px; }

/* question */
.q .count { font-family: var(--mono); font-size: 12px; color: var(--purple-2); letter-spacing: .05em; }
.q .gate-name { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-left: 8px; }
.q h3 { font-size: clamp(20px, 2.6vw, 26px); margin: 14px 0 10px; line-height: 1.2; letter-spacing: -.02em; }
.q .why { color: var(--muted); font-size: 14.5px; margin: 0 0 26px; }
.q .opts { display: grid; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--ink-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; color: var(--text); font-size: 16px; transition: border-color .15s, background .15s, transform .12s;
}
.opt:hover { border-color: var(--purple); background: var(--surface-2); transform: translateX(2px); }
.opt .mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex: none; transition: border-color .15s; }
.opt:hover .mark { border-color: var(--purple); }
.opt kbd { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; }
.quiz__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.quiz__back { background: none; border: none; color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.quiz__back:hover { color: var(--text); }
.quiz__back[hidden] { visibility: hidden; }

/* reveal */
.reveal { text-align: center; }
.reveal__scan { font-family: var(--mono); font-size: 13px; color: var(--text-2); min-height: 220px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.reveal__scan .row { opacity: .3; transition: opacity .3s; display: flex; gap: 10px; justify-content: center; align-items: center; }
.reveal__scan .row.on { opacity: 1; }
.reveal__scan .row .sev { width: 8px; height: 8px; border-radius: 50%; }
.reveal__num { font-size: clamp(72px, 14vw, 118px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.reveal__of { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.reveal__bucket { display: inline-block; font-size: 15px; font-weight: 500; padding: 6px 16px; border-radius: var(--pill); margin-top: 14px; }
.reveal__gatebar { display: flex; gap: 5px; max-width: 420px; margin: 26px auto 0; }
.reveal__gatebar .seg { flex: 1; height: 12px; border-radius: 4px; background: var(--border); transform: scaleY(.35); transform-origin: bottom; transition: transform .35s var(--ease); }
.reveal__gatebar .seg.fill { transform: scaleY(1); }
.reveal__meaning { color: var(--text-2); max-width: 42ch; margin: 20px auto 0; font-size: 15px; }
.reveal__gaps { max-width: 460px; margin: 28px auto 0; display: grid; gap: 10px; text-align: left; }
.reveal__gaps .gap { display: flex; gap: 12px; align-items: flex-start; background: var(--ink-2); border: 1px solid var(--border-2); border-radius: 12px; padding: 14px 16px; }
.reveal__gaps .gap .sev { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.reveal__gaps .gap b { font-weight: 500; font-size: 14.5px; }
.reveal__gaps .gap span { display: block; color: var(--muted); font-size: 12.5px; font-family: var(--mono); margin-top: 2px; }
.reveal__cta { margin-top: 30px; }
.reveal__cta .rec { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.reveal__cta .rec b { color: var(--text-2); }
.reveal__disclaimer { margin-top: 18px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.reveal__restart { background: none; border: none; color: var(--muted); font-size: 13px; margin-top: 14px; text-decoration: underline; }
.reveal__restart:hover { color: var(--text); }
[hidden] { display: none !important; }

/* fade utility */
.fade-in { animation: fade .5s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border-2); background: var(--ink-2); padding-block: 60px 40px; }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand .brand { margin-bottom: 14px; }
.footer__brand p { color: var(--muted); font-size: 14px; max-width: 34ch; }
.footer__brand .creds { font-size: 12.5px; color: var(--text-2); margin-top: 16px; line-height: 1.6; }
.footer__col h5 { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; margin: 0 0 14px; letter-spacing: .04em; }
.footer__col a { display: block; color: var(--text-2); font-size: 14px; padding: 5px 0; transition: color .15s; }
.footer__col a:hover { color: var(--text); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border-2); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; gap: 12px; }
.footer__social { display: flex; gap: 10px; }
.footer__social a { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: border-color .15s, color .15s; }
.footer__social a:hover { border-color: var(--purple); color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  .feature, .cli { grid-template-columns: 1fr; }
  .feature--flip .feature__media { order: 0; }
  .crew-grid { grid-template-columns: repeat(2, 1fr); }
  .gates-grid { grid-template-columns: repeat(2, 1fr); }
  .price-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .scanner__body { grid-template-columns: 1fr; }
  .scanner__log { border-right: none; border-bottom: 1px solid var(--border-2); min-height: auto; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .crew-grid, .gates-grid, .price-grid, .b2b-row, .footer__top { grid-template-columns: 1fr; }
  .nav__cta .btn--ghost { display: none; }
  .trust__stats { gap: 14px 26px; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .aurora { animation: none; }
  .terminal__cursor { animation: none; }
}

/* ============================================================
   DEPTH & CRAFT ENHANCEMENT LAYER (v2)
   Stripe/Linear-grade depth: grain, glass, gradient borders,
   elevation, 3D tilt, motion-gated entrances.
   ============================================================ */

@property --ga { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

/* ---- Global film grain (subtle, on top of everything, non-blocking) ---- */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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");
}

/* ---- Glassmorphic elevation for surfaces ---- */
.card, .agent, .tier, .terminal, .quiz, .scanner, .metric, .b2b, .gate {
  background-image: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.008));
  background-color: rgba(22, 27, 34, .72);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.06) inset,
    0 0 0 1px rgba(255,255,255,.02) inset,
    0 24px 50px -30px rgba(0,0,0,.85);
}
/* keep terminal darker (it's a code surface) */
.terminal { background-color: rgba(5,7,10,.82); }

/* soft top-edge highlight line */
.card::after, .agent::before, .tier::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
  pointer-events: none;
}

/* ---- Animated gradient border (featured surfaces) ---- */
.gborder { position: relative; isolation: isolate; }
.gborder::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; z-index: -1;
  background: conic-gradient(from var(--ga), var(--purple), var(--blue), var(--green), var(--amber), var(--purple));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-border 7s linear infinite; opacity: .9;
}
@keyframes spin-border { to { --ga: 360deg; } }
.tier--win { animation: none; }
.tier--win.gborder::before { opacity: 1; }

/* ---- 3D tilt scaffolding (JS drives --rx/--ry) ---- */
.tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  transform-style: preserve-3d; will-change: transform;
}
.tilt > * { transform: translateZ(0); }
.tilt.is-tilting { transition: transform .08s linear; }

/* glow that tracks the pointer on tilt surfaces */
.tilt-glow { position: relative; overflow: hidden; }
.tilt-glow::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(220px circle at var(--mx,50%) var(--my,50%), rgba(137,87,229,.18), transparent 60%);
}
.tilt-glow:hover::before { opacity: 1; }

/* ---- Section ambient glow meshes ---- */
.section { isolation: isolate; }
.glow-top::before, .glow-mesh::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
}
.glow-top::before {
  background: radial-gradient(60% 40% at 50% -5%, rgba(137,87,229,.14), transparent 70%);
}
.glow-mesh::before {
  background:
    radial-gradient(35% 40% at 12% 20%, rgba(31,111,235,.12), transparent 70%),
    radial-gradient(30% 45% at 88% 78%, rgba(46,160,67,.12), transparent 72%);
}

/* section-level generated backdrops */
.bg-blue, .bg-green { position: relative; background-color: var(--ink); background-size: cover; background-position: center; background-repeat: no-repeat; }
.bg-blue { background-image: linear-gradient(180deg, rgba(13,17,23,.90), rgba(13,17,23,.78)), url("assets/section-blue.jpg"); }
.bg-green { background-image: linear-gradient(180deg, rgba(13,17,23,.90), rgba(13,17,23,.80)), url("assets/section-green.jpg"); }

/* ---- Motion-gated entrances (only when .motion on <html>) ---- */
.motion .hero__inner > * { opacity: 0; animation: heroIn .85s var(--ease) forwards; }
.motion .hero__inner > *:nth-child(1) { animation-delay: .04s; }
.motion .hero__inner > *:nth-child(2) { animation-delay: .12s; }
.motion .hero__inner > *:nth-child(3) { animation-delay: .20s; }
.motion .hero__inner > *:nth-child(4) { animation-delay: .28s; }
.motion .hero__inner > *:nth-child(5) { animation-delay: .36s; }
.motion .hero .scanner { opacity: 0; animation: heroIn 1s var(--ease) .40s forwards; }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* JS-driven reveal targets: hidden only while motion is active AND not yet revealed */
.motion [data-reveal]:not(.revealed) { opacity: 0; }

/* ---- Reduced motion: strip the enhancement animations too ---- */
@media (prefers-reduced-motion: reduce) {
  .gborder::before { animation: none; }
  body::after { display: none; }
  .motion .hero__inner > *, .motion .hero .scanner { opacity: 1 !important; animation: none !important; }
  .motion [data-reveal] { opacity: 1 !important; }
  .tilt { transition: none; }
}

/* ============================================================
   CRAFTED GRAPHIC UI COMPONENTS (v2)
   ============================================================ */

/* ---- Agent hex emblems (replace emoji) ---- */
.agent .ico {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 32%, var(--border));
}
.agent .ico .emblem {
  width: 24px; height: 24px;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 55%, transparent));
}
.agent .ico .emblem .hex { color: var(--accent); }
.agent:hover .ico .emblem { animation: emblem-pulse 1.4s var(--ease); }
@keyframes emblem-pulse { 0%,100% { filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 55%, transparent)); } 50% { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--accent) 80%, transparent)); } }

/* ---- Judgment-layer centerpiece (lattice) ---- */
.judgment-diagram { position: relative; display: flex; flex-direction: column; align-items: center; margin: 4px auto 60px; }
.jd-glow {
  position: absolute; width: min(560px, 82%); aspect-ratio: 1; top: 46%; left: 50%;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle, rgba(137,87,229,.30), rgba(46,160,67,.12) 46%, transparent 70%);
  filter: blur(34px); z-index: 0; pointer-events: none;
}
.jd-art {
  position: relative; z-index: 1; width: min(440px, 86vw); aspect-ratio: 1; object-fit: contain;
  -webkit-mask: radial-gradient(circle closest-side, #000 62%, transparent 96%);
  mask: radial-gradient(circle closest-side, #000 62%, transparent 96%);
  animation: jd-float 8s ease-in-out infinite;
}
@keyframes jd-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.jd-caption {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; margin-top: -14px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .03em; flex-wrap: wrap; justify-content: center;
}
.jd-caption i { color: var(--muted); font-style: normal; }
.jd-node {
  padding: 7px 15px; border-radius: var(--pill); border: 1px solid var(--border);
  background: rgba(22,27,34,.66); backdrop-filter: blur(6px); color: var(--text-2);
}
.jd-node[data-tone="purple"] { color: var(--purple-2); border-color: color-mix(in srgb, var(--purple) 42%, var(--border)); box-shadow: 0 0 20px -8px var(--purple); }
.jd-node[data-tone="blue"]   { color: #6ea8ff;        border-color: color-mix(in srgb, var(--blue) 42%, var(--border));   box-shadow: 0 0 20px -8px var(--blue); }
.jd-node[data-tone="green"]  { color: #54d081;        border-color: color-mix(in srgb, var(--green) 42%, var(--border));  box-shadow: 0 0 20px -8px var(--green); }

/* ---- Certificate seal art ---- */
.cert .seal-img {
  width: 138px; height: 138px; margin: 0 auto 6px; object-fit: contain; position: relative; z-index: 1;
  -webkit-mask: radial-gradient(circle closest-side, #000 70%, transparent 100%);
  mask: radial-gradient(circle closest-side, #000 70%, transparent 100%);
}

@media (max-width: 560px) {
  .jd-art { width: min(320px, 82vw); }
  .jd-caption { font-size: 12px; gap: 8px; }
}

/* ============================================================
   JUDGMENT-LAYER ANCHORED SPLIT + HEX-ECHO MOTIF (v3)
   ============================================================ */

/* ---- Anchored split: copy + 3D lattice ---- */
.jband { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.jband__copy .eyebrow { margin-bottom: 16px; }
.jband__copy .lead { margin-top: 18px; }
.jband__copy em { font-style: normal; color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--purple) 45%, transparent); }
.jband__pills { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; align-items: flex-start; }
.jband__pills .jd-node { font-size: 12.5px; }

.jband__art { position: relative; display: grid; place-items: center; min-height: 400px; margin: 0; }
.jband__art .jd-glow {
  width: min(520px, 92%); aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.jband__art .jd-art { width: min(470px, 92%); }

@media (max-width: 940px) {
  .jband { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .jband__copy .eyebrow, .jband__pills { align-items: center; }
  .jband__pills { align-items: center; }
  .jband__copy .lead { margin-inline: auto; }
  .jband__art { order: -1; min-height: 320px; }
}

/* ---- Hex-echo: the lattice motif, faint + edge-anchored + parallax ---- */
.hex-echo {
  position: absolute; z-index: -1; pointer-events: none;
  width: clamp(320px, 42vw, 560px); aspect-ratio: 1;
  background-image: var(--echo-img, url("assets/lattice.jpg"));
  background-position: center; background-size: contain; background-repeat: no-repeat;
  -webkit-mask: radial-gradient(circle closest-side, #000 48%, transparent 88%);
  mask: radial-gradient(circle closest-side, #000 48%, transparent 88%);
  opacity: .20; filter: saturate(115%);
  transform: translateY(var(--py, 0px));
  will-change: transform;
}
.he--tr { top: -8%;  right: -12%; }
.he--bl { bottom: -10%; left: -14%; opacity: .16; transform: translateY(var(--py, 0px)) rotate(150deg); }
.he--cr { top: calc(50% - clamp(160px, 21vw, 280px)); right: -16%; opacity: .17; }
.he--tl { top: -6%; left: -12%; opacity: .18; }

@media (max-width: 720px) {
  .hex-echo { opacity: .12; width: 70vw; }
  .he--tr { right: -30%; } .he--bl { left: -34%; } .he--cr { right: -40%; }
}
@media (prefers-reduced-motion: reduce) {
  .hex-echo { transform: none !important; }
}

/* ============================================================
   PRO POLISH v4 — vertical rhythm, balance, alignment
   Adobe-grade: one consistent spacing system, no stranded art,
   no giant voids, tightened type measure.
   ============================================================ */

/* ---- One consistent section rhythm (kills the ad-hoc paddings) ---- */
.section { padding-block: clamp(72px, 8.5vw, 116px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section-head { margin-bottom: clamp(38px, 5vw, 56px); }

/* ---- Balance the judgment band: no oversized min-height, art sized to copy ---- */
.jband { align-items: center; gap: clamp(30px, 5vw, 64px); }
.jband__art { min-height: 0; }
.jband__art .jd-art { width: min(420px, 84%); }
.jband__art .jd-glow { width: min(470px, 84%); }
@media (max-width: 940px) {
  .jband { gap: 4px; }
  .jband__art { min-height: 0; margin-top: 4px; }
  .jband__art .jd-art { width: min(340px, 74%); }
}

/* ---- Feature block rhythm ---- */
.feature + .feature { margin-top: clamp(52px, 7vw, 84px); }

/* ---- Hero: tidy the scanner gap ---- */
.scanner { margin-top: clamp(40px, 5vw, 56px); }

/* ---- Type measure (tighter, more editorial line length) ---- */
.lead { max-width: 56ch; }
.section-head .lead { max-width: 60ch; }
.jband__copy .lead { max-width: 46ch; }

/* ---- Trust strip breathing room ---- */
.trust__inner { padding-block: clamp(28px, 4vw, 40px); }

/* ---- Stats band rhythm ---- */
.band__scroll { padding-block: clamp(34px, 4.5vw, 46px); }

/* ---- Pricing foot spacing ---- */
.price-foot { margin-top: clamp(24px, 3vw, 34px); }
.b2b-row { margin-top: 16px; }
