/* ==========================================================================
   Karan Tej · portfolio
   Warm black, bone, soft pink, over a purple topography.
   Status colours borrowed from CI: bone = running, pink = passed.
   ========================================================================== */

:root {
  --bg: #0c0b09;
  --bg-2: #15130f;
  --bg-3: #1d1a16;
  --line: #2a2621;
  --line-2: #3b362f;
  --text: #efe9dd;
  --text-2: #d6cfc2;
  --muted: #a39b8c;
  --dim: #6c655a;

  --accent: #f6a9c9;
  --accent-soft: #f9d3e3;
  --run: #efe9dd;
  --pass: #f6a9c9;
  --fail: #ff4f4f;

  --bone: #ebe3d2;
  --ink: #15110c;

  --f-display: "Bricolage Grotesque", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --radius: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* film grain, static */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 .95  0 0 0 0 .88  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.mono { font-family: var(--f-mono); letter-spacing: 0; }
.dim { color: var(--dim); }
.wrap { width: 100%; max-width: 1360px; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 400;
  padding: 10px 16px; border-radius: 999px;
  background: var(--accent); color: var(--ink); font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* moving background: pipeline traffic (drawn by main.js) */
.bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
main, .foot { position: relative; z-index: 1; }

/* scrollbar */
html { scrollbar-color: var(--line-2) var(--bg); }

/* ==========================================================================
   Boot
   ========================================================================== */
.boot { display: none; }
.js .boot {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: var(--bg);
  transition: clip-path .9s var(--ease), visibility 0s linear .9s;
  clip-path: inset(0 0 0 0);
}
.boot.is-out { clip-path: inset(0 0 100% 0); visibility: hidden; }
.boot-inner { width: min(640px, calc(100vw - 32px)); }
.boot-log {
  margin: 0;
  min-height: 210px;
  font-family: var(--f-mono);
  font-size: clamp(12px, 1.6vw, 14px);
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-wrap;
}
.boot-log .cmd { color: var(--text); }
.boot-log .acc { color: var(--accent); }
.boot-log .ok { color: var(--pass); }
.boot-log .dim { color: var(--dim); }
.boot-skip { margin: 24px 0 0; font-family: var(--f-mono); font-size: 11px; color: var(--dim); }
.js body.is-booting { overflow: hidden; }

/* ==========================================================================
   Shared bits
   ========================================================================== */
.caret {
  display: inline-block;
  width: .55em; height: 1.05em;
  margin-left: 2px;
  vertical-align: -.15em;
  background: var(--accent);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.mark {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.04em;
  transition: transform .4s var(--ease);
}
.mark:hover { transform: rotate(-8deg) scale(1.06); }

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(21, 19, 15, .72);
  border: 1px solid rgba(239, 233, 221, .12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.pill-btn:hover { background: var(--text); color: var(--ink); border-color: var(--text); }
.pill-solid { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.pill-solid:hover { background: var(--text); border-color: var(--text); }

.eyebrow {
  margin: 0 0 22px;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
}
.section-h {
  margin: 0;
  font-size: clamp(3rem, 8.4vw, 7.6rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.045em;
}

/* reveal on scroll */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ==========================================================================
   Top bar
   ========================================================================== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.clock {
  display: inline-flex; align-items: center;
  height: 44px; padding: 0 16px;
  border-radius: 999px;
  background: rgba(21, 19, 15, .72);
  border: 1px solid rgba(239, 233, 221, .12);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 12px;
  color: var(--muted);
}
.js .topbar { opacity: 0; transform: translateY(-12px); transition: opacity .8s var(--ease) .5s, transform .8s var(--ease) .5s; }
.is-ready .topbar { opacity: 1; transform: none; }

/* ==========================================================================
   Hero (00 · trigger)
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  padding: 110px 0 110px;
}


.hero-inner {
  position: relative;
  align-self: center;
  text-align: center;
}
.hero-cmd {
  margin: 0 0 18px;
  font-size: clamp(12px, 1.3vw, 15px);
  color: var(--muted);
  min-height: 1.6em;
}
.hero-cmd .prompt { color: var(--accent); }
.hero-name {
  margin: 0;
  font-size: clamp(4.4rem, 17.2vw, 17.5rem);
  font-weight: 800;
  line-height: .86;
  letter-spacing: -.055em;
  white-space: nowrap;
  overflow: hidden;
  padding: .02em .04em .1em;
}
.hero-name .ch { display: inline-block; }
.hero-name .sp { display: inline-block; width: .22em; }
.js .hero-name .ch {
  transform: translateY(108%);
  transition: transform 1.05s var(--ease);
  transition-delay: calc(var(--i) * 55ms + 100ms);
}
.is-ready .hero-name .ch { transform: none; }

.hero-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 14px 28px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hero-role {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -.02em;
}
.hero-tags { margin: 0; font-size: 13px; color: var(--muted); }
.hero-tags i { font-style: normal; color: var(--accent); margin: 0 4px; }
.js .hero-row, .js .hero-cmd { opacity: 0; transform: translateY(14px); transition: opacity .9s var(--ease) .75s, transform .9s var(--ease) .75s; }
.is-ready .hero-row, .is-ready .hero-cmd { opacity: 1; transform: none; }

/* pipeline DAG */
.dag {
  position: relative;
  width: 100%;
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 0 var(--gutter);
}
.dag svg { width: 100%; height: auto; overflow: visible; }
.dag-edges path { fill: none; stroke: var(--line-2); stroke-width: 2; }
.dag-pulse path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 30 200;
  stroke-dashoffset: 30;
}
.dag-pulse path.go { animation: dagpulse .5s linear forwards; }
@keyframes dagpulse { to { stroke-dashoffset: -100; } }
.dag-node rect { fill: var(--bg-2); stroke: var(--line-2); stroke-width: 1.5; transition: stroke .3s, fill .3s; }
.dag-node circle { fill: var(--dim); transition: fill .3s; }
.dag-node text { font-family: var(--f-mono); font-size: 14px; fill: var(--muted); transition: fill .3s; }
.dag-node.is-run rect { stroke: var(--run); }
.dag-node.is-run circle { fill: var(--run); }
.dag-node.is-run text { fill: var(--text); }
.dag-node.is-pass circle { fill: var(--pass); }
.dag-node.is-pass text { fill: var(--text-2); }
.dag-node:hover rect, .dag-node:focus-visible rect { stroke: var(--accent); fill: var(--bg-3); }
.js .dag { opacity: 0; transition: opacity 1.2s var(--ease) 1s; }
.is-ready .dag { opacity: 1; }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  display: none;
  font-size: 22px;
  color: var(--muted);
  animation: bob 2.4s var(--ease) infinite;
}
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ==========================================================================
   Stage heads + status chips
   ========================================================================== */
.stage { position: relative; }
.stage-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 34px;
  font-size: 13px;
  color: var(--muted);
}
.stage-n { color: var(--accent); font-weight: 700; }
.stage-name { color: var(--text); }
.stage-rule { flex: 1; height: 1px; background: var(--line); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px;
  color: var(--dim);
  white-space: nowrap;
}
.status b { font-weight: 500; }
.status i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dim);
  flex: none;
}
.status[data-state="running"] { color: var(--run); border-color: rgba(239, 233, 221, .3); }
.status[data-state="running"] i {
  background: transparent;
  border: 2px solid var(--run);
  border-right-color: transparent;
  width: 11px; height: 11px;
  animation: spin .8s linear infinite;
}
.status[data-state="passed"] { color: var(--pass); border-color: rgba(246, 169, 201, .35); }
.status[data-state="passed"] i { background: var(--pass); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   01 · checkout
   ========================================================================== */
.statement {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(90px, 16vh, 180px) 0 clamp(60px, 10vh, 120px);
  text-align: center;
}
.statement-h {
  margin: 0 auto;
  max-width: 17ch;
  font-size: clamp(2.3rem, 5.6vw, 5.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.035em;
}
.statement-p {
  max-width: 660px;
  margin: 30px auto 0;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height: 1.65;
  color: var(--muted);
}
.arrow-down {
  display: inline-block;
  margin-top: 40px;
  font-size: 22px;
  color: var(--muted);
  transition: color .3s, transform .3s var(--ease);
}
.arrow-down:hover { color: var(--accent); transform: translateY(4px); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 clamp(80px, 14vh, 160px);
  border-top: 1px solid var(--line);
}
.stat {
  padding: 30px 24px 0 0;
  border-right: 1px solid var(--line);
  padding-left: 24px;
}
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat dt {
  font-size: clamp(2.4rem, 4.8vw, 4.8rem);
  white-space: nowrap;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.045em;
  font-variant-numeric: tabular-nums;
}
.stat dd { margin: 12px 0 0; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.stat:nth-child(1) dt span { color: var(--accent); }

/* ==========================================================================
   02 · build (bone sheet)
   ========================================================================== */
.stage-build {
  margin: 0 clamp(8px, 1.2vw, 16px);
  border-radius: clamp(22px, 3vw, 40px);
  background: var(--bone);
  color: var(--ink);
  padding-bottom: clamp(70px, 10vh, 120px);
}
.stage-build ::selection { background: var(--ink); color: var(--bone); }
.stage-build .stage-head { color: #6f6656; }
.stage-build .stage-name { color: var(--ink); }
.stage-build .stage-n { color: #b8336f; }
.stage-build .stage-rule { background: rgba(21, 17, 12, .16); }
.stage-build .status { border-color: rgba(21, 17, 12, .2); color: #8a816f; }
.stage-build .status i { background: #b3a993; }
.stage-build .status[data-state="running"] { color: var(--ink); border-color: rgba(21, 17, 12, .35); }
.stage-build .status[data-state="running"] i { border-color: var(--ink); border-right-color: transparent; background: transparent; }
.stage-build .status[data-state="passed"] { color: #a32d63; border-color: rgba(163, 45, 99, .4); }
.stage-build .status[data-state="passed"] i { background: #c44a82; }
.stage-build .eyebrow { color: #6f6656; }

.build-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(64px, 11vh, 120px);
}
.build-intro { position: sticky; top: 120px; align-self: start; }
.build-note { margin: 28px 0 0; max-width: 36ch; color: #4f4739; font-size: 1.05rem; line-height: 1.6; }
.build-cmd {
  display: inline-block;
  margin: 28px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bone);
  font-size: 13px;
}

.lock { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(21, 17, 12, .16); }
.lock-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 22px 0 16px;
  border-bottom: 1px solid rgba(21, 17, 12, .16);
}
.lock-k { padding-top: 7px; font-size: 12px; color: #6f6656; }
.lock-v { display: flex; flex-wrap: wrap; gap: 8px; }
.lock-v b {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid rgba(21, 17, 12, .2);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  transition: background .25s, color .25s, border-color .25s;
}
.lock-v b:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.lock-ok { padding-top: 7px; font-size: 12px; color: #a32d63; }
.build-done { margin: 34px 0 0; font-size: 13px; color: #6f6656; }
.build-done span { color: #a32d63; }

/* ==========================================================================
   03 · test (stacked suites)
   ========================================================================== */
.stage-test { padding-top: clamp(70px, 10vh, 120px); }
.test-intro { text-align: center; padding: clamp(80px, 13vh, 150px) 0 clamp(40px, 8vh, 90px); }

.suites {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.suite {
  position: sticky;
  top: calc(10vh + var(--n) * 14px);
  height: min(74vh, 680px);
  margin-bottom: 9vh;
}
.suite:last-child { margin-bottom: 0; }
.suite-card {
  --shade: 0;
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(24px, 3.6vw, 56px);
  padding: clamp(22px, 3.2vw, 46px);
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transform-origin: 50% 0;
  box-shadow: 0 -30px 80px -40px rgba(0, 0, 0, .9);
}
.suite-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--shade);
  pointer-events: none;
  border-radius: inherit;
}
.suite-text { display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.suite-run { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 12.5px; color: var(--muted); }
.badge { padding: 3px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 700; color: var(--ink); }
.badge-pass { background: var(--pass); }
.badge-run { background: var(--run); }
.suite-title {
  margin: clamp(16px, 3vh, 30px) 0 10px;
  font-size: clamp(2.5rem, 5.2vw, 5.1rem);
  font-weight: 800;
  line-height: .93;
  letter-spacing: -.045em;
}
.suite-name { margin: 0; font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.suite-desc { max-width: 30ch; margin: 22px 0 0; font-size: clamp(1.05rem, 1.45vw, 1.3rem); line-height: 1.45; color: var(--text-2); }
.suite-list { list-style: none; margin: clamp(14px, 2.6vh, 26px) 0 0; padding: 0; }
.suite-list li {
  position: relative;
  padding-left: 22px;
  margin: 0 0 10px;
  font-size: clamp(.92rem, 1.05vw, 1rem);
  line-height: 1.52;
  color: var(--text-2);
}
.suite-list li::before {
  content: "›";
  position: absolute;
  left: 2px; top: -1px;
  font-family: var(--f-mono);
  font-weight: 700;
  color: var(--accent);
}
.suite-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 30px 0 0; }
.suite-tags span { padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 11.5px; color: var(--muted); }
.suite-date { margin: 14px 0 0; font-size: 12px; color: var(--dim); }

.suite-vis {
  position: relative;
  min-height: 0;
  border-radius: 20px;
  background: #0e0c0a;
  border: 1px solid var(--line);
  overflow: hidden;
}

/* terminal (suite 1) */
.vis-term { display: flex; flex-direction: column; }
.term-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-bottom: 1px solid var(--line); flex: none; }
.term-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.term-bar span:first-child { background: var(--accent); }
.term-bar em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--dim); }
.term-body {
  flex: 1;
  margin: 0;
  padding: 18px 20px;
  overflow: hidden;
  font-size: clamp(10.5px, .92vw, 13px);
  line-height: 1.75;
  color: var(--text-2);
  white-space: pre-wrap;
  word-break: break-word;
}
.term-body .cmd { color: var(--text); }
.term-body .dim { color: var(--dim); }
.term-body .err { color: var(--fail); }
.term-body .agent { color: var(--accent-soft); }
.term-body .ok { color: var(--pass); }
.term-body .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--text); animation: blink 1s steps(1) infinite; }

/* fleet (suite 2) */
.vis-fleet {
  container-type: inline-size;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(246, 169, 201, .08), transparent 60%),
    #0e0c0a;
}
.fleet-hud {
  position: absolute;
  top: 14px; left: 16px; right: 16px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}
.fleet-hud span:first-child { color: var(--accent); animation: blink 1.6s steps(1) infinite; }
.fleet-lane {
  position: absolute;
  left: 0; right: 0;
  height: 22%;
  z-index: 2;
}
.l1 { top: 17%; }
.l2 { top: 44%; }
.l3 { top: 71%; }
.fleet-road {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    repeating-linear-gradient(90deg, var(--line-2) 0 26px, transparent 26px 52px) 0 41% / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, var(--line-2) 0 26px, transparent 26px 52px) 0 68% / 100% 2px no-repeat,
    linear-gradient(var(--line), var(--line)) 0 95% / 100% 1px no-repeat;
}
.vis-fleet::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 30%;
  z-index: 2;
  background: linear-gradient(to bottom, transparent 40%, rgba(246, 169, 201, .05) 90%, rgba(246, 169, 201, .14) 100%);
  border-bottom: 1px solid rgba(246, 169, 201, .28);
  animation: scan 5.5s linear infinite;
  pointer-events: none;
}
@keyframes scan { from { transform: translateY(-100%); } to { transform: translateY(340%); } }
.veh {
  position: absolute;
  bottom: 6px;
  left: 0;
  padding: 7px;
  border: 1.5px dashed var(--accent);
  border-radius: 4px;
  animation: drive var(--s) linear infinite;
  animation-delay: var(--o);
  will-change: transform;
}
.veh svg { fill: none; stroke: var(--text-2); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; height: auto; }
.veh .win { stroke: var(--muted); stroke-width: 1.6; }
.v-car svg { width: clamp(80px, 19cqw, 150px); }
.v-truck svg { width: clamp(110px, 27cqw, 210px); }
.v-bus svg { width: clamp(130px, 31cqw, 240px); }
.v-bike svg { width: clamp(50px, 11cqw, 86px); }
.veh-lbl {
  position: absolute;
  bottom: 100%;
  left: -1.5px;
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
@keyframes drive {
  from { transform: translateX(100cqw); }
  to { transform: translateX(-110%); }
}

/* soc scatter (suite 3) */
.vis-soc { display: flex; flex-direction: column; }
.soc-plot { flex: 1; min-height: 0; width: 100%; height: 100%; padding: 14px; }
.soc-plot .pt { fill: var(--muted); opacity: .5; }
.soc-plot .bound { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 4 5; }
.soc-plot .out { fill: var(--accent); }
.soc-plot .ring { fill: none; stroke: var(--accent); stroke-width: 1.4; transform-box: fill-box; transform-origin: center; animation: ring 2.4s var(--ease) infinite; }
.soc-plot .lbl { font-family: var(--f-mono); font-size: 10px; fill: var(--accent); }
.soc-plot .axis { font-family: var(--f-mono); font-size: 9.5px; fill: var(--dim); }
@keyframes ring { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(3); opacity: 0; } }
.soc-queue { flex: none; margin: 0 14px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); font-size: 11.5px; }
.soc-queue p { margin: 0 0 8px; color: var(--dim); }
.soc-queue ol { margin: 0; padding: 0; list-style: none; counter-reset: q; }
.soc-queue li {
  counter-increment: q;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 38%;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--text-2);
}
.soc-queue li::before { content: "#" counter(q); color: var(--accent); }
.soc-queue i { display: block; height: 5px; border-radius: 3px; background: var(--line-2); position: relative; overflow: hidden; }
.soc-queue i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); border-radius: inherit; transition: width 1.4s var(--ease); }
.vis-soc.in .soc-queue i::after { width: var(--w); }
.soc-queue li:nth-child(2) i::after { transition-delay: .15s; }
.soc-queue li:nth-child(3) i::after { transition-delay: .3s; }

/* cv + backtest (suite 4) */
.vis-cv { display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: clamp(18px, 2.6vw, 34px); }
.cv-h { margin: 6px 0 2px; font-size: 11.5px; color: var(--dim); }
.cv-grid { display: grid; gap: 7px; }
.cv-row { display: grid; grid-template-columns: 58px repeat(5, minmax(0, 1fr)); gap: 6px; align-items: center; }
.cv-row span { font-size: 11px; color: var(--muted); }
.cv-row b { height: clamp(18px, 3.2vh, 28px); border-radius: 6px; background: var(--line-2); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); transition-delay: calc(var(--r) * 110ms); }
.cv-row b.v { background: var(--accent); }
.vis-cv.in .cv-row b { transform: none; }
.vis-cv.in .cv-row b.v { animation: fold 3.2s ease-in-out infinite; animation-delay: calc(var(--r) * .64s + 1s); }
@keyframes fold { 0%, 30%, 100% { filter: none; } 12% { filter: brightness(1.35); box-shadow: 0 0 0 3px rgba(246, 169, 201, .25); } }
.bt { position: relative; padding-bottom: 22px; }
.bt-row { position: relative; height: clamp(12px, 2vh, 18px); margin: 0 0 7px; }
.bt-row b { position: absolute; top: 0; bottom: 0; left: var(--x); width: var(--w); border-radius: 4px; transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); transition-delay: calc(var(--r) * 120ms + .5s); }
.bt-row .t { background: var(--line-2); }
.bt-row .v { background: var(--accent); }
.vis-cv.in .bt-row b { transform: none; }
.bt-axis { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 4px; font-size: 10.5px; color: var(--dim); }
.bt-axis em { font-style: normal; }
.cv-legend { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.cv-legend span { width: 14px; height: 8px; border-radius: 2px; }
.lg-t { background: var(--line-2); }
.lg-v { background: var(--accent); margin-left: 10px; }

.test-summary {
  margin: clamp(60px, 10vh, 110px) 0 0;
  padding: 22px 0 clamp(80px, 12vh, 140px);
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--muted);
}
.test-summary span { display: inline-block; min-width: 110px; color: var(--text); font-weight: 700; }
.test-summary .ok { color: var(--pass); font-weight: 500; }
.test-summary .run { color: var(--run); font-weight: 500; }

/* ==========================================================================
   04 · integrate
   ========================================================================== */
.stage-integrate .statement-h { max-width: 18ch; }
.jobs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px var(--gutter) clamp(90px, 14vh, 160px);
}
.job {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 400px;
  padding: 30px 26px;
  border-radius: 26px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  text-align: center;
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s, opacity .9s var(--ease);
}
.job-k { margin: 0 0 12px; font-size: 12px; color: var(--accent); }
.job h3 { margin: 0; max-width: 14ch; font-size: clamp(1.35rem, 1.9vw, 1.7rem); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; }
.job-art { width: 68%; max-width: 200px; margin: 30px auto; fill: none; stroke: var(--text-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .6s var(--ease); }
.job-art .hot { stroke: var(--accent); }
.job-art circle.hot { fill: var(--accent); }
.job-p { margin: auto 0 0; font-size: .95rem; line-height: 1.55; color: var(--muted); }
.job:hover, .job.is-active {
  transform: translateY(-8px);
  border-color: rgba(246, 169, 201, .55);
  box-shadow: 0 0 0 1px rgba(246, 169, 201, .25), 0 40px 90px -40px rgba(246, 169, 201, .55);
}
.job:hover .job-art, .job.is-active .job-art { transform: scale(1.05); }

/* ==========================================================================
   05 · release
   ========================================================================== */
.rel-head { padding: clamp(80px, 13vh, 150px) 0 clamp(36px, 6vh, 70px); }
.rel-list { border-top: 1px solid var(--line); margin-bottom: clamp(80px, 12vh, 140px); }
.rel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.rel-ver { margin: 6px 0 0; font-size: 13px; color: var(--accent); line-height: 1.7; }
.rel-ver span { color: var(--dim); }
.rel-body h3 { margin: 0; font-size: clamp(1.45rem, 2.7vw, 2.3rem); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.rel-meta { margin: 8px 0 0; color: var(--muted); }
.rel-meta .tag { display: inline-block; margin-left: 10px; vertical-align: 2px; white-space: nowrap; }
.rel-body ul { list-style: none; margin: 18px 0 0; padding: 0; }
.rel-body li { display: flex; align-items: baseline; gap: 12px; margin: 10px 0; color: var(--text-2); line-height: 1.55; }
.tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
}
.tag-add { border-color: transparent; background: rgba(246, 169, 201, .13); color: var(--pass); }

/* ==========================================================================
   06 · deploy
   ========================================================================== */
.deploy {
  padding: clamp(90px, 14vh, 170px) 0 clamp(90px, 14vh, 170px);
  text-align: center;
}
.deploy-check { width: clamp(72px, 9vw, 116px); height: auto; margin: 0 auto 28px; fill: none; stroke: var(--pass); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.deploy-check circle, .deploy-check path { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.1s var(--ease); }
.deploy-check path { transition-delay: .6s; }
.deploy.in .deploy-check circle, .deploy.in .deploy-check path { stroke-dashoffset: 0; }
.deploy-h {
  margin: 0;
  font-size: clamp(4.2rem, 15.5vw, 14.5rem);
  font-weight: 800;
  line-height: .84;
  letter-spacing: -.055em;
}
.deploy-sub { max-width: 580px; margin: 30px auto 0; color: var(--muted); font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.6; }
.deploy-mail {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 44px;
  padding-bottom: 6px;
  font-size: clamp(1.25rem, 3.7vw, 3.3rem);
  font-weight: 700;
  letter-spacing: -.03em;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 3px no-repeat;
  transition: color .3s, background-size .5s var(--ease);
}
.deploy-mail:hover { color: var(--accent); background-size: 0 3px; background-position: 100% 100%; }
.deploy-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.deploy-log {
  display: inline-block;
  max-width: 100%;
  margin: 60px 0 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  text-align: left;
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--text-2);
  white-space: pre-wrap;
}
.deploy-log .ok { color: var(--pass); }
.deploy-log .dim { color: var(--dim); }

/* ==========================================================================
   Footer
   ========================================================================== */
.foot {
  padding: clamp(80px, 12vh, 140px) 0 150px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.foot-line {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  margin: 0;
  min-height: 1.2em;
  font-size: clamp(2rem, 5.6vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -.035em;
}
.mark-lg { font-size: .34em; width: 2.5em; height: 2.5em; border-radius: .66em; margin-right: .3em; }
.foot-line .caret { width: .07em; height: .82em; margin-left: .06em; }
.foot-nav, .foot-meta { display: flex; flex-wrap: wrap; justify-content: center; row-gap: 6px; }
.foot-nav { margin: 38px 0 18px; font-size: 13px; }
.foot-nav a, .foot-meta a { color: var(--muted); transition: color .25s; }
.foot-nav a:hover, .foot-meta a:hover { color: var(--accent); }
.foot-nav i, .foot-meta i { font-style: normal; margin: 0 10px; color: var(--dim); }
.foot-meta { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.foot-line + .foot-meta { margin-top: 34px; font-size: 13px; }

/* ==========================================================================
   Run bar (floating pipeline status, WHP-style pill)
   ========================================================================== */
.runbar {
  --p: 0;
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
  padding: 0 8px 0 20px;
  border-radius: 999px;
  background: rgba(21, 19, 15, .76);
  border: 1px solid rgba(239, 233, 221, .1);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
  transform: translateX(-50%);
  transition: border-color .5s;
}
.js .runbar { visibility: hidden; }
.is-ready .runbar { visibility: visible; animation: rise .8s var(--ease) .9s both; }
@keyframes rise { from { opacity: 0; translate: 0 30px; } }
.runbar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 128px;
  font-size: 12.5px;
  color: var(--run);
  white-space: nowrap;
}
.runbar-spin {
  width: 12px; height: 12px;
  flex: none;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin .8s linear infinite;
}
.runbar[data-phase="idle"] .runbar-status { color: var(--muted); }
.runbar[data-phase="idle"] .runbar-spin { animation: none; border-right-color: currentColor; opacity: .5; }
.runbar.is-done { border-color: rgba(246, 169, 201, .35); }
.runbar.is-done .runbar-status { color: var(--pass); }
.runbar.is-done .runbar-spin { animation: none; background: var(--pass); border-color: var(--pass); }

.runbar-steps {
  position: relative;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.runbar-steps::before, .runbar-fill {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
}
.runbar-steps::before { right: 6px; background: var(--line-2); }
.runbar-fill { width: calc((100% - 12px) * var(--p)); background: var(--accent); }
.runbar-steps li { position: relative; z-index: 1; }
.runbar-steps a { position: relative; display: block; padding: 10px 0; }
.runbar-steps .dot {
  display: block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #3a352f;
  box-shadow: 0 0 0 3px rgba(21, 19, 15, 1);
  transition: background .3s, transform .3s var(--ease);
}
.runbar-steps li.done .dot { background: var(--pass); }
.runbar-steps li.active .dot { background: var(--accent); transform: scale(1.25); animation: halo 1.8s ease-out infinite; }
@keyframes halo { 0% { box-shadow: 0 0 0 3px rgba(21, 19, 15, 1), 0 0 0 3px rgba(246, 169, 201, .5); } 100% { box-shadow: 0 0 0 3px rgba(21, 19, 15, 1), 0 0 0 12px rgba(246, 169, 201, 0); } }
.runbar-steps .sr {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--text);
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 4px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.runbar-steps a:hover .sr, .runbar-steps a:focus-visible .sr { opacity: 1; transform: translate(-50%, 0); }
.runbar-time { min-width: 44px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.runbar-menu {
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .25s;
}
.runbar-menu:hover, .runbar-menu[aria-expanded="true"] { background: var(--accent); }
.runbar-progress {
  display: none;
  position: absolute;
  left: 24px; right: 24px; bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(var(--p));
  transform-origin: left;
}

/* Menu sheet */
.menu {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 79;
  width: min(560px, calc(100vw - 24px));
  transform: translateX(-50%);
}
.menu[hidden] { display: none; }
.menu-inner {
  padding: 14px;
  border-radius: 28px;
  background: rgba(21, 19, 15, .94);
  border: 1px solid rgba(239, 233, 221, .1);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9);
  animation: menu-in .45s var(--ease);
}
@keyframes menu-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list a {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: clamp(1.5rem, 4.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.03em;
  transition: background .2s, color .2s;
}
.menu-list a:hover, .menu-list a:focus-visible { background: var(--bg-3); color: var(--accent); }
.menu-list a span { font-size: 12px; color: var(--accent); font-weight: 500; }
.menu-list a em { font-style: normal; font-size: 11px; font-weight: 500; letter-spacing: 0; color: var(--dim); }
.menu-list a em[data-state="running"] { color: var(--run); }
.menu-list a em[data-state="passed"] { color: var(--pass); }
.menu-foot { display: flex; flex-wrap: wrap; row-gap: 4px; margin: 8px 14px 6px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.menu-foot a:hover { color: var(--accent); }
.menu-foot i { font-style: normal; margin: 0 8px; color: var(--dim); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .jobs {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-top: 16px;
  }
  .jobs::-webkit-scrollbar { display: none; }
  .job { flex: 0 0 min(300px, 76vw); scroll-snap-align: center; min-height: 380px; }
}

@media (max-width: 980px), (max-height: 700px) {
  .suite { position: relative; top: auto; height: auto; margin-bottom: 18px; }
  .suite-card { grid-template-columns: 1fr; height: auto; }
  .suite-vis { order: -1; height: clamp(260px, 62vw, 380px); }
  .vis-soc, .vis-cv { height: auto; }
  .soc-plot { flex: none; height: auto; aspect-ratio: 4 / 3; }
  .suite-tags { margin-top: 0; }
}

@media (max-width: 860px) {
  .build-grid { grid-template-columns: 1fr; }
  .build-intro { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 26px 16px 26px 16px; border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(2n) { border-right: 0; }
  .rel { grid-template-columns: 1fr; gap: 10px; }
}

@media (max-width: 760px) {
  .dag { display: none; }
  .scroll-cue { display: block; }
  .clock { display: none; }
  .hero { padding-bottom: 140px; }
  .hero-name { font-size: 30vw; line-height: .84; white-space: normal; }
  .hero-name .sp { display: block; width: auto; height: 0; }
  .v-car svg { width: 64px; }
  .v-truck svg { width: 92px; }
  .v-bus svg { width: 108px; }
  .v-bike svg { width: 40px; }
  .veh { padding: 5px; }
  .veh-lbl { font-size: 9.5px; }
  .hero-row { flex-direction: column; align-items: center; gap: 8px; }
  .lock-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .lock-k { padding-top: 0; }
  .lock-v b { font-size: 14px; }
  .stage-head { gap: 10px; font-size: 12px; }
  .status { height: 26px; padding: 0 10px; font-size: 11px; }

  .runbar {
    left: 12px; right: 12px;
    gap: 12px;
    justify-content: space-between;
    transform: none;
  }
  .runbar-steps { display: none; }
  .runbar-progress { display: block; }
  .menu { bottom: 88px; }
}

@media (max-width: 420px) {
  .runbar-time { display: none; }
  .deploy-log { font-size: 11px; padding: 14px 16px; }
  .stat dt { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0s !important;
  }
  .veh, .vis-fleet::after { animation: none !important; }
  .veh { transform: none; }
  .v-car { left: 8%; } .v-truck { left: 46%; } .v-bus { left: 4%; } .v-bike { left: 70%; }
}
