:root {
  --bg: #0b0d10;
  --bg2: #0f1217;
  --surface: #12161d;
  --surface2: #161b24;
  --line: #232a36;
  --line2: #2e3746;
  --text: #d9dee6;
  --muted: #8b95a5;
  --faint: #5b6575;
  --accent: #e0a458;
  --accent-dim: rgba(224,164,88,.14);
  --teal: #6fc3b8;
  --teal-dim: rgba(111,195,184,.12);
  --violet: #9d8fd8;
  --violet-dim: rgba(157,143,216,.12);
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(224,164,88,.25); }

/* ---------- progress ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--accent); z-index: 60;
}

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
section { padding: 110px 0 40px; }
.sec-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
  display: flex; align-items: center; gap: 14px;
}
.sec-label::after { content: ""; height: 1px; flex: 0 0 60px; background: var(--line2); }
h2 { font-size: clamp(26px, 4vw, 36px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 18px; }
h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.lede { color: var(--muted); max-width: 720px; font-size: 17px; margin-bottom: 48px; }
.lede b, .lede strong { color: var(--text); font-weight: 500; }
p.small { font-size: 14px; color: var(--muted); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.rv.on { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; } .rv-d4 { transition-delay: .32s; }

/* ---------- header ---------- */
header.site {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  background: rgba(11,14,19,.86); border-bottom: 1px solid var(--line);
  transition: border-color .3s;
}
header.site.scrolled { border-bottom-color: var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.brand { font-family: var(--mono); font-size: 13px; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.brand b { color: var(--text); font-weight: 500; }
.hdr-right { display: flex; align-items: center; gap: 18px; }
nav.top { display: flex; gap: 22px; }
nav.top a { font-family: var(--mono); font-size: 12px; color: var(--muted); text-decoration: none; transition: color .2s; }
nav.top a:hover { color: var(--accent); }
.lang { display: flex; gap: 2px; border: 1px solid var(--line2); border-radius: 999px; padding: 2px; }
.lang button {
  font-family: var(--mono); font-size: 11px; background: none; border: none;
  color: var(--faint); padding: 3px 10px; border-radius: 999px; cursor: pointer;
  transition: color .2s, background .2s;
}
.lang button:hover { color: var(--text); }
.lang button.on { background: var(--surface2); color: var(--accent); }
@media (max-width: 760px) { nav.top { display: none; } }

/* ---------- hero ---------- */
.hero {
  min-height: 92vh; display: flex; flex-direction: column; justify-content: center;
  padding: 120px 0 60px; position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(224,164,88,.07), transparent 60%),
    radial-gradient(600px 300px at 85% 20%, rgba(111,195,184,.05), transparent 60%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid-bg { display: none; }
.hero-kicker { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: .14em; margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(40px, 7vw, 76px); font-weight: 600; letter-spacing: -.035em;
  line-height: 1.04; margin-bottom: 24px; max-width: 820px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { color: var(--muted); font-size: clamp(16px, 2vw, 19px); max-width: 640px; margin-bottom: 40px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 64px; }
.tag {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 999px; padding: 5px 13px;
}
.hero-flow {
  display: flex; align-items: center; gap: 0; flex-wrap: wrap;
  font-family: var(--mono); font-size: 13px; color: var(--faint);
}
.hero-flow .node {
  border: 1px solid var(--line2); background: var(--surface);
  border-radius: 8px; padding: 10px 16px; color: var(--text);
}
.hero-flow .arr { padding: 0 12px; color: var(--faint); }
.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .2em;
  animation: hint 2.4s ease-in-out infinite;
}
@keyframes hint { 0%,100% { transform: translate(-50%,0); opacity:.5 } 50% { transform: translate(-50%,6px); opacity:1 } }

/* ---------- generic diagram pieces ---------- */
.flow-col { display: flex; flex-direction: column; align-items: center; gap: 0; }
.fbox {
  border: 1px solid var(--line2); background: var(--surface); border-radius: 10px;
  padding: 12px 22px; font-family: var(--mono); font-size: 13px; text-align: center;
  min-width: 220px;
}
.fbox .sub { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.fbox.accent { border-color: rgba(224,164,88,.45); }
.fbox.teal { border-color: rgba(111,195,184,.4); }
.fbox.violet { border-color: rgba(157,143,216,.4); }
.conn { width: 1px; height: 30px; background: var(--line2); position: relative; }
.conn::after {
  content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--line2);
}

/* ---------- feature cards ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .feat-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 820px) { .feat-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; } }
.feat {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .3s, transform .3s;
}
.feat:hover { border-color: var(--line2); transform: translateY(-3px); }
.feat .shot { aspect-ratio: 360/801; overflow: hidden; background: var(--bg2); border-bottom: 1px solid var(--line); position: relative; }
.feat .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.feat .body { padding: 16px 18px 18px; }
.feat .body h3 { font-size: 15px; }
.feat .body p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.feat .tech { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 10px; }

/* ---------- evolution ---------- */
.evo { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 40px; }
.evo::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: var(--line2); }
.evo-step { position: relative; padding: 0 0 34px 10px; max-width: 640px; }
.evo-step::before {
  content: ""; position: absolute; left: -34px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--faint); transition: border-color .4s, background .4s;
}
.evo-step.on::before { border-color: var(--accent); background: var(--accent); }
.evo-num { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .1em; }
.evo-step h3 { font-size: 16px; margin: 2px 0 4px; }
.evo-step p { font-size: 14px; color: var(--muted); }

/* ---------- architecture diagram ---------- */
.arch { position: relative; margin: 20px 0 8px; }
.arch svg.wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.arch svg.wires path { stroke: var(--line2); stroke-width: 1.5; fill: none; }
.arch svg.wires path.live { stroke: var(--accent); stroke-dasharray: 4 6; }
.arch-rows { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 64px; }
.arch-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; width: 100%; }
.node2 {
  border: 1px solid var(--line2); background: var(--surface); border-radius: 12px;
  padding: 14px 18px; min-width: 150px; text-align: center; position: relative;
}
.node2 .t { font-family: var(--mono); font-size: 13px; color: var(--text); }
.node2 .d { font-size: 11.5px; color: var(--faint); margin-top: 3px; line-height: 1.4; }
.node2.hub { border-color: rgba(224,164,88,.5); background: var(--surface2); min-width: 240px; }
.node2.ext { border-style: dashed; }
.node2 .badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  background: var(--bg); padding: 1px 8px; border: 1px solid var(--line2); border-radius: 999px;
  color: var(--faint); white-space: nowrap;
}
.edge-label {
  font-family: var(--mono); font-size: 10.5px; color: var(--faint);
  background: var(--bg); padding: 1px 6px; border-radius: 4px;
}
@media (max-width: 640px) {
  .arch-rows { gap: 40px; }
  .node2 { min-width: 130px; padding: 10px 12px; }
}

/* ---------- services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 720px) { .svc-grid { grid-template-columns: 1fr; } }
.svc {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  padding: 20px 22px; transition: border-color .3s;
}
.svc:hover { border-color: var(--line2); }
.svc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.svc-head h3 { font-size: 15px; font-family: var(--mono); font-weight: 500; }
.svc-head .pkg { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.svc ul { list-style: none; }
.svc li { font-size: 13.5px; color: var(--muted); padding: 3px 0 3px 16px; position: relative; }
.svc li::before { content: "·"; position: absolute; left: 4px; color: var(--accent); }
.svc .detail {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--faint); font-family: var(--mono); line-height: 1.5;
}
.svc .detail b { color: var(--teal); font-weight: 500; }

/* ---------- data ---------- */
.data-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .data-cols { grid-template-columns: 1fr; } }
.data-box { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); padding: 22px; }
.data-box h3 { font-family: var(--mono); font-size: 14px; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.data-box .env { font-size: 11px; color: var(--faint); font-family: var(--mono); margin-bottom: 14px; }
.ent { display: flex; gap: 10px; flex-wrap: wrap; }
.ent span {
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
  border: 1px solid var(--line2); border-radius: 6px; padding: 4px 9px;
}
.ent span.hot { color: var(--accent); border-color: rgba(224,164,88,.4); }
.data-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------- journey ---------- */
.journey { position: relative; max-width: 720px; margin: 0 auto; padding-left: 56px; counter-reset: j; }
.journey::before { content: ""; position: absolute; left: 19px; top: 10px; bottom: 10px; width: 1px; background: var(--line2); }
.jstep { position: relative; padding-bottom: 36px; counter-increment: j; }
.jstep::before {
  content: counter(j); position: absolute; left: -56px; top: 0;
  width: 39px; height: 39px; border-radius: 50%;
  border: 1px solid var(--line2); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; color: var(--faint);
  transition: all .5s;
}
.jstep.on::before { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }
.jstep .who { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 3px; }
.jstep h3 { font-size: 15.5px; margin-bottom: 4px; }
.jstep p { font-size: 14px; color: var(--muted); max-width: 560px; }
.jstep code { font-family: var(--mono); font-size: 12px; color: var(--accent); background: var(--accent-dim); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }

/* ---------- trust ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
@media (max-width: 720px) { .trust-grid { grid-template-columns: 1fr; } }
.trust { border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; background: var(--surface); }
.trust h3 { font-size: 14px; font-family: var(--mono); margin-bottom: 10px; }
.trust h3 .mk { color: var(--faint); font-weight: 400; }
.trust.knows h3 { color: var(--teal); }
.trust.blind h3 { color: var(--accent); }
.trust li { font-size: 13.5px; color: var(--muted); list-style: none; padding: 3px 0 3px 18px; position: relative; }
.trust li::before { position: absolute; left: 0; font-family: var(--mono); }
.trust.knows li::before { content: "✓"; color: var(--teal); }
.trust.blind li::before { content: "✗"; color: var(--accent); }

/* ---------- war story ---------- */
.war {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 0 14px 14px 0; background: var(--surface);
  padding: 26px 30px; margin-top: 40px;
}
.war .wlabel { font-family: var(--mono); font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.war h3 { font-size: 19px; margin-bottom: 10px; }
.war p { font-size: 14.5px; color: var(--muted); margin-bottom: 10px; max-width: 760px; }
.war p b { color: var(--text); font-weight: 500; }
.war .beforeafter {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px;
}
@media (max-width: 640px) { .war .beforeafter { grid-template-columns: 1fr; } }
.ba {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  font-family: var(--mono); font-size: 12px; line-height: 1.7;
}
.ba .lbl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.ba.bad .lbl { color: #d97f7f; }
.ba.good .lbl { color: var(--teal); }
.ba .k { color: var(--faint); } .ba .v { color: var(--text); }

/* ---------- production ---------- */
.pipe { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.pstage {
  flex: 1 1 130px; border: 1px solid var(--line2); background: var(--surface);
  border-radius: 12px; padding: 14px 16px; text-align: center; position: relative;
}
.pstage .t { font-family: var(--mono); font-size: 12.5px; }
.pstage .d { font-size: 11px; color: var(--faint); margin-top: 3px; }
.parr { align-self: center; padding: 0 8px; color: var(--faint); font-family: var(--mono); }
@media (max-width: 900px) { .pipe { flex-direction: column; } .parr { transform: rotate(90deg); padding: 4px 0; } }

/* ---------- spec table ---------- */
.spec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 28px; }
@media (max-width: 900px) { .spec { grid-template-columns: repeat(2,1fr); } }
.spec .k { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.spec .v { font-size: 14px; color: var(--text); }
.spec .v span { display: block; color: var(--muted); font-size: 12.5px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 100px; padding: 44px 0 60px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer .who { font-size: 14px; }
footer .who b { font-weight: 600; }
footer .who span { display: block; font-size: 12.5px; color: var(--muted); }
footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

.callout {
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg2);
  padding: 16px 20px; font-size: 14px; color: var(--muted); margin-top: 28px;
  display: flex; gap: 12px;
}
.callout .ic { color: var(--accent); font-family: var(--mono); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }

.git-mock {
  border: 1px solid var(--line); border-radius: 12px; background: #0a0c0f;
  font-family: var(--mono); font-size: 12px; line-height: 1.8; padding: 18px 20px;
  overflow-x: auto;
}
.git-mock .c-hash { color: var(--accent); }
.git-mock .c-branch { color: var(--teal); }
.git-mock .c-dim { color: var(--faint); }
.git-mock .c-msg { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .scroll-hint { animation: none; }
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* baked locale switcher uses links as well as the draft buttons */
.lang a{font-family:var(--mono);font-size:11px;color:var(--dim);padding:5px 9px;border-radius:999px;text-decoration:none}
.lang a:hover{color:var(--txt)}
.lang a.on{background:var(--panel2);color:var(--amber)}
.shot img{width:100%;height:auto;display:block;border-radius:8px}

/* footer link pills + icons */
footer .links{flex-wrap:wrap;gap:10px}
footer .links a{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border:1px solid var(--line,rgba(128,128,128,.35));border-radius:999px;text-decoration:none}
footer .links a:hover{border-color:var(--accent,#8ab4f8)}
footer .links a svg{width:13px;height:13px;flex:none}
footer .links a img{width:14px;height:14px;border-radius:3px;flex:none}
