/* filiko.dev: light-first, one accent, dark mode via prefers-color-scheme. No inline styles anywhere. */

:root {
  --bg: #f6f5f1;
  --bg-alt: #efede6;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #111216;
  --ink-2: #3f424a;
  --ink-3: #62656d;
  --line: #e2dfd6;
  --line-2: #cfcbbf;
  --grid: rgba(17, 18, 22, 0.05);
  --accent: #3a3dff;
  --accent-hover: #2629e0;
  --accent-ink: #ffffff;
  --accent-soft: rgba(58, 61, 255, 0.07);
  --accent-line: rgba(58, 61, 255, 0.28);
  --chem-0: var(--accent);
  --chem-1: #0b8a80;
  --chem-2: #c26a00;
  --warn: #9a5200;
  --danger: #c0262d;
  --shadow: 0 1px 2px rgba(17, 18, 22, 0.04), 0 12px 32px -12px rgba(17, 18, 22, 0.12);

  --display: "Bricolage Grotesque", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --gutter: clamp(16px, 4.5vw, 56px);
  --maxw: 1200px;
  --nav-h: 64px;
  color-scheme: light;
}

/* Dark tokens, used for dark mode and for the always-dark Nexus case study panel. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e12;
    --bg-alt: #121319;
    --surface: #16181f;
    --surface-2: #1b1d25;
    --ink: #eceef3;
    --ink-2: #b9bdc8;
    --ink-3: #8d92a0;
    --line: #262933;
    --line-2: #363a48;
    --grid: rgba(236, 238, 243, 0.045);
    --accent: #8f92ff;
    --accent-hover: #abadff;
    --accent-ink: #0d0e12;
    --accent-soft: rgba(143, 146, 255, 0.1);
    --accent-line: rgba(143, 146, 255, 0.32);
    --chem-1: #3fd0c4;
    --chem-2: #f2b54a;
    --warn: #f2b54a;
    --danger: #ff8a8f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

.nexus {
  --bg: #0f1016;
  --bg-alt: #0f1016;
  --surface: #171922;
  --surface-2: #1c1f29;
  --ink: #eceef3;
  --ink-2: #b9bdc8;
  --ink-3: #8d92a0;
  --line: #272a36;
  --line-2: #383c4b;
  --grid: rgba(236, 238, 243, 0.045);
  --accent: #8f92ff;
  --accent-hover: #abadff;
  --accent-ink: #0d0e12;
  --accent-soft: rgba(143, 146, 255, 0.1);
  --accent-line: rgba(143, 146, 255, 0.32);
  --chem-0: var(--accent);
  --chem-1: #3fd0c4;
  --chem-2: #f2b54a;
  --warn: #f2b54a;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--accent-ink); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); color: var(--ink); text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: 3px; }
main:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.is-hidden { display: none !important; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top 0.15s;
}
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 12px;
  font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: -0.005em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--accent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14.5px; border-radius: 10px; box-shadow: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: var(--nav-h); display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand-tld { color: var(--ink-3); font-weight: 500; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark rect { fill: var(--accent); }
.brand-mark path { fill: none; stroke: var(--accent-ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark circle { fill: var(--accent-ink); }
.nav nav { margin-left: auto; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-size: 15px; color: var(--ink-2); transition: color 0.2s, background-color 0.2s; }
.nav-links a:hover { color: var(--ink); background: var(--accent-soft); }

/* ---------- shared section bits ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; scroll-margin-top: var(--nav-h); }
.section-alt { background: var(--bg-alt); }
.sec-head { margin-bottom: clamp(36px, 5vw, 60px); max-width: 780px; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 54px); font-weight: 700; line-height: 1.06; letter-spacing: -0.025em; }
.sec-sub { margin-top: 16px; color: var(--ink-2); font-size: 18px; max-width: 60ch; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow span { color: var(--accent); }
.eyebrow::after { content: ""; flex: 0 0 40px; height: 1px; background: var(--line-2); }
.body-lg { font-size: clamp(18px, 1.6vw, 20.5px); line-height: 1.55; color: var(--ink); }
.card-tag { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.chips li { font-family: var(--mono); font-size: 12px; line-height: 1; padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface-2); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 7vw, 88px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 30%, transparent 75%);
}
.hero::after {
  content: ""; position: absolute; width: 640px; height: 640px; right: -180px; top: -220px; pointer-events: none;
  background: radial-gradient(circle, var(--accent-soft), transparent 65%);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: var(--ink-2); padding: 7px 14px 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); margin-bottom: 28px; }
.kicker-sep { color: var(--line-2); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent-line); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent-line); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { font-size: clamp(40px, 6vw, 80px); font-weight: 700; line-height: 1.0; letter-spacing: -0.03em; max-width: 14ch; }
.hl { color: var(--accent); }
.lede { margin-top: 26px; font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 44ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.hero-viz { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 18px 18px 14px; max-width: 560px; width: 100%; justify-self: center; }
.viz-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 4px 12px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.viz-title { color: var(--ink-2); }
.viz-tag { text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; padding: 3px 8px; border: 1px dashed var(--line-2); border-radius: 6px; }
.flow { width: 100%; height: auto; margin: 10px 0 4px; overflow: visible; }
.flow .edges use { fill: none; stroke: var(--line-2); stroke-width: 1.6; }
.flow .edges-flow use { stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 2 10; stroke-linecap: round; opacity: 0.55; animation: dash 1.4s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.flow .node rect { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1.2; }
.flow .node text { font-family: var(--mono); font-size: 13.5px; fill: var(--ink); text-anchor: middle; }
.flow .node-agent rect { fill: var(--accent); stroke: var(--accent); }
.flow .node-agent text { fill: var(--accent-ink); font-weight: 500; font-size: 15px; }
.flow .node-agent .sub { font-size: 10.5px; fill: var(--accent-ink); opacity: 0.8; font-weight: 400; }
.flow .node-done rect { stroke: var(--accent); stroke-dasharray: 4 4; }
.flow .node-done text { text-anchor: start; }
.flow .check { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.flow .packets circle { fill: var(--accent); }
.viz-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 4px 0; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }

.proof { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: clamp(48px, 7vw, 80px); background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.proof li { background: var(--surface); padding: 20px 18px; display: flex; flex-direction: column; gap: 6px; }
.proof-num { font-family: var(--display); font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.proof-txt { font-size: 14.5px; line-height: 1.4; color: var(--ink-2); }

/* ---------- services ---------- */
.services { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.service { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s; }
.service:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.service-icon { width: 40px; height: 40px; margin-bottom: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 21px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 10px; }
.service p { color: var(--ink-2); font-size: 16px; }
.service-cta { text-decoration: none; background: var(--accent-soft); border: 1px dashed var(--accent-line); display: flex; flex-direction: column; }
.service-cta:hover { border-color: var(--accent); border-style: solid; }
.service-cta p { margin-bottom: 18px; }
.arrow-link { margin-top: auto; font-weight: 600; color: var(--accent); }
.service-cta:hover .arrow-link span { transform: translateX(3px); }
.arrow-link span { display: inline-block; transition: transform 0.2s; }

/* ---------- work ---------- */
.work-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 3vw, 32px); display: flex; flex-direction: column; min-width: 0; }
.case-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.case h3 { font-size: clamp(22px, 2.2vw, 26px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.case-link { font-family: var(--mono); font-size: 13px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.case-link:hover { text-decoration: underline; }
.case-what { margin-top: 6px; color: var(--ink-2); }
.case-built { margin-top: 18px; display: grid; gap: 10px; }
.case-built li { position: relative; padding-left: 20px; font-size: 15.5px; color: var(--ink-2); line-height: 1.55; }
.case-built li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.case .chips { margin-top: auto; padding-top: 22px; }
.metric { margin-top: 20px; display: flex; flex-direction: column; gap: 2px; }
.metric-num { font-family: var(--display); font-weight: 700; font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.035em; line-height: 1.05; color: var(--accent); }
.metric-arrow { font-weight: 500; color: var(--ink-3); }
.metric-txt { font-size: 14.5px; color: var(--ink-2); }
.metric-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.case-feature { gap: 28px; }
.case-feature .case-main { display: flex; flex-direction: column; }
.case-side { border-top: 1px solid var(--line); padding-top: 4px; }
.case-side .metric:first-child .metric-num { font-size: clamp(44px, 6vw, 72px); }
.case-note { margin-top: 22px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 15px; }

/* ---------- nexus case study (always dark) ---------- */
.nexus { background: var(--bg); color: var(--ink); position: relative; overflow: hidden; border-block: 1px solid var(--line); }
.nexus::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 40%);
  mask-image: linear-gradient(180deg, #000, transparent 40%);
}
.nexus > .wrap { position: relative; }
.nx-intro { display: grid; gap: 20px; margin-bottom: clamp(48px, 6vw, 72px); }
.nx-label { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.nx-problem { border: 1px solid var(--line-2); border-left: 3px solid var(--chem-2); border-radius: 14px; padding: 24px; background: var(--surface); }
.nx-problem p:last-child { font-family: var(--display); font-size: clamp(20px, 2vw, 25px); line-height: 1.3; letter-spacing: -0.015em; }
.nx-context p { color: var(--ink-2); }
.pull { margin: 0 0 18px; }
.pull p { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.pull cite { display: block; margin-top: 8px; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.nx-built { margin-bottom: 18px; }
.nx-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.nx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 3vw, 32px); min-width: 0; }
.nx-card h3 { font-size: clamp(21px, 2vw, 25px); font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 12px; }
.nx-card p { color: var(--ink-2); font-size: 16px; }
.nx-card .card-tag { color: var(--accent); }
.nx-feature, .nx-wide { display: grid; gap: 28px; align-items: center; }
.nx-text-row { display: grid; gap: 12px; }
.stat { margin-top: 22px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.stat-num { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 4vw, 52px); letter-spacing: -0.035em; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-txt { color: var(--ink-2); font-size: 15px; max-width: 30ch; }
.chips-quiet li { background: transparent; }

/* release gate (from aufstin.me, restyled) */
.gate { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.gate i { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-2); position: relative; }
.gate i::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); opacity: 0.12; }
.gate b { font-family: var(--mono); font-weight: 400; font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; margin-left: 8px; color: var(--ink-3); padding: 5px 10px; border: 1px dashed var(--line-2); border-radius: 99px; }
.gate.run i::after { animation: gate 4.8s infinite; }
.gate.run i:nth-child(2)::after { animation-delay: 0.25s; }
.gate.run i:nth-child(3)::after { animation-delay: 0.5s; }
.gate.run i:nth-child(4)::after { animation-delay: 0.75s; }
.gate.run i:nth-child(5)::after { animation-delay: 1s; }
.gate.run i:nth-child(6)::after { animation-delay: 1.25s; }
.gate.run b { animation: gate-release 4.8s infinite; }
@keyframes gate { 0% { opacity: 0.12; } 8%, 70% { opacity: 1; } 85%, 100% { opacity: 0.12; } }
@keyframes gate-release {
  0%, 34% { color: var(--ink-3); background: transparent; border-color: var(--line-2); box-shadow: none; }
  40%, 70% { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); box-shadow: 0 0 20px var(--accent-line); }
  85%, 100% { color: var(--ink-3); background: transparent; border-color: var(--line-2); box-shadow: none; }
}

/* svg visuals (CSP-safe: classes, not inline styles) */
.viz { margin: 0; min-width: 0; }
.viz svg { width: 100%; height: auto; overflow: visible; }
.viz figcaption { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--ink-3); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.illus { color: var(--warn); border: 1px solid currentColor; border-radius: 4px; padding: 1px 6px; text-transform: uppercase; letter-spacing: 0.12em; font-size: 10.5px; }
.viz-tree { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.viz-chrom { background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; padding: clamp(14px, 2.4vw, 26px); }
.t-mono { font-family: var(--mono); }
.f-ink2 { fill: var(--ink-2); }
.f-ink3 { fill: var(--ink-3); }
.f-accent { fill: var(--accent); }
.f-chem-0 { fill: var(--chem-0); }
.f-chem-1 { fill: var(--chem-1); }
.f-chem-2 { fill: var(--chem-2); }
.s-chem-0 { stroke: var(--chem-0); }
.s-chem-1 { stroke: var(--chem-1); }
.s-chem-2 { stroke: var(--chem-2); }
.s-accent { stroke: var(--accent); }
.s-line { stroke: var(--line-2); }
.s-grid { stroke: var(--line); }
.stop-accent { stop-color: var(--accent); }
.stop-chem-1 { stop-color: var(--chem-1); }
.stop-chem-2 { stop-color: var(--chem-2); }
.draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); }
.viz.in .draw { transition: stroke-dashoffset 1.6s cubic-bezier(0.6, 0.1, 0.2, 1); stroke-dashoffset: 0; }
.chrom-fill, .draw-fade { opacity: 0; transition: opacity 1.2s ease 0.9s; }
.viz.in .chrom-fill, .viz.in .draw-fade { opacity: 1; }

/* ---------- process ---------- */
.steps { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-family: var(--display); font-weight: 700; font-size: 19px; margin-bottom: 20px; border: 1px solid var(--accent-line); }
.step h3 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; margin-bottom: 8px; }
.step p { color: var(--ink-2); font-size: 16px; }

/* ---------- about ---------- */
.about { display: grid; gap: 8px; }
.about .sec-head { margin-bottom: 24px; }
.about-body { display: grid; gap: 22px; max-width: 760px; }
.about-body > p:not(.body-lg) { color: var(--ink-2); }
.about-links { display: grid; gap: 10px; margin-top: 6px; }
.about-links a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; transition: border-color 0.2s, background-color 0.2s; }
.about-links a:hover { border-color: var(--accent); }
.about-links .k { font-size: 15px; color: var(--ink-2); }
.about-links .v { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.about-links .v::after { content: " ↗"; }
.facts { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.facts div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); font-size: 16px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-intro h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; line-height: 1.05; letter-spacing: -0.028em; margin-bottom: 20px; max-width: 12ch; }
.contact-intro .body-lg { color: var(--ink-2); max-width: 40ch; }
.direct { margin-top: 26px; font-size: 17px; color: var(--ink-2); }
.direct a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; }
.booking { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: grid; gap: 12px; justify-items: start; }

.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 3.4vw, 36px); box-shadow: var(--shadow); min-width: 0; }
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23858893' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-line); background: var(--surface); }
.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 20%, transparent); }
.hint { font-size: 13.5px; color: var(--ink-3); line-height: 1.45; }
.field-row + .hint { margin-top: -8px; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.fine { font-size: 13.5px; color: var(--ink-3); }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); font-weight: 500; padding: 12px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 7%, transparent); }
.form-success { text-align: left; padding: 12px 4px; }
.form-success:focus { outline: none; }
.form-success svg { width: 52px; height: 52px; margin-bottom: 18px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.form-success h3 { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; margin-bottom: 10px; }
.form-success p { color: var(--ink-2); }
.form-success a { color: var(--accent); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 14.5px; color: var(--ink-3); }
.foot-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- simple pages (thanks, error, 404) ---------- */
.page-msg { min-height: calc(100vh - var(--nav-h) - 100px); min-height: calc(100svh - var(--nav-h) - 100px); display: grid; align-items: center; padding: 64px 0; }
.page-msg .wrap { max-width: 760px; }
.page-code { font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.page-msg h1 { font-size: clamp(36px, 5.6vw, 64px); font-weight: 700; line-height: 1.05; letter-spacing: -0.028em; margin-bottom: 20px; }
.page-msg p { color: var(--ink-2); font-size: 18.5px; max-width: 52ch; }
.page-msg p + p { margin-top: 12px; }
.page-msg p a { color: var(--accent); }
.page-msg .cta-row { margin-top: 32px; }

/* ---------- breakpoints ---------- */
@media (min-width: 640px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts div { grid-template-columns: 140px minmax(0, 1fr); gap: 16px; }
}
@media (min-width: 860px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; }
  .case-side { border-top: 0; border-left: 1px solid var(--line); padding: 0 0 0 36px; }
  .case-side .metric:first-child { margin-top: 0; }
  .nx-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px; align-items: start; }
  .nx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-feature, .nx-wide { grid-column: 1 / -1; }
  .nx-feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; }
  .nx-text-row { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: end; }
  .about { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; }
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
  .proof { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .proof li { padding: 26px 24px; }
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
  .contact-intro { position: sticky; top: calc(var(--nav-h) + 32px); }
}
@media (max-width: 759px) {
  .nav nav { display: none; }
  .nav .btn-sm { margin-left: auto; }
}
@media (max-width: 520px) {
  .kicker { font-size: 12px; letter-spacing: 0; gap: 8px; padding: 6px 12px 6px 10px; }
}
@media (max-width: 389px) {
  .kicker { border-radius: 14px; row-gap: 2px; }
  .kicker-sep { display: none; }
  .kicker span:last-child { flex-basis: 100%; padding-left: 16px; }
}
@media (max-width: 400px) {
  .brand { font-size: 17px; }
  .brand-mark { width: 26px; height: 26px; }
  .nav-inner { gap: 12px; }
  .btn-sm { padding: 0 12px; font-size: 14px; }
  .hero h1 { font-size: 40px; }
  .viz-foot span:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .gate i::after { opacity: 1; }
  .flow .packets { display: none; }
  .flow .edges-flow { display: none; }
}
.nav-back { margin-left: auto; }
.page-msg [data-reason-box] + p { margin-top: 12px; }
