/* =========================================================
   DESIGN TOKENS — edit here to restyle the whole site
   ========================================================= */
:root {
  /* color: dark (default) */
  --bg: #121316;
  --bg-2: #181a1e;
  --panel: #1b1d22;
  --line: rgba(242, 241, 238, 0.14);
  --line-strong: rgba(242, 241, 238, 0.3);
  --ink: #f2f1ee;
  --ink-strong: #ffffff;
  --muted: rgba(242, 241, 238, 0.68);
  --faint: rgba(242, 241, 238, 0.56);
  --accent: #ff6a2b;
  --accent-hot: #ffb15c;
  --accent-ink: #ff7a3d;       /* accent used for text */
  --accent-soft: rgba(255, 106, 43, 0.12);
  --data: #7fb0ff;             /* diagrams only: "data" vs "fire" */
  --btn-bg: #f2f1ee;
  --btn-ink: #121316;
  --scan: rgba(255, 255, 255, 0.022);
  --grid-dot: rgba(242, 241, 238, 0.05);
  --nav-bg: rgba(18, 19, 22, 0.78);

  /* type */
  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 620;
  --display-tracking: -0.035em;
  --display-leading: 1.02;
  --fs-display: clamp(2.5rem, 7.2vw, 4.5rem);
  --fs-h2: clamp(2.1rem, 5.4vw, 3.75rem);
  --fs-h3: 1.35rem;
  --fs-body: 1.0625rem;
  --fs-mono: 0.6875rem;        /* 11px micro-labels */
  --mono-tracking: 0.15em;

  /* layout */
  --gutter: 16px;
  --maxw: 1240px;
  --section-pad: clamp(72px, 11vw, 140px);
  --card-pad: 32px;
  --radius: 0px;
  --nav-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

:root[data-theme="light"] {
  --bg: #f5f3ef;
  --bg-2: #ecE9e3;
  --panel: #ffffff;
  --line: rgba(18, 19, 22, 0.16);
  --line-strong: rgba(18, 19, 22, 0.34);
  --ink: #1b1c20;
  --ink-strong: #000000;
  --muted: rgba(27, 28, 32, 0.74);
  --faint: rgba(27, 28, 32, 0.62);
  --accent: #f0551a;
  --accent-hot: #ff8a3d;
  --accent-ink: #c2410c;
  --accent-soft: rgba(240, 85, 26, 0.1);
  --data: #2563c9;
  --btn-bg: #1b1c20;
  --btn-ink: #f5f3ef;
  --scan: rgba(0, 0, 0, 0.018);
  --grid-dot: rgba(0, 0, 0, 0.06);
  --nav-bg: rgba(245, 243, 239, 0.82);
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; } }

/* =========================================================
   BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* scanline texture */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(to bottom, var(--scan) 0, var(--scan) 1px, transparent 1px, transparent 3px);
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); line-height: var(--display-leading); color: var(--ink-strong); margin: 0; }
h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.02em; line-height: 1.15; }
p { margin: 0 0 1em; }
em, .acc { font-style: normal; color: var(--accent-ink); }
ul, ol { padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #111; }

:focus-visible { outline: 2px solid var(--accent-hot); outline-offset: 3px; }
:root[data-theme="light"] :focus-visible { outline-color: var(--accent-ink); }

.skip { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--btn-bg); color: var(--btn-ink); padding: 10px 14px; font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: var(--mono-tracking); text-transform: uppercase; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.mono, .label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: var(--mono-tracking);
  text-transform: uppercase;
  line-height: 1.5;
}
.label { color: var(--faint); }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 640px; line-height: 1.55; }
.muted { color: var(--muted); }

/* sections */
.section { padding-block: var(--section-pad); position: relative; scroll-margin-top: var(--nav-h); }
.sec-head {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line-strong);
  padding-top: 14px; margin-bottom: clamp(28px, 5vw, 56px);
}
.sec-head .num { color: var(--ink); }
.sec-head .num b { color: var(--accent-ink); font-weight: 500; }
.sec-title { max-width: 900px; margin-bottom: 24px; }
.sec-intro { max-width: 640px; color: var(--muted); font-size: clamp(1.02rem, 1.8vw, 1.15rem); margin-bottom: clamp(32px, 5vw, 56px); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 22px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: var(--mono-tracking); text-transform: uppercase;
  text-decoration: none; border-radius: var(--radius); transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:hover { border-color: var(--ink); transform: translateY(-2px); }
.btn svg { width: 14px; height: 14px; flex: none; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #130a05; }
.btn-sm { padding: 11px 14px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* hairline grid cards */
.grid-lines { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-lines > * { background: var(--bg); }

/* reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* =========================================================
   NAV
   ========================================================= */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: var(--nav-h); background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 650; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink-strong); }
.logo svg { width: 24px; height: 26px; }
.nav-links { display: none; align-items: center; gap: 22px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--ink-strong); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: block; }
:root[data-theme="light"] .theme-toggle .i-moon { display: none; }
.nav-cta { display: none; }
.menu-btn .bars { width: 16px; height: 10px; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: currentColor; transition: transform .25s var(--ease), top .25s var(--ease); }
.menu-btn .bars::before { top: 1px; }
.menu-btn .bars::after { top: 8px; }
.menu-btn[aria-expanded="true"] .bars::before { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { top: 4px; transform: rotate(-45deg); }
.nav.open .nav-links { display: flex; flex-direction: column; align-items: stretch; gap: 0; position: absolute; top: var(--nav-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; }
.nav.open .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 1040px) {
  .nav-links { display: flex; }
  .menu-btn { display: none; }
}
@media (min-width: 1240px) { .nav-cta { display: inline-flex; } }

/* side index */
.side-index { display: none; position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 150; }
.side-index ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; justify-items: end; }
.side-index a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--faint); transition: color .2s; }
.side-index a span { opacity: 0; transform: translateX(6px); transition: opacity .25s, transform .25s var(--ease); }
.side-index a::after { content: ""; width: 14px; height: 1px; background: currentColor; transition: width .3s var(--ease); }
.side-index a:hover, .side-index a.active { color: var(--ink-strong); }
.side-index a.active::after { width: 30px; background: var(--accent); }
.side-index a.active span, .side-index a:hover span, .side-index a:focus-visible span { opacity: 1; transform: none; }
@media (min-width: 1360px) { .side-index { display: block; } }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-top: calc(var(--nav-h) + clamp(40px, 7vw, 88px)); padding-bottom: clamp(56px, 8vw, 100px); position: relative; overflow: hidden; background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px); background-size: 28px 28px; scroll-margin-top: 0; }
.hero > .wrap { position: relative; z-index: 1; }
.hero .sec-head { margin-bottom: clamp(28px, 5vw, 48px); }
.hero h1 { max-width: 920px; }
.hero .lede { margin-top: 28px; }
.ruler { position: relative; height: 22px; margin-top: clamp(40px, 6vw, 64px); background-image: repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px 12px), repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px 60px); background-size: 100% 6px, 100% 14px; background-repeat: repeat-x; background-position: 0 0; color: var(--faint); }
.ruler span { position: absolute; top: 6px; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; transform: translateX(-50%); }
.wordmark-bg { position: absolute; right: -2%; top: calc(var(--nav-h) + 20px); font-family: var(--font-display); font-weight: 800; font-size: clamp(6rem, 22vw, 20rem); letter-spacing: -0.05em; line-height: .8; color: transparent; -webkit-text-stroke: 1px var(--line); pointer-events: none; user-select: none; white-space: nowrap; }

.stage-wrap { margin-top: 14px; }
.stage {
  position: relative; display: grid; align-items: center;
  grid-template-columns: minmax(150px, 190px) minmax(120px, 1fr) minmax(300px, 400px);
  column-gap: clamp(16px, 4vw, 56px);
  padding: 32px; margin: 0;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 70%, transparent);
}
.stage > * { position: relative; z-index: 1; min-width: 0; }
.stage > .stage-svg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.stage-cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.src { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; transition: border-color .3s, color .3s, background .3s; }
.src svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.3; }
.src.hot { border-color: var(--accent); color: var(--ink-strong); background: var(--accent-soft); }
.src.hot svg { stroke: var(--accent-hot); }

.core { justify-self: center; width: 150px; height: 168px; position: relative; display: grid; place-items: center; }
.core .hex { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.core .hex-fill { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; }
.core .hex-glow { fill: var(--accent); opacity: .18; transform-origin: 50% 50%; animation: corePulse 2.4s ease-in-out infinite; }
.core .hex-ring { fill: none; stroke: var(--accent-hot); stroke-width: 1; opacity: 0; transform-origin: 50% 50%; animation: coreRing 2.4s ease-out infinite; }
.core-inner { position: relative; text-align: center; display: grid; gap: 4px; }
.core-rows { display: grid; gap: 3px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.core-rows span { opacity: .35; transition: opacity .12s, color .12s; }
.core-rows span.on { opacity: 1; color: var(--accent-hot); }
.core-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .16em; color: var(--ink-strong); margin-bottom: 4px; }
@keyframes corePulse { 0%, 100% { transform: scale(1); opacity: .14; } 50% { transform: scale(1.12); opacity: .3; } }
@keyframes coreRing { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.5); opacity: 0; } }

.report { background: var(--panel); border: 1px solid var(--line-strong); padding: 20px 20px 16px; min-height: 270px; transition: opacity .6s; }
.report.fade { opacity: 0; }
.report-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.report h3 { font-size: 1.2rem; margin-bottom: 14px; }
.report ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.report li { font-size: .84rem; line-height: 1.45; color: var(--muted); opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.report li.on { opacity: 1; transform: none; }
.cite { display: inline-block; font-family: var(--font-mono); font-size: 10px; color: var(--faint); border: 1px solid var(--line); padding: 0 4px; margin-left: 4px; line-height: 1.5; vertical-align: 1px; transition: color .3s, border-color .3s, background .3s; }
.cite.lit { color: #130a05; background: var(--accent-hot); border-color: var(--accent-hot); }
.report-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.report-foot span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; color: var(--faint); transition: color .3s; }
.report-foot span.lit { color: var(--accent-ink); }
.cite-line { fill: none; stroke: var(--accent-hot); stroke-width: 1; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .7; transition: stroke-dashoffset .9s var(--ease); }
.cite-line.draw { stroke-dashoffset: 0; }
.flow-line { fill: none; stroke: var(--data); stroke-opacity: .2; stroke-width: 1; }
.particle { fill: var(--data); }

@media (max-width: 860px) {
  .stage { grid-template-columns: 1fr; row-gap: 84px; padding: 20px 16px; }
  .sources { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .src { flex-direction: column; justify-content: center; gap: 4px; height: 54px; padding: 0 2px; font-size: 8px; letter-spacing: .04em; text-align: center; }
  .report { min-height: 250px; }
}

/* =========================================================
   PROBLEM
   ========================================================= */
.problem-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .problem-grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.chaos { position: relative; height: 340px; border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; }
.chip { position: absolute; left: var(--x); top: var(--y); padding: 6px 10px; border: 1px solid var(--line-strong); background: var(--bg); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .06em; color: var(--muted); white-space: nowrap; transform: rotate(var(--r)); animation: drift var(--t, 9s) ease-in-out infinite alternate; animation-delay: var(--dl, 0s); }
.chip:nth-child(3n) { border-color: var(--accent); color: var(--accent-ink); }
@keyframes drift { from { transform: translate(0, 0) rotate(var(--r)); } to { transform: translate(var(--dx, 14px), var(--dy, -10px)) rotate(calc(var(--r) * -0.6)); } }
.problem-list { list-style: none; margin: 28px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.problem-list li { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; gap: 16px; color: var(--muted); }
.problem-list .label { color: var(--accent-ink); flex: none; padding-top: 4px; }

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.pipeline { border: 1px solid var(--line); }
.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); position: relative; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(6, 1fr); } }
.step { text-align: left; background: var(--bg); border: 0; padding: 18px 16px 20px; position: relative; display: grid; gap: 10px; align-content: start; color: var(--muted); transition: background .25s, color .25s; border-radius: 0; }
.step:hover { background: var(--bg-2); color: var(--ink); }
.step .n { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: var(--mono-tracking); color: var(--faint); }
.step .t { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; color: inherit; }
.step::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.step[aria-selected="true"] { background: var(--accent-soft); color: var(--ink-strong); }
.step[aria-selected="true"] .n { color: var(--accent-ink); }
.step[aria-selected="true"]::after { transform: scaleX(1); }
.step.done .n::after { content: " ·"; color: var(--accent-ink); }
.step-panel { padding: clamp(24px, 4vw, 40px); display: grid; gap: 32px; background: var(--bg); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .step-panel { grid-template-columns: 1.2fr 1fr; } }
.step-panel h3 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: 14px; }
.step-panel p { color: var(--muted); max-width: 52ch; }
.detail-list { list-style: none; margin: 0; display: grid; gap: 0; border: 1px solid var(--line); align-self: start; }
.detail-list li { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .93rem; color: var(--muted); display: flex; gap: 12px; }
.detail-list li:last-child { border-bottom: 0; }
.detail-list li::before { content: ""; width: 6px; height: 6px; margin-top: 9px; flex: none; background: var(--accent); }
.step-panel.swap > * { animation: swapIn .45s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tokens { margin-top: clamp(40px, 6vw, 72px); border: 1px solid var(--line); padding: clamp(24px, 4vw, 40px); background: var(--bg-2); }
.tokens-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 8px; }
.badge { display: inline-block; border: 1px solid var(--accent); color: var(--accent-ink); padding: 3px 8px; }
.tokens h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 10px; }
.tokens > p { color: var(--muted); max-width: 62ch; }
.token-bars { display: grid; gap: 22px; margin-top: 28px; }
.bar-row .label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: var(--ink); }
.bar-row .label span:last-child { color: var(--faint); }
.bar-track { height: 28px; border: 1px solid var(--line); background: repeating-linear-gradient(to right, transparent 0 11px, var(--line) 11px 12px); overflow: hidden; }
.bar-fill { height: 100%; width: 100%; transform: scaleX(0); transform-origin: left; transition: transform 1.6s var(--ease); }
.bar-fill.all { background: var(--data); opacity: .85; }
.bar-fill.few { background: var(--accent); }
.tokens.in .bar-fill.all { transform: scaleX(1); }
.tokens.in .bar-fill.few { transform: scaleX(.14); transition-delay: .5s; }
.tokens-note { margin-top: 18px; color: var(--faint); font-size: .85rem; }

/* =========================================================
   SERVICES
   ========================================================= */
.cards-3 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { padding: var(--card-pad); display: flex; flex-direction: column; gap: 14px; position: relative; transition: background .3s; min-height: 100%; }
.card:hover { background: var(--bg-2); }
.card::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.card:hover::before { transform: scaleX(1); }
.card .top { display: flex; justify-content: space-between; gap: 8px; }
.card .top .num { color: var(--accent-ink); }
.card p { color: var(--muted); font-size: .98rem; margin: 0; }
.card .price { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.card .price b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; color: var(--ink-strong); margin-top: 4px; }
.card .price small { display: block; color: var(--faint); font-size: .82rem; margin-top: 2px; }
.fine { color: var(--faint); font-size: .88rem; margin-top: 20px; max-width: 70ch; }

/* =========================================================
   EXAMPLES
   ========================================================= */
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px dashed var(--accent); color: var(--accent-ink); margin-bottom: 20px; }
.banner::before { content: ""; width: 8px; height: 8px; background: var(--accent); flex: none; }
.tabs { display: flex; overflow-x: auto; border: 1px solid var(--line); border-bottom: 0; scrollbar-width: thin; }
.tab { flex: 1 0 auto; background: var(--bg); border: 0; border-right: 1px solid var(--line); padding: 16px 20px; color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: var(--mono-tracking); text-transform: uppercase; white-space: nowrap; position: relative; border-radius: 0; transition: background .2s, color .2s; }
.tab:last-child { border-right: 0; }
.tab:hover { background: var(--bg-2); color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink-strong); background: var(--accent-soft); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }
.demo { border: 1px solid var(--line); padding: clamp(20px, 4vw, 40px); display: grid; gap: 28px; background: var(--bg); min-height: 560px; }
@media (min-width: 900px) { .demo { grid-template-columns: 1fr 1.1fr; gap: 48px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 28px; list-style: none; padding: 0; }
.chips li { border: 1px solid var(--line-strong); padding: 6px 10px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.chips li::before { content: ""; width: 6px; height: 6px; background: var(--data); }
.ask { border: 1px solid var(--line-strong); background: var(--bg-2); padding: 16px; min-height: 108px; font-size: 1.02rem; color: var(--ink-strong); line-height: 1.5; }
.ask .caret { display: inline-block; width: 8px; height: 1.05em; background: var(--accent); vertical-align: text-bottom; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.who-note { margin-top: 18px; color: var(--faint); font-size: .86rem; max-width: 52ch; }
.answer { border: 1px solid var(--line-strong); background: var(--panel); padding: 22px; opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); align-self: start; }
.answer.show { opacity: 1; transform: none; }
.answer .a-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.answer h4 { font-size: 1.3rem; margin-bottom: 14px; letter-spacing: -0.02em; }
.answer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.answer li { color: var(--muted); font-size: .94rem; line-height: 1.5; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.answer li.on { opacity: 1; transform: none; }
.answer li strong { color: var(--ink-strong); font-weight: 600; }
.answer .srcs { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.answer .srcs div { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: var(--faint); opacity: 0; transition: opacity .6s; }
.answer .srcs div.on { opacity: 1; }
.answer .srcs b { color: var(--accent-ink); font-weight: 500; margin-right: 6px; }
.answer .cite { color: var(--accent-ink); border-color: var(--accent); }

/* =========================================================
   SECURITY
   ========================================================= */
.sec-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .checks { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; } }
.boundary { border: 1.5px solid var(--accent); position: relative; padding: 44px 20px 24px; background: var(--accent-soft); }
.boundary > .tag { position: absolute; top: 0; left: 0; transform: translateY(-50%); margin-left: 16px; background: var(--bg); padding: 2px 10px; color: var(--accent-ink); }
.flow { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.node { background: var(--bg); border: 1px solid var(--line-strong); padding: 14px 16px; position: relative; }
.node .label { color: var(--accent-ink); }
.node b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink-strong); }
.node small { color: var(--muted); font-size: .84rem; display: block; line-height: 1.4; margin-top: 2px; }
.flow li { position: relative; padding-bottom: 28px; }
.flow li:last-child { padding-bottom: 0; }
.flow li:not(:last-child)::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 1px; height: 28px; background: repeating-linear-gradient(to bottom, var(--data) 0 4px, transparent 4px 8px); background-size: 1px 16px; animation: flowDown 1s linear infinite; }
@keyframes flowDown { to { background-position: 0 16px; } }
@media (min-width: 900px) {
  .flow { grid-template-columns: repeat(4, 1fr); }
  .flow li { padding-bottom: 0; padding-right: 28px; }
  .flow li:last-child { padding-right: 0; }
  .flow li:not(:last-child)::after { left: auto; right: 0; top: 50%; bottom: auto; width: 28px; height: 1px; background: repeating-linear-gradient(to right, var(--data) 0 4px, transparent 4px 8px); background-size: 16px 1px; animation: flowRight 1s linear infinite; }
  @keyframes flowRight { to { background-position: 16px 0; } }
}
.outside { margin-top: 28px; display: grid; gap: 14px; }
.outside .node { border-style: dashed; }
.outside .gap { display: flex; align-items: center; gap: 12px; color: var(--faint); }
.outside .gap::before, .outside .gap::after { content: ""; flex: 1; height: 1px; background: repeating-linear-gradient(to right, var(--line-strong) 0 4px, transparent 4px 8px); }
.checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.checks li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 34px 1fr; gap: 6px; }
.checks .label { color: var(--accent-ink); padding-top: 4px; }
.checks b { color: var(--ink-strong); font-weight: 600; display: block; }
.checks span.d { color: var(--muted); font-size: .95rem; }
.support { margin-top: 28px; border: 1px solid var(--line); padding: 18px 20px; background: var(--bg-2); }
.support p { margin: 8px 0 0; color: var(--muted); font-size: .94rem; }

/* =========================================================
   ENGAGEMENT / PRICING
   ========================================================= */
.path { grid-template-columns: 1fr; }
@media (min-width: 800px) { .path { grid-template-columns: repeat(4, 1fr); } }
.path .card { padding-bottom: 36px; }
.path .big { font-family: var(--font-display); font-weight: 620; font-size: clamp(1.45rem, 2.4vw, 1.8rem); letter-spacing: -0.035em; color: var(--ink-strong); line-height: 1; }
.path .when { color: var(--accent-ink); }
.price-table { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: 1fr; }
@media (min-width: 800px) { .price-table { grid-template-columns: repeat(3, 1fr); } }
.price-table .card .amt { font-family: var(--font-display); font-weight: 620; font-size: 2.4rem; letter-spacing: -0.035em; color: var(--ink-strong); line-height: 1; }
.price-table .card .amt small { font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: .12em; color: var(--faint); font-weight: 400; margin-left: 6px; text-transform: uppercase; }
.price-table ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.price-table li { margin-bottom: 4px; }
.callout { margin-top: 24px; border-left: 2px solid var(--accent); padding: 4px 0 4px 18px; color: var(--muted); max-width: 72ch; }
.callout b { color: var(--ink-strong); font-weight: 600; }

/* =========================================================
   WHO
   ========================================================= */
.who { grid-template-columns: 1fr; }
@media (min-width: 700px) { .who { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .who { grid-template-columns: repeat(3, 1fr); } }
.who .card h3 { font-size: 1.3rem; }

/* =========================================================
   FAQ
   ========================================================= */
.faq { border-top: 1px solid var(--line); max-width: 920px; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 20px; text-align: left; padding: 24px 0; background: none; border: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.4vw, 1.5rem); letter-spacing: -0.02em; color: var(--ink-strong); border-radius: 0; }
.faq-q:hover { color: var(--accent-ink); }
.faq-q .pm { width: 18px; height: 18px; position: relative; flex: none; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: currentColor; left: 0; right: 0; top: 8px; height: 1.5px; transition: transform .3s var(--ease); }
.faq-q .pm::after { transform: rotate(90deg); }
.faq-q[aria-expanded="true"] .pm::after { transform: rotate(0); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-a p { color: var(--muted); max-width: 66ch; padding-bottom: 24px; margin: 0; }
.faq-item:has(.faq-q[aria-expanded="true"]) .faq-a { grid-template-rows: 1fr; }

/* =========================================================
   CONTACT / FOOTER
   ========================================================= */
.contact-grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.about { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); max-width: 52ch; font-size: .98rem; }
.form { display: grid; gap: 20px; border: 1px solid var(--line-strong); padding: clamp(20px, 4vw, 36px); background: var(--bg-2); }
.field { display: grid; gap: 8px; }
.field label { color: var(--muted); }
.field input, .field textarea { width: 100%; background: var(--bg); color: var(--ink-strong); border: 1px solid var(--line-strong); border-radius: 0; padding: 13px 14px; font: inherit; font-size: 1rem; transition: border-color .2s; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent-hot); outline-offset: 1px; border-color: var(--accent); }
:root[data-theme="light"] .field input:focus-visible, :root[data-theme="light"] .field textarea:focus-visible { outline-color: var(--accent-ink); }
.form-note { min-height: 1.6em; color: var(--accent-ink); font-size: .95rem; margin: 0; }
.form .todo { color: var(--faint); font-size: .8rem; margin: 0; }
.footer { border-top: 1px solid var(--line-strong); padding-block: 40px 56px; }
.footer .wrap { display: grid; gap: 28px; }
@media (min-width: 800px) { .footer .wrap { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; color: var(--muted); }
.footer a:hover { color: var(--ink-strong); }
.footer .fine { margin: 10px 0 0; }

/* =========================================================
   INDUSTRIES (cards on the main page; linked "Who we help" cards)
   ========================================================= */
.ind-card { text-decoration: none; color: inherit; }
.ind-card .top { align-items: center; }
.ind-icon { width: 26px; height: 26px; fill: none; stroke: var(--accent-ink); stroke-width: 1.2; flex: none; }
.ind-card h3 { font-size: 1.3rem; }
.ind-card .go { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--accent-ink); }
.ind-card:hover .go { color: var(--ink-strong); }
.who .stretch { color: inherit; text-decoration: none; }
.who .stretch::after { content: ""; position: absolute; inset: 0; }
.who .stretch:hover { color: var(--accent-ink); }
.who .stretch:focus-visible { outline: none; }
.who .stretch:focus-visible::after { outline: 2px solid var(--accent-hot); outline-offset: -3px; }
.who .card .more { position: relative; z-index: 1; margin: auto 0 0; padding-top: 14px; color: var(--accent-ink); font-size: var(--fs-mono); }
.who .card .more a { text-decoration-color: var(--accent); }

/* =========================================================
   REDUCED MOTION
   ========================================================= */
@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; }
  .js .reveal { opacity: 1; transform: none; }
  .chip { animation: none; }
}

/* =========================================================
   NAV: INDUSTRIES DROPDOWN (behavior in nav.js)
   ========================================================= */
.nav-dd { position: relative; align-self: stretch; display: flex; align-items: center; }
.dd-btn { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 0; margin: 0; color: var(--muted); font: inherit; letter-spacing: inherit; text-transform: inherit; border-radius: 0; cursor: pointer; transition: color .2s; }
.dd-btn:hover, .nav-dd.open .dd-btn { color: var(--ink-strong); }
.dd-caret { width: 9px; height: 6px; transition: transform .25s var(--ease); }
.nav-dd.open .dd-caret { transform: rotate(180deg); }
.dd-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line); }
.dd-grid > li { background: var(--bg); }
.nav-links .dd-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; color: var(--muted); text-decoration: none; transition: background .2s, color .2s; }
.dd-item:hover, .dd-item:focus-visible { background: var(--bg-2); color: var(--ink-strong); }
.dd-item[aria-current="page"] { color: var(--ink-strong); }
.dd-ico { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--accent-ink); }
.dd-item:hover .dd-ico, .dd-item:focus-visible .dd-ico { color: var(--accent-hot); }
.dd-txt { display: grid; gap: 4px; min-width: 0; }
.dd-txt b { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-mono); letter-spacing: var(--mono-tracking); text-transform: uppercase; color: var(--ink-strong); }
.dd-txt small { font-family: var(--font-body); font-size: .82rem; letter-spacing: 0; text-transform: none; line-height: 1.4; color: var(--faint); }
/* no-JS fallback: show the panel on hover or focus */
html:not(.js) .nav-dd:hover .dd-panel, html:not(.js) .nav-dd:focus-within .dd-panel { display: block; }
.dd-panel { display: none; }
.js .nav-dd.open .dd-panel { display: block; }
/* mobile: expandable group inside the hamburger menu */
.nav.open .nav-links .nav-dd { display: block; align-self: auto; border-bottom: 1px solid var(--line); }
.nav.open .dd-btn { width: 100%; justify-content: space-between; padding: 14px 0; }
.nav.open .dd-panel { border-left: 1px solid var(--line-strong); margin: 0 0 12px 4px; }
.nav.open .nav-links .dd-item { display: flex; border-bottom: 0; padding: 12px 14px; }
@media (min-width: 1040px) {
  .dd-panel { position: absolute; top: 100%; left: -16px; width: min(600px, 90vw); background: var(--bg); border: 1px solid var(--line-strong); border-top: 2px solid var(--accent); box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
  .dd-grid { grid-template-columns: 1fr 1fr; }
}
.sec-more { margin-top: 20px; }
.sec-more a { color: var(--accent-ink); text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.sec-more a:hover { color: var(--ink-strong); }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* =========================================================
   PAGE TRANSITIONS — "shutter"
   A near-black panel with the grid texture sweeps down behind an ember scan line,
   the next page loads underneath, then the panel continues down and away.
   Timing: change --pt-out (closing) and --pt-in (opening) here — nav.js reads them.
   ========================================================= */
:root { --pt-out: 420ms; --pt-in: 620ms; --pt-ease: cubic-bezier(.76, 0, .24, 1); }
html { background: var(--bg); }

.pt-curtain,
html.pt-in::before {
  content: attr(data-pt);
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background-color: var(--bg);
  background-image:
    linear-gradient(color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  border-bottom: 1px solid var(--accent);
  box-shadow: 0 1px 0 var(--accent), 0 0 28px 2px color-mix(in srgb, var(--accent) 55%, transparent);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ink);
  pointer-events: all;
  will-change: transform;
}
/* closing: the panel drops in from above */
.pt-curtain { transform: translateY(-101%); transition: transform var(--pt-out) var(--pt-ease); }
.pt-curtain.on { transform: translateY(0); }
.pt-curtain::before { content: "→ " attr(data-pt); opacity: 0; transition: opacity .2s ease .12s; }
.pt-curtain.on::before { opacity: 1; }
/* opening: the new page starts covered, then the panel continues down and away */
html.pt-in::before { content: "→ " attr(data-pt); transform: translateY(0); }
html.pt-in.pt-reveal::before { transform: translateY(101%); transition: transform var(--pt-in) var(--pt-ease); }

@media (prefers-reduced-motion: reduce) {
  .pt-curtain, .pt-curtain.on { transform: none; opacity: 0; transition: opacity .15s linear; box-shadow: none; }
  .pt-curtain.on { opacity: 1; }
  html.pt-in.pt-reveal::before { transform: none; opacity: 0; transition: opacity .2s linear; }
}

/* Unconfigured contact links stay hidden even when button styles set display. */
[data-email-link][hidden], #mailBtn[hidden] { display: none !important; }
