/* ============ KnoxAiD — "Why AI" narrative section ============ */

.auto-section { padding-top: clamp(80px, 10vw, 130px); }

/* ---- thesis ---- */
.auto-thesis { max-width: 940px; }
.auto-thesis-h { margin-top: 18px; }
.auto-thesis-sub { margin-top: 22px; }
.auto-spine {
  margin-top: 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(20px, 2.6vw, 30px); letter-spacing: -0.02em;
}
.auto-spine-word { color: #fff; }
.auto-spine-word:nth-child(1) { color: var(--accent); }
.auto-spine-word:nth-child(2) { color: #6FD0FF; }
.auto-spine-word:nth-child(3) { color: var(--violet); }
.auto-spine-word:nth-child(4) { color: var(--proof); }
.auto-spine-dot { color: var(--text-dim); margin: 0 16px; font-weight: 400; }

/* ---- bottleneck map ---- */
.bottleneck {
  margin-top: clamp(56px, 8vw, 96px);
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(61,189,247,0.06), transparent 60%),
    linear-gradient(180deg, #0E0E15, #0A0A10);
}
.bottleneck-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.bn-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; color: var(--accent); }
.bn-sub { color: var(--text-muted); font-size: 15px; }

.pipeline {
  display: flex; align-items: stretch; gap: 0;
  overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin;
}
.pl-node {
  flex: 1 0 130px;
  min-width: 130px;
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elev-1);
  position: relative;
}
.pl-node-label { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff; letter-spacing: -0.01em; }
.pl-node-sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-top: 6px; letter-spacing: 0.04em; }
.pl-node.is-win { border-color: rgba(16,209,148,0.4); background: rgba(16,209,148,0.06); }
.pl-node.is-win .pl-node-sub { color: var(--proof); }
.pl-node.is-leak { border-color: rgba(255,107,107,0.35); }
.pl-leak { margin-top: 12px; padding-top: 12px; border-top: 1px dashed rgba(255,107,107,0.3); }
.pl-leak-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: #FFB4B4; background: rgba(255,107,107,0.12); border: 1px solid rgba(255,107,107,0.3);
  padding: 3px 8px; border-radius: 5px;
}
.pl-leak-note { display: block; margin-top: 8px; font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

/* wires + packets */
.pl-wire {
  flex: 0 0 clamp(28px, 4vw, 64px);
  align-self: center;
  position: relative; height: 2px;
  background: linear-gradient(90deg, var(--border-strong), var(--accent-soft), var(--border-strong));
  margin: 0 -1px;
}
.pkt {
  position: absolute; top: 50%; left: 0;
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
  transform: translateY(-50%);
  opacity: 0;
}
.auto-section .reveal.is-in .pkt { animation: pktRun 2.4s linear infinite; }
.pkt-2 { animation-delay: 0.8s !important; }
.pkt-3 { animation-delay: 1.6s !important; }
@keyframes pktRun {
  0%   { left: -2px; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { left: calc(100% + 2px); opacity: 0; }
}
/* clogged wires: packets stall and redden mid-way */
.pl-wire.wire-clogged { background: linear-gradient(90deg, var(--border-strong), rgba(255,107,107,0.4), var(--border-strong)); }
.auto-section .reveal.is-in .wire-clogged .pkt { animation: pktClog 2.6s ease-in infinite; }
.wire-clogged .pkt-2 { animation-delay: 0.9s !important; }
.wire-clogged .pkt-3 { animation-delay: 1.8s !important; }
@keyframes pktClog {
  0%   { left: -2px; opacity: 0; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
  12%  { opacity: 1; }
  55%  { left: 55%; opacity: 1; background: var(--accent); }
  75%  { left: 60%; opacity: 1; background: var(--danger); box-shadow: 0 0 10px rgba(255,107,107,0.7); }
  100% { left: 60%; opacity: 0; background: var(--danger); }
}

.bottleneck-foot { margin-top: 28px; color: var(--text-muted); font-size: 15px; max-width: 60ch; line-height: 1.55; }

/* ---- pillars ---- */
.pillars { margin-top: clamp(60px, 9vw, 120px); display: flex; flex-direction: column; gap: clamp(72px, 11vw, 150px); }
.pillar {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.pillar.is-flip .pillar-text { order: 2; }
.pillar.is-flip .pillar-visual { order: 1; }
.pillar-visual { position: sticky; top: 110px; }
.pillar-tag { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.pillar-title { margin-top: 14px; font-size: clamp(28px, 3.6vw, 44px); }
.pillar-body { margin-top: 18px; color: var(--text-muted); font-size: 17px; line-height: 1.6; max-width: 52ch; }
.pillar-points { margin-top: 22px; padding: 0; list-style: none; display: grid; gap: 11px; }
.pillar-points li { position: relative; padding-left: 26px; color: var(--text); font-size: 15px; }
.pillar-points li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 2px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent-glow);
}
.pillar-stat {
  margin-top: 28px; padding: 18px 20px;
  background: var(--proof-soft); border: 1px solid rgba(16,209,148,0.2); border-radius: var(--radius-md);
}
.pillar-stat-text { color: #fff; font-size: 15px; font-weight: 500; line-height: 1.45; }
.pillar-stat-src { margin-top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--proof); letter-spacing: 0.04em; }

/* ---- shared viz shell ---- */
.viz {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #0F0F17, #0A0A11);
  min-height: 320px;
}
.viz-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.viz-cap { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; color: var(--text-dim); }
.viz-meter { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.viz-meter b { color: var(--proof); font-size: 15px; }

/* queue */
.queue-list { display: grid; gap: 10px; }
.queue-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-elev-1);
  opacity: 1;
}
.reveal.is-in .queue-row { animation: queueDone 0.5s var(--ease-sharp) forwards; }
@keyframes queueDone {
  to { opacity: 0.4; border-color: rgba(16,209,148,0.25); background: rgba(16,209,148,0.04); }
}
.queue-check {
  width: 18px; height: 18px; border-radius: 5px; flex: none;
  border: 1px solid var(--border-strong); position: relative;
}
.reveal.is-in .queue-check { animation: queueCheck 0.5s var(--ease-sharp) forwards; animation-delay: inherit; }
.queue-row { /* propagate delay to children via shared inline delay */ }
.reveal.is-in .queue-row .queue-check { animation-delay: inherit; }
@keyframes queueCheck {
  to { background: var(--proof); border-color: var(--proof); box-shadow: 0 0 10px rgba(16,209,148,0.5); }
}
.queue-check::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px;
  border: solid #0A0A11; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0);
}
.reveal.is-in .queue-check::after { animation: queueTick 0.4s var(--ease-sharp) forwards; animation-delay: inherit; }
@keyframes queueTick { to { transform: rotate(45deg) scale(1); } }
.queue-text { flex: 1; color: var(--text); font-size: 14px; }
.queue-by {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent-soft); padding: 3px 7px; border-radius: 5px;
}

/* race */
.viz-race { display: flex; flex-direction: column; }
.race-row { display: grid; grid-template-columns: 84px 1fr 56px; align-items: center; gap: 12px; margin-bottom: 22px; }
.race-label { font-size: 14px; color: var(--text); font-family: var(--font-display); font-weight: 500; }
.race-track { height: 12px; border-radius: 999px; background: rgba(255,255,255,0.05); overflow: hidden; }
.race-fill { height: 100%; width: 0; border-radius: 999px; }
.race-human { background: linear-gradient(90deg, #6E6E80, #FF6B6B); }
.race-ai { background: linear-gradient(90deg, var(--accent), var(--proof)); box-shadow: 0 0 14px var(--accent-glow); }
.reveal.is-in .race-human { animation: raceHuman 3s var(--ease-sharp) forwards 0.3s; }
.reveal.is-in .race-ai { animation: raceAI 0.5s var(--ease-sharp) forwards 0.3s; }
@keyframes raceHuman { to { width: 100%; } }
@keyframes raceAI { to { width: 18%; } }
.race-time { font-family: var(--font-mono); font-size: 13px; text-align: right; opacity: 0; }
.reveal.is-in .race-time-human { animation: fadeInTime 0.3s forwards 3.1s; color: #FF8C8C; }
.reveal.is-in .race-time-ai { animation: fadeInTime 0.3s forwards 0.8s; color: var(--proof); }
@keyframes fadeInTime { to { opacity: 1; } }
.race-foot { margin-top: auto; color: var(--text-muted); font-size: 14px; }
.race-foot b { color: #fff; font-family: var(--font-mono); }

/* radar */
.viz-radar { }
.radar { position: relative; width: 100%; aspect-ratio: 1.4 / 1; max-height: 280px; margin: 0 auto; }
.radar-rings { position: absolute; inset: 0; }
.radar-rings span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  border: 1px solid var(--border); border-radius: 999px;
}
.radar-rings span:nth-child(1) { width: 30%; height: 42%; }
.radar-rings span:nth-child(2) { width: 62%; height: 86%; }
.radar-rings span:nth-child(3) { width: 96%; height: 100%; border-color: var(--border-strong); }
.radar-sweep {
  position: absolute; left: 50%; top: 50%; width: 50%; height: 50%;
  transform-origin: top left; opacity: 0;
  background: conic-gradient(from 0deg, rgba(61,189,247,0.35), transparent 32%);
  border-radius: 0 0 0 100%;
}
.reveal.is-in .radar-sweep { animation: radarSweep 3.2s linear infinite; opacity: 1; }
@keyframes radarSweep { to { transform: rotate(360deg); } }
.radar-hit { position: absolute; transform: translate(-50%,-50%); opacity: 0; }
.reveal.is-in .radar-hit { animation: radarHit 0.5s var(--ease-sharp) forwards; }
@keyframes radarHit { to { opacity: 1; } }
.radar-dot {
  display: block; width: 9px; height: 9px; border-radius: 999px; background: var(--proof);
  box-shadow: 0 0 12px rgba(16,209,148,0.8); margin: 0 auto;
}
.radar-tag {
  position: absolute; left: 50%; top: 14px; transform: translateX(-50%); white-space: nowrap;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--proof);
  background: rgba(16,209,148,0.1); border: 1px solid rgba(16,209,148,0.25);
  padding: 2px 7px; border-radius: 5px;
}

/* flywheel */
.viz-flywheel { }
.flywheel { position: relative; width: 100%; max-width: 300px; aspect-ratio: 1; margin: 0 auto; }
.fw-ring {
  position: absolute; inset: 18%; border-radius: 999px;
  border: 1.5px dashed var(--border-strong);
}
.fw-spin {
  position: absolute; inset: 18%; border-radius: 999px;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, transparent, var(--accent), var(--violet), transparent 70%) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0;
}
.reveal.is-in .fw-spin { animation: fwSpin 6s linear infinite; opacity: 1; }
@keyframes fwSpin { to { transform: rotate(360deg); } }
.fw-core {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #fff; text-align: center; line-height: 1.1;
  z-index: 2;
}
.fw-node {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%) rotate(var(--ang)) translateY(calc(-50% - 78px)) rotate(calc(-1 * var(--ang)));
  width: 96px; text-align: center;
}
.fw-node span {
  display: inline-block; font-family: var(--font-mono); font-size: 11px; color: var(--text);
  background: var(--bg-elev-2); border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 6px 10px; line-height: 1.2;
}

/* ---- anatomy ---- */
.anatomy { margin-top: clamp(80px, 11vw, 140px); }
.anatomy-h { margin-top: 14px; font-size: clamp(26px, 3.4vw, 40px); max-width: 20ch; }
.anatomy-row { margin-top: 44px; display: flex; align-items: stretch; gap: 12px; }
.anatomy-step {
  flex: 1; padding: 24px 22px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-elev-1);
}
.anatomy-n { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; }
.anatomy-k { margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: 22px; color: #fff; }
.anatomy-d { margin-top: 10px; color: var(--text-muted); font-size: 14px; line-height: 1.5; }
.anatomy-arrow { display: flex; align-items: center; color: var(--text-dim); font-size: 20px; flex: none; }
.anatomy-foot { margin-top: 32px; color: var(--text); font-size: 17px; max-width: 56ch; }

@media (max-width: 900px) {
  .pillar { grid-template-columns: 1fr; gap: 28px; }
  .pillar.is-flip .pillar-text { order: 1; }
  .pillar.is-flip .pillar-visual { order: 2; }
  .pillar-visual { position: static; top: auto; }
  .anatomy-row { flex-direction: column; }
  .anatomy-arrow { transform: rotate(90deg); justify-content: center; }
  .dk-br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pkt, .race-fill, .radar-sweep, .radar-hit, .fw-spin,
  .queue-row, .queue-check, .queue-check::after, .race-time { animation: none !important; }
  .race-human { width: 100%; } .race-ai { width: 18%; }
  .radar-sweep, .radar-hit, .fw-spin, .race-time { opacity: 1 !important; }
}

/* ============ $999 AI Assessment ============ */
.assess-section { padding-top: clamp(40px, 6vw, 80px); }
.assess-card {
  display: grid; grid-template-columns: 1.4fr 0.85fr; gap: clamp(28px, 4vw, 56px);
  padding: clamp(32px, 4vw, 56px);
  border: 1px solid rgba(155,107,255,0.25);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 90% at 100% 0%, rgba(155,107,255,0.12), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgba(61,189,247,0.08), transparent 60%),
    linear-gradient(180deg, #12121B, #0B0B12);
  align-items: center;
}
@media (max-width: 860px) { .assess-card { grid-template-columns: 1fr; gap: 32px; } }

.assess-title { margin-top: 16px; font-size: clamp(32px, 4vw, 48px); }
.assess-lead { margin-top: 18px; color: var(--text-muted); font-size: 17px; line-height: 1.6; max-width: 56ch; }
.assess-list { margin-top: 26px; padding: 0; list-style: none; display: grid; gap: 14px; }
.assess-list li {
  position: relative; padding-left: 30px; color: var(--text); font-size: 15.5px; line-height: 1.5;
}
.assess-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 6px; flex: none;
  background-image: linear-gradient(135deg, var(--accent), var(--violet));
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'><path d='M4 9.5l3.2 3.2L14 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'><path d='M4 9.5l3.2 3.2L14 6' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  -webkit-mask-size: 18px; mask-size: 18px;
}

.assess-right {
  padding: 28px;
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
}
.assess-price { display: flex; align-items: baseline; gap: 10px; }
.assess-amount { font-family: var(--font-mono); font-weight: 600; font-size: clamp(44px, 6vw, 60px); color: #fff; letter-spacing: -0.04em; }
.assess-per { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); letter-spacing: 0.06em; }
.assess-credit {
  margin-top: 16px; display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 14px; border-radius: var(--radius-sm);
  background: var(--proof-soft); border: 1px solid rgba(16,209,148,0.25);
  color: #fff; font-size: 13.5px; line-height: 1.4; font-weight: 500;
}
.assess-credit-mark {
  flex: none; width: 18px; height: 18px; border-radius: 999px; margin-top: 1px;
  background: var(--proof); position: relative; box-shadow: 0 0 12px rgba(16,209,148,0.5);
}
.assess-credit-mark::after {
  content: ""; position: absolute; left: 6px; top: 4px; width: 4px; height: 8px;
  border: solid #0A0A11; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.assess-meta { margin-top: 20px; display: grid; gap: 0; }
.assess-meta-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
  font-size: 13.5px; color: var(--text-muted);
}
.assess-meta-row:last-child { border-bottom: none; }
.assess-meta-row b { color: #fff; font-family: var(--font-mono); font-weight: 500; font-size: 13px; }
.assess-right .btn { margin-top: 22px; width: 100%; }
.assess-fineprint { margin-top: 14px; font-size: 12px; color: var(--text-dim); text-align: center; line-height: 1.4; }
