:root {
  --bg: #eef2f3;
  --surface: #ffffff;
  --ink: #0f1f2a;
  --muted: #55646e;
  --line: #cfd9dd;
  --accent: #0b7a6e;
  --accent-ink: #ffffff;
  --accent-soft: #d9efeb;
  --tangle: #b4c1c7;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-logo: "Outfit", "Helvetica Neue", Arial, sans-serif;
  --logo-ring: #0B2A5B; --logo-accent: #14A3A3; --logo-sub: #0E7C86;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c171e; --surface: #13232c; --ink: #e6eef1; --muted: #93a5ae; --line: #25394431;
    --line: #263a45; --accent: #3fc4b0; --accent-ink: #072620; --accent-soft: #14383a; --tangle: #3b505b;
    --logo-ring: #FFFFFF; --logo-accent: #2DD4BF; --logo-sub: #2DD4BF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c171e; --surface: #13232c; --ink: #e6eef1; --muted: #93a5ae;
  --line: #263a45; --accent: #3fc4b0; --accent-ink: #072620; --accent-soft: #14383a; --tangle: #3b505b;
  --logo-ring: #FFFFFF; --logo-accent: #2DD4BF; --logo-sub: #2DD4BF;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  padding-inline: 20px; padding-block: 0;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1080px; margin-inline: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.label { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* header */
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-logo); text-decoration: none; }
.brand svg { width: 44px; height: 44px; flex: none; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-weight: 600; font-size: 26px; line-height: 1; letter-spacing: -0.02em; color: var(--logo-ring); }
.logo-sub { font-weight: 500; font-size: 10.5px; line-height: 1; letter-spacing: 0.38em; margin-top: 6px; color: var(--logo-sub); }
nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px; }
nav a { text-decoration: none; color: var(--muted); }
nav a:hover { color: var(--ink); }

/* hero */
.hero { display: grid; gap: 36px; padding-block: 48px 64px; }
.hero h1 { font-size: clamp(2.3rem, 6.2vw, 4.4rem); font-weight: 700; max-width: 16ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 56ch; color: var(--muted); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 13px 22px; border-radius: 6px; font-weight: 600; font-size: 16px; text-decoration: none; border: 2px solid var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { color: var(--ink); border-color: var(--line); }
.btn:hover { filter: brightness(1.08); }
.route { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 18px 8px; overflow-x: auto; }
.route svg { display: block; width: 100%; min-width: 520px; height: auto; }
.route .tangle { fill: none; stroke: var(--tangle); stroke-width: 3; stroke-linecap: round; }
.route .straight { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 420; stroke-dashoffset: 0; animation: draw 1.6s ease-out both; }
.route .node { fill: var(--surface); stroke: var(--accent); stroke-width: 3.5; }
.route text { font-family: var(--font-mono); font-size: 12.5px; fill: var(--muted); letter-spacing: 0.04em; }
.route text.on { fill: var(--ink); font-weight: 500; }
@keyframes draw { from { stroke-dashoffset: 420; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .route .straight { animation: none; } }

/* sections */
section { padding-block: 64px; border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 14px; margin-bottom: 36px; max-width: 62ch; }
.sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); font-weight: 700; }
.sec-head p { color: var(--muted); }

.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 26px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.service h3 { font-size: 1.4rem; }
.service p { color: var(--muted); font-size: 16px; }
.service ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.service li { padding-left: 18px; position: relative; }
.service li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--accent); }

/* process */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.step { padding: 28px; display: grid; gap: 10px; align-content: start; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; min-width: 0; }
.step h3 { font-size: 1.35rem; }
.step p { color: var(--muted); font-size: 16px; }
.step .label { color: var(--accent); }

/* support band */
.support { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 28px; align-items: start; }
.support h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.support .copy { display: grid; gap: 16px; color: var(--muted); }
.support .copy strong { color: var(--ink); font-weight: 600; }
.pill { display: inline-block; font-family: var(--font-mono); font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); margin: 0 6px 6px 0; }

/* contact */
.contact { background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: clamp(28px, 6vw, 56px); display: grid; gap: 22px; border: 0; }
.contact h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 18ch; }
.contact p { max-width: 54ch; }
.mail-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.mail { font-family: var(--font-mono); font-size: 16px; padding: 12px 16px; border-radius: 6px; background: var(--accent-ink); color: var(--ink); user-select: all; overflow-wrap: anywhere; }
.copy-btn { font: inherit; font-weight: 600; font-size: 15px; padding: 12px 18px; border-radius: 6px; border: 2px solid var(--accent-ink); background: transparent; color: var(--accent-ink); cursor: pointer; }
.copy-btn:hover { background: var(--accent-ink); color: var(--accent); }
.wrap-section { padding-block: 64px; border-top: 1px solid var(--line); }

footer { padding-block: 28px 40px; border-top: 1px solid var(--line); display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: 14px; }

/* v2 additions */
nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); }
.page-head { padding-block: 40px 48px; display: grid; gap: 16px; max-width: 70ch; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
.page-head p { color: var(--muted); font-size: 1.1rem; }
.tier { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px; align-items: start; }
.tier h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 700; margin: 12px 0 14px; }
.tier .intro { color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; gap: 14px; }
.panel h3 { font-size: 1.05rem; }
.panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 15.5px; }
.panel li { padding-left: 18px; position: relative; }
.panel li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 8px; height: 2px; background: var(--accent); }
.meta { display: flex; gap: 8px 20px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.link { color: var(--accent); font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent-soft); }
.link:hover { border-color: var(--accent); }
.case { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 32px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; margin-bottom: 24px; }
.case h3 { font-size: 1.5rem; margin: 8px 0 12px; }
.case dl { margin: 16px 0 0; display: grid; gap: 12px; font-size: 15.5px; }
.case dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.case dd { margin: 2px 0 0; color: var(--muted); }
.shot { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg); }
.shot img { display: block; width: 100%; height: auto; }
.shot.crop img { max-height: 420px; object-fit: cover; object-position: top; }
.shot figcaption { font-size: 13px; color: var(--muted); padding: 8px 12px; border-top: 1px solid var(--line); background: var(--surface); }
.badge { display: inline-block; font-family: var(--font-mono); font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); margin-right: 6px; }
.badge.on { background: var(--accent-soft); color: var(--ink); border-color: transparent; }
.scenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.scenario { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; gap: 10px; align-content: start; }
.scenario h3 { font-size: 1.25rem; }
.scenario p { color: var(--muted); font-size: 15.5px; }
.scenario .k { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.note { font-size: 13.5px; color: var(--muted); }
.cta { margin-top: 8px; }

.slimcta { display:flex; gap:16px 28px; flex-wrap:wrap; align-items:center; justify-content:space-between; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:28px 32px; }
.slimcta h2 { font-size: clamp(1.4rem,3vw,2rem); }

.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 90px minmax(120px, 200px) 1fr; gap: 12px 28px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); }
.row .num { font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 700; line-height: 1; color: var(--accent); }
.row h3 { font-size: 1.5rem; }
.row p { color: var(--muted); max-width: 60ch; }
@media (max-width: 640px) { .row { grid-template-columns: 56px 1fr; } .row p { grid-column: 1 / -1; } }

@media (max-width: 700px) { .services { grid-template-columns: 1fr; } }
.meta { flex-direction: column; align-items: flex-start; gap: 12px; }
nav a.navcta { background: var(--accent); color: var(--accent-ink); padding: 8px 16px; border-radius: 6px; font-weight: 600; border-bottom: 0; }
nav a.navcta:hover { color: var(--accent-ink); filter: brightness(1.08); }
nav { align-items: center; }
.jump { display: flex; gap: 8px 24px; flex-wrap: wrap; margin-top: 4px; }

.acc-list { display: grid; gap: 12px; }
.acc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.acc[open] { border-color: var(--accent); }
.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover .t { color: var(--accent); }
.acc .sm { display: grid; gap: 6px; min-width: 0; }
.acc .t { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.acc .d { color: var(--muted); font-size: 15.5px; }
.acc .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.acc .tags .badge { margin: 0; }
.chev { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); position: relative; }
.chev::before { content: ""; position: absolute; left: 11px; top: 10px; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .15s; }
.acc[open] .chev::before { transform: rotate(-135deg); top: 14px; }
.case-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 28px; align-items: start; padding: 4px 24px 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.case-body dl { margin: 0; display: grid; gap: 12px; font-size: 15.5px; }
.case-body dt { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.case-body dd { margin: 2px 0 0; color: var(--muted); }
.scen-body { display: grid; gap: 10px; padding: 20px 24px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15.5px; }
.scen-body strong { color: var(--ink); }

.twocol { list-style: none; margin: 0; padding: 0; columns: 2 320px; column-gap: 48px; }
.twocol li { break-inside: avoid; position: relative; padding: 12px 0 12px 22px; border-bottom: 1px solid var(--line); font-size: 16.5px; }
.twocol li::before { content: ""; position: absolute; left: 0; top: 1.3em; width: 10px; height: 2px; background: var(--accent); }
