/* Nordrift — site styles
   Layout: one 12-column grid, left-aligned; the hero logo is the single loud moment,
   everything around it stays quiet. Light by default, dark on request or by system. */

/* ---------- Tokens ---------- */
:root {
  --indigo: #3C3A63;
  --frost: #CBCADB;
  --fjord: #7289C0;

  --bg: #F4F4F8;
  --bg-raised: #FFFFFF;
  --bg-sunk: #EAE9F1;
  --ink: #16152A;
  --ink-2: #4E4D66;
  --ink-3: #75748C;
  --line: #DEDDE8;
  --line-strong: #C3C2D3;
  --accent: #3C3A63;
  --accent-ink: #FFFFFF;
  --accent-soft: #E4E3ED;
  --focus: #3C3A63;
  --band: #3C3A63;
  --band-ink: #F4F4F8;
  --band-ink-2: #CBCADB;
  --band-line: rgba(244, 244, 248, .16);
  --warn: #9C6B2C;
  --grid-line: rgba(60, 58, 99, .07);
  --shadow-phone: 0 40px 80px -30px rgba(22, 21, 42, .45);

  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --t-xs: .8125rem;
  --t-sm: .9375rem;
  --t-base: 1.0625rem;
  --t-lg: 1.25rem;
  --t-xl: clamp(1.375rem, 1.1rem + .9vw, 1.75rem);
  --t-2xl: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
  --t-3xl: clamp(2.25rem, 1.5rem + 3vw, 3.75rem);
  --t-display: clamp(2.75rem, 1.6rem + 5vw, 5.5rem);

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 64px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #100F1C;
  --bg-raised: #191828;
  --bg-sunk: #0B0A14;
  --ink: #EEEDF6;
  --ink-2: #AAA9C0;
  --ink-3: #7E7D96;
  --line: #262539;
  --line-strong: #39384F;
  --accent: #CBCADB;
  --accent-ink: #16152A;
  --accent-soft: #21203A;
  --focus: #7289C0;
  --band: #25233F;
  --band-line: rgba(203, 202, 219, .14);
  --warn: #EBDBBC;
  --grid-line: rgba(203, 202, 219, .055);
  --shadow-phone: 0 40px 80px -30px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #100F1C; --bg-raised: #191828; --bg-sunk: #0B0A14;
    --ink: #EEEDF6; --ink-2: #AAA9C0; --ink-3: #7E7D96;
    --line: #262539; --line-strong: #39384F;
    --accent: #CBCADB; --accent-ink: #16152A; --accent-soft: #21203A;
    --focus: #7289C0; --band: #25233F; --band-line: rgba(203, 202, 219, .14);
    --warn: #EBDBBC; --grid-line: rgba(203, 202, 219, .055);
    --shadow-phone: 0 40px 80px -30px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: var(--t-base);
  line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; }
p, li { text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--indigo); color: #fff; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); text-decoration: none; }
.skip-link:focus { top: 12px; }
.mono { font-family: var(--f-mono); font-feature-settings: "zero"; }
.num { font-variant-numeric: tabular-nums; }

/* theme-specific images */
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .only-dark { display: block; }
  :root:not([data-theme]) .only-light { display: none; }
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { html:not(.lenis) { scroll-behavior: smooth; } }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 10vw, 140px); }
.section-tight { padding-block: clamp(48px, 7vw, 96px); }
.rule-top { border-top: 1px solid var(--line); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); }
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Type ---------- */
.display { font-size: var(--t-display); letter-spacing: -.045em; line-height: 1; font-weight: 500; }
.h1 { font-size: var(--t-3xl); letter-spacing: -.04em; line-height: 1.04; }
.h2 { font-size: var(--t-2xl); letter-spacing: -.032em; }
.h3 { font-size: var(--t-xl); letter-spacing: -.022em; line-height: 1.2; }
.h4 { font-size: var(--t-lg); letter-spacing: -.015em; line-height: 1.3; }
.lede { font-size: var(--t-xl); line-height: 1.4; letter-spacing: -.018em; color: var(--ink-2); max-width: 34ch; }
.body-lg { font-size: var(--t-lg); line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: var(--t-sm); }
.xsmall { font-size: var(--t-xs); }
.stack > * + * { margin-top: 1em; }
.stack-lg > * + * { margin-top: 1.5rem; }
.section-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { color: var(--ink-2); font-size: var(--t-lg); line-height: 1.5; max-width: 56ch; }
.kicker { font-size: var(--t-sm); color: var(--ink-3); font-weight: 500; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- Buttons ---------- */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  --b-bg: var(--accent); --b-ink: var(--accent-ink); --b-line: transparent;
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border-radius: 12px; border: 1px solid var(--b-line);
  background: var(--b-bg); color: var(--b-ink);
  font-size: var(--t-sm); font-weight: 500; letter-spacing: -.005em; text-decoration: none;
  cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-ghost { --b-bg: transparent; --b-ink: var(--ink); --b-line: var(--line-strong); }
.btn-ghost:hover { --b-line: var(--ink-3); }
.btn-play { --b-bg: var(--ink); --b-ink: var(--bg); }
.btn-play .btn-sub { display: block; font-size: 11px; font-weight: 400; opacity: .72; line-height: 1; margin-bottom: 3px; }
.btn-play .btn-main { display: block; font-size: 16px; line-height: 1; letter-spacing: -.01em; }
.btn-play { min-height: 54px; padding: 0 22px 0 18px; }
.on-band .btn-play { --b-bg: #F4F4F8; --b-ink: #16152A; }
.on-band .btn-ghost { --b-ink: var(--band-ink); --b-line: rgba(244, 244, 248, .35); }
.on-band .btn-ghost:hover { --b-line: rgba(244, 244, 248, .7); }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--line); }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  view-transition-name: site-header;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand-link { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; padding: 8px 0; }
.brand-link .wordmark { width: 118px; height: auto; }
.motion .is-home .site-header .brand-link { opacity: var(--dock, 0); visibility: var(--dock-vis, hidden); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; display: inline-block; padding: 8px 14px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); font-weight: 450;
  transition: color .2s, background-color .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-sunk); }
.nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 2px; background: currentColor;
}
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .js .nav-links { display: none; }
  .js .menu-toggle { display: inline-grid; }
  html:not(.js) .nav-links a { padding-inline: 8px; }
}
html:not(.js) .theme-toggle { display: none; }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  background: var(--bg); padding: 0 var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility 0s linear .25s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transition: opacity .25s var(--ease); }
.mobile-menu .header-inner { flex: none; }
.mobile-menu ul { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 4px; }
.mobile-menu li a {
  display: block; padding: 10px 0; font-size: clamp(2rem, 9vw, 2.75rem); letter-spacing: -.035em; font-weight: 500;
  text-decoration: none; color: var(--ink);
  transform: translateY(12px); opacity: 0; transition: transform .45s var(--ease), opacity .45s var(--ease);
}
.mobile-menu.is-open li a { transform: none; opacity: 1; }
.mobile-menu li:nth-child(2) a { transition-delay: .04s; }
.mobile-menu li:nth-child(3) a { transition-delay: .08s; }
.mobile-menu li:nth-child(4) a { transition-delay: .12s; }
.mobile-menu li:nth-child(5) a { transition-delay: .16s; }
.mobile-menu .menu-foot { margin-top: auto; color: var(--ink-3); font-size: var(--t-sm); display: grid; gap: 6px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-top: clamp(56px, 8vw, 96px); overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
.footer-grid h2 { font-size: var(--t-sm); font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); transition: color .2s; }
.footer-grid a:hover { color: var(--ink); }
.footer-about p { color: var(--ink-2); font-size: var(--t-sm); max-width: 30ch; margin-top: 16px; }
.footer-about .wordmark { width: 128px; color: var(--ink); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 64px; padding-block: 22px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--t-xs); }
.footer-giant { margin-top: clamp(40px, 6vw, 72px); color: var(--line); line-height: 0; }
.footer-giant svg { width: 100%; height: auto; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-about { grid-column: 1 / -1; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(40px, 6vw, 72px); }
.page-hero .h1 { max-width: 16ch; }
.page-hero .lede { margin-top: 22px; max-width: 40ch; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 26px; font-size: var(--t-sm); color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { color: var(--line-strong); }

/* ---------- Home hero: the logo collapse ---------- */
/* Without JS or with reduced motion the hero is a static block; html.motion (set before paint) turns on the pinned scroll scene */
.hero-track { position: relative; }
.hero-pin { position: relative; display: grid; align-items: center; overflow: hidden; padding-block: clamp(96px, 16vw, 200px) clamp(72px, 10vw, 120px); }
.motion .hero-track { height: 290vh; margin-top: calc(var(--header-h) * -1); }
.motion .hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; padding-block: 0; }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 30%, transparent 75%);
}
.hero-stage { position: relative; width: 100%; container-type: inline-size; }
.motion .hero-stage { margin-top: calc(var(--header-h) * 0.25); }
.hero-logo-box { position: relative; width: 100%; aspect-ratio: 829 / 100; color: var(--ink); }
/* static wordmark shown before nordrift-logo.js runs (or without JS): undo the oversizing below */
.hero-logo-box .wordmark-fallback { position: absolute; left: 5.083%; width: 89.833%; top: 8.333%; height: 83.333%; }
.hero-logo-box::before, .hero-logo-box::after {
  content: ""; position: absolute; left: calc(var(--gutter) * -1 - 50vw); right: calc(var(--gutter) * -1 - 50vw); height: 1px; background: var(--line);
}
.hero-logo-box::before { top: 0; }
.hero-logo-box::after { bottom: 0; }
/* nordrift-logo fits the wordmark to 92% of its own box; oversizing it this much makes the
   wordmark land exactly on the cap-height and baseline guides */
.hero-logo-box nordrift-logo { position: absolute; left: -5.659%; width: 111.318%; top: -10%; height: 120%; }
.hero-intro { margin-top: clamp(22px, 3vw, 36px); display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; align-items: baseline; }
.hero-intro p { font-size: var(--t-lg); color: var(--ink-2); letter-spacing: -.012em; }
.hero-headline { margin-top: 40px; }
.hero-headline h1 { font-size: clamp(1.5rem, .6rem + 2.6vw, 3.1rem); letter-spacing: -.035em; line-height: 1.08; max-width: 19ch; }
.hero-headline .btn-row { margin-top: clamp(16px, 2vw, 28px); }
.scroll-cue { display: none; }
/* Animated scene: the intro fades as ORDRIFT slides, the headline arrives in the space RDRIFT leaves behind */
.motion .hero-intro { opacity: var(--intro, 1); transform: translateY(calc((1 - var(--intro, 1)) * -10px)); }
.motion .hero-headline {
  position: absolute; margin: 0; left: 17.4%; right: 0; top: calc(100cqw * 50 / 829);
  transform: translate(calc((1 - var(--head, 0)) * 48px), -50%);
  opacity: var(--head, 0); visibility: var(--head-vis, hidden);
}
.motion .scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; color: var(--ink-3); font-size: var(--t-xs); opacity: var(--intro, 1); }
.scroll-cue span { display: block; width: 1px; height: 44px; background: linear-gradient(var(--ink-3), transparent); transform-origin: top; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 800px) {
  .motion .hero-stage { margin-top: 0; }
  .motion .hero-headline { left: 0; top: calc(100cqw * 100 / 829 + 28px); transform: translateY(calc((1 - var(--head, 0)) * 24px)); }
  .hero-headline h1 { max-width: 22ch; }
}

/* ---------- Statement (words fill in as you scroll) ---------- */
.statement { font-size: var(--t-3xl); letter-spacing: -.035em; line-height: 1.12; font-weight: 500; max-width: 24ch; }
.statement .w { color: var(--ink); transition: color .3s; }
.js .statement .w { color: color-mix(in srgb, var(--ink) 18%, var(--bg)); }
.js .statement .w.on { color: var(--ink); }

/* ---------- Domains ---------- */
.domains { border-top: 1px solid var(--line); }
.domain {
  display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.3fr); gap: 20px 40px; align-items: start;
  padding-block: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--line);
}
.domain svg { width: 96px; height: 72px; color: var(--ink); }
.domain svg .acc { color: var(--accent); }
.domain h3 { font-size: var(--t-xl); }
.domain p { color: var(--ink-2); max-width: 48ch; }
.domain .tag { display: inline-block; margin-top: 14px; font-size: var(--t-xs); color: var(--ink-3); }
.domain .tag a { color: var(--ink-2); }
.draw path, .draw line, .draw rect, .draw circle, .draw polyline { stroke-dasharray: var(--len, 400); stroke-dashoffset: 0; }
.js .draw:not(.is-in) path, .js .draw:not(.is-in) line, .js .draw:not(.is-in) rect, .js .draw:not(.is-in) circle, .js .draw:not(.is-in) polyline { stroke-dashoffset: var(--len, 400); }
.draw path, .draw line, .draw rect, .draw circle, .draw polyline { transition: stroke-dashoffset 1.4s var(--ease); }
@media (max-width: 760px) { .domain { grid-template-columns: minmax(0, 1fr); } .domain svg { width: 80px; height: 60px; } }

/* ---------- Band (featured product) ---------- */
.band { background: var(--band); color: var(--band-ink); position: relative; overflow: hidden; }
.band .muted { color: var(--band-ink-2); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.band-grid > * { min-width: 0; }
.band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9;
  background-image:
    linear-gradient(to right, var(--band-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--band-line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
  mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
}
.band .wrap { position: relative; }
.band-copy .lockup { width: 168px; }
.band-copy .h2 { margin-top: 30px; max-width: 18ch; }
.band-copy .body-lg { color: var(--band-ink-2); margin-top: 18px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 34px; padding: 0; list-style: none; }
.facts li { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--band-line); font-size: var(--t-sm); color: var(--band-ink); }
.phones { position: relative; height: clamp(440px, 52vw, 640px); }
.phones .phone { position: absolute; width: clamp(180px, 21vw, 280px); filter: drop-shadow(0 40px 50px rgba(8, 8, 20, .45)); will-change: transform; }
.phones .phone img { width: 100%; }
.phones .p1 { left: 8%; top: 4%; z-index: 2; }
.phones .p2 { left: 46%; top: 14%; z-index: 1; }
@media (max-width: 900px) {
  .band-grid { grid-template-columns: minmax(0, 1fr); }
  .phones { height: clamp(380px, 110vw, 560px); }
  .phones .phone { width: clamp(160px, 44vw, 250px); }
  .phones .p1 { left: 2%; } .phones .p2 { left: 44%; }
}

/* ---------- Structure diagram ---------- */
.structure { display: grid; justify-items: center; gap: 0; padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-raised); }
.structure .parent { display: grid; justify-items: center; gap: 10px; padding: 20px 28px; border-radius: var(--r-md); background: var(--bg-sunk); }
.structure .parent .wordmark { width: 150px; color: var(--ink); }
.structure .parent small { color: var(--ink-3); font-size: var(--t-xs); }
.structure .wires { width: 100%; max-width: 640px; height: 72px; color: var(--line-strong); }
.structure .children { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 20px); width: 100%; max-width: 760px; }
.child { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); min-height: 120px; color: var(--ink-3); font-size: var(--t-sm); }
.child.is-live { border-style: solid; border-color: var(--line); background: var(--bg); color: var(--ink-2); text-decoration: none; transition: border-color .2s, transform .3s var(--ease); }
.child.is-live:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.child .child-top { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 500; font-size: var(--t-base); }
.child .child-top img { width: 30px; height: 30px; border-radius: 8px; }
.child .status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); color: var(--ink-3); margin-top: auto; }
.child .status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3FA36B; }
.child:not(.is-live) .status::before { background: var(--line-strong); }
@media (max-width: 640px) { .structure .children { grid-template-columns: minmax(0, 1fr); } .structure .wires { height: 40px; } }

/* ---------- Principles ---------- */
.principles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 64px); }
.principle { padding-block: 28px 32px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.principle h3 { font-size: var(--t-lg); letter-spacing: -.015em; }
.principle p { color: var(--ink-2); max-width: 46ch; }
@media (max-width: 760px) { .principles { grid-template-columns: minmax(0, 1fr); } }

/* ---------- CTA ---------- */
.cta { display: grid; gap: 22px; }
.cta .h1 { max-width: 18ch; }
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.email-big { font-size: var(--t-2xl); letter-spacing: -.03em; color: var(--ink); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .4s var(--ease); }
.email-big:hover { background-size: 100% 1px; }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); font-size: var(--t-xs); cursor: pointer; transition: color .2s, border-color .2s; }
.copy-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.copy-btn svg { width: 15px; height: 15px; }
.copy-btn.is-done { color: var(--ink); }

/* ---------- Products page ---------- */
.showcase { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--band); color: var(--band-ink); }
.showcase::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(to right, var(--band-line) 1px, transparent 1px), linear-gradient(to bottom, var(--band-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 80% 50%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 80% at 80% 50%, #000 20%, transparent 70%);
}
.showcase-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.showcase-copy { padding: clamp(28px, 5vw, 64px); display: grid; gap: 18px; align-content: start; }
.showcase-copy .app-id { display: flex; align-items: center; gap: 14px; }
.showcase-copy .app-id img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.showcase-copy .app-id strong { display: block; font-size: var(--t-xl); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.showcase-copy .app-id span { font-size: var(--t-sm); color: var(--band-ink-2); }
.showcase-copy .body-lg { color: var(--band-ink-2); }
.showcase .facts { margin: 4px 0 10px; }
.tool-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; font-size: var(--t-sm); color: var(--band-ink-2); }
.tool-list li { display: flex; gap: 10px; align-items: baseline; }
.tool-list li::before { content: ""; width: 5px; height: 5px; border-radius: 1px; background: var(--frost); transform: translateY(-2px); flex: none; }
.showcase-phones { position: relative; height: clamp(420px, 46vw, 600px); }
.showcase-phones .phone { position: absolute; width: clamp(150px, 15vw, 210px); filter: drop-shadow(0 30px 40px rgba(8, 8, 20, .5)); transition: transform .6s var(--ease); }
.showcase-phones .s1 { left: 6%; top: 16%; transform: rotate(-6deg); }
.showcase-phones .s2 { left: 34%; top: 8%; z-index: 2; }
.showcase-phones .s3 { left: 62%; top: 16%; transform: rotate(6deg); }
.showcase:hover .s1 { transform: rotate(-8deg) translateX(-8px); }
.showcase:hover .s3 { transform: rotate(8deg) translateX(8px); }
@media (max-width: 900px) {
  .showcase-grid { grid-template-columns: minmax(0, 1fr); }
  .showcase-phones { height: clamp(320px, 90vw, 460px); }
  .showcase-phones .phone { width: clamp(120px, 30vw, 180px); }
  .tool-list { grid-template-columns: minmax(0, 1fr); }
}
.next-up { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.next-up > div { padding: 22px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); display: grid; gap: 8px; align-content: start; min-height: 150px; }
.next-up h3 { font-size: var(--t-lg); }
.next-up p { color: var(--ink-2); font-size: var(--t-sm); }
@media (max-width: 760px) { .next-up { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Volt page ---------- */
.volt-hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(48px, 7vw, 96px); }
.volt-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.volt-hero-grid > * { min-width: 0; }
.app-head { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.app-head img { width: 72px; height: 72px; border-radius: 18px; }
.app-head .meta { display: grid; gap: 2px; font-size: var(--t-sm); color: var(--ink-3); }
.app-head .meta strong { color: var(--ink); font-weight: 500; font-size: var(--t-base); }
.volt-hero .lede { color: var(--ink); max-width: 20ch; font-size: var(--t-2xl); line-height: 1.15; letter-spacing: -.03em; }
.volt-hero .body-lg { margin-top: 18px; }
.volt-hero .btn-row { margin-top: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 999px; background: var(--bg-sunk); color: var(--ink-2); font-size: var(--t-xs); }
.hero-device { position: relative; aspect-ratio: 1 / 1.08; border-radius: var(--r-lg); background: var(--band); overflow: hidden; }
.hero-device::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--band-line) 1px, transparent 1px), linear-gradient(to bottom, var(--band-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 70%);
}
.hero-device .phone { position: absolute; width: 37%; filter: drop-shadow(0 34px 44px rgba(8, 8, 20, .5)); }
.hero-device .front { left: 15%; top: 13%; z-index: 2; }
.hero-device .back { left: 49%; top: 21%; z-index: 1; }
@media (max-width: 900px) { .volt-hero-grid { grid-template-columns: minmax(0, 1fr); } .hero-device { aspect-ratio: 1 / 1; } }

.explorer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: clamp(28px, 5vw, 80px); align-items: center; }
.explorer > * { min-width: 0; }
.tabs { display: grid; gap: 0; border-top: 1px solid var(--line); }
.tab {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 16px; align-items: start; text-align: left;
  width: 100%; padding: 20px 4px; background: none; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; color: var(--ink-3);
  transition: color .25s;
}
.tab .chip { grid-row: span 2; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--bg-sunk); color: var(--ink-3); transition: background-color .25s, color .25s; }
.tab .chip svg { width: 22px; height: 22px; }
.tab strong { font-weight: 500; font-size: var(--t-lg); letter-spacing: -.015em; line-height: 1.3; }
.tab .desc { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease), opacity .3s; opacity: 0; font-size: var(--t-sm); color: var(--ink-2); line-height: 1.55; }
.tab .desc > span { overflow: hidden; }
.tab:hover { color: var(--ink-2); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"] .desc { grid-template-rows: 1fr; opacity: 1; padding-top: 6px; }
.tab[aria-selected="true"] .chip { background: var(--chip-bg); color: var(--chip-fg); }
.tab[data-hue="rcc"] { --chip-bg: #F4E7D0; --chip-fg: #8A6534; }
.tab[data-hue="ohm"] { --chip-bg: #E4E3ED; --chip-fg: #3C3A63; }
.tab[data-hue="vd"] { --chip-bg: #E1E6F2; --chip-fg: #47598A; }
.tab[data-hue="led"] { --chip-bg: #EFE0EA; --chip-fg: #854C70; }
.tab[data-hue="es"] { --chip-bg: #DFE9E3; --chip-fg: #3F6450; }
:root[data-theme="dark"] .tab[data-hue="rcc"] { --chip-bg: #2A2116; --chip-fg: #D4A27F; }
:root[data-theme="dark"] .tab[data-hue="ohm"] { --chip-bg: #21203A; --chip-fg: #CBCADB; }
:root[data-theme="dark"] .tab[data-hue="vd"] { --chip-bg: #182034; --chip-fg: #8FA3D4; }
:root[data-theme="dark"] .tab[data-hue="led"] { --chip-bg: #2B1D27; --chip-fg: #C98FB2; }
:root[data-theme="dark"] .tab[data-hue="es"] { --chip-bg: #16241C; --chip-fg: #8AB29C; }
.explorer-device { position: relative; aspect-ratio: 560 / 1209; max-width: 340px; width: 100%; margin-inline: auto; filter: drop-shadow(0 40px 50px rgba(22, 21, 42, .28)); }
.explorer-device img { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: scale(.985); transition: opacity .45s var(--ease), transform .6s var(--ease); }
.explorer-device img.is-active { opacity: 1; transform: none; }
.explorer-device img:first-child { opacity: 1; }
.js .explorer-device img:first-child:not(.is-active) { opacity: 0; }
@media (max-width: 860px) { .explorer { grid-template-columns: minmax(0, 1fr); } .explorer-device { max-width: 260px; order: -1; } }

/* LED demo — laid out like Volt's own four zones */
.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-raised); }
.demo > * { min-width: 0; }
.demo-copy { padding: clamp(24px, 4vw, 48px); display: grid; gap: 16px; align-content: start; border-right: 1px solid var(--line); }
.demo-copy p { color: var(--ink-2); }
.formula { font-family: var(--f-mono); font-size: var(--t-sm); color: var(--ink-2); padding: 14px 16px; border-radius: var(--r-sm); background: var(--bg-sunk); line-height: 1.7; overflow-x: auto; }
.demo-panel { display: grid; grid-template-rows: auto auto; }
.zone { padding: clamp(20px, 3vw, 32px); }
.zone + .zone { border-top: 1px solid var(--line); }
.zone-label { font-size: var(--t-xs); color: var(--ink-3); margin-bottom: 14px; }
.readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.readout dt { font-size: var(--t-xs); color: var(--ink-3); }
.readout dd { margin: 4px 0 0; font-family: var(--f-mono); font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem); letter-spacing: -.02em; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.readout dd small { font-size: .5em; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.readout.secondary dd { font-size: var(--t-xl); color: var(--ink); }
.warn-line { margin-top: 16px; font-size: var(--t-sm); color: var(--warn); min-height: 1.6em; }
.wells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.well { display: grid; gap: 6px; }
.well label { font-size: var(--t-xs); color: var(--ink-3); }
.well .field { display: flex; align-items: center; border-radius: 10px; background: var(--bg-sunk); border: 1px solid transparent; transition: border-color .2s; }
.well .field:focus-within { border-color: var(--focus); }
.well input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 12px 0 12px 12px; font-family: var(--f-mono); font-size: var(--t-lg); font-variant-numeric: tabular-nums; outline: none; }
.well .unit { padding-right: 12px; color: var(--ink-3); font-family: var(--f-mono); font-size: var(--t-sm); }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg-sunk); margin-top: 16px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-size: var(--t-xs); color: var(--ink-2); cursor: pointer; font-family: var(--f-mono); }
.seg button[aria-pressed="true"] { background: var(--bg-raised); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.demo-error { margin-top: 12px; font-size: var(--t-sm); color: var(--warn); min-height: 1.6em; }
@media (max-width: 900px) { .demo { grid-template-columns: minmax(0, 1fr); } .demo-copy { border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 480px) { .wells { grid-template-columns: minmax(0, 1fr); } }

/* Gallery */
.gallery-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 32px; }
.gallery-controls { display: flex; gap: 8px; }
.gallery-controls button { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink); transition: border-color .2s, opacity .2s; }
.gallery-controls button:hover { border-color: var(--ink-3); }
.gallery-controls button:disabled { opacity: .35; cursor: default; }
.gallery-controls svg { width: 18px; height: 18px; }
.gallery {
  display: flex; gap: clamp(12px, 1.6vw, 20px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); padding-bottom: 12px;
  scrollbar-width: none; cursor: grab; overscroll-behavior-x: contain;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery.is-dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.gallery figure { flex: none; width: clamp(220px, 24vw, 300px); margin: 0; scroll-snap-align: start; scroll-margin-inline: max(var(--gutter), calc((100vw - var(--max)) / 2)); }
.gallery img { width: 100%; border-radius: 18px; user-select: none; -webkit-user-drag: none; }
.gallery figcaption { margin-top: 12px; font-size: var(--t-sm); color: var(--ink-3); }
.gallery-progress { height: 2px; background: var(--line); border-radius: 2px; margin-top: 24px; overflow: hidden; }
.gallery-progress span { display: block; height: 100%; width: 100%; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, .2)); transition: transform .15s linear; }

/* Decisions, datasheet, roadmap */
.decisions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); }
.decision { border-top: 1px solid var(--line); padding-block: 24px 30px; display: grid; gap: 10px; align-content: start; }
.decision h3 { font-size: var(--t-lg); letter-spacing: -.015em; }
.decision p { color: var(--ink-2); font-size: var(--t-sm); line-height: 1.6; }
@media (max-width: 900px) { .decisions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .decisions { grid-template-columns: minmax(0, 1fr); } }
.datasheet { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.datasheet th, .datasheet td { text-align: left; padding: 15px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.datasheet th { font-weight: 400; color: var(--ink-3); width: 38%; padding-right: 20px; }
.datasheet td { color: var(--ink); }
.datasheet code { font-family: var(--f-mono); font-size: .95em; }
.roadmap { list-style: none; counter-reset: rm; margin: 0; padding: 0; display: grid; gap: 0; }
.roadmap li { counter-increment: rm; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding-block: 15px; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.roadmap li::before { content: counter(rm, decimal-leading-zero); font-family: var(--f-mono); color: var(--ink-3); font-size: var(--t-xs); padding-top: 3px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px); }
.two-col > * { min-width: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

.link-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.link-card { display: grid; gap: 6px; padding: 22px; border-radius: var(--r-md); border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: var(--bg-raised); transition: border-color .2s, transform .3s var(--ease); }
.link-card:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.link-card span { color: var(--ink-2); font-size: var(--t-sm); }
.link-card strong { font-weight: 500; }
@media (max-width: 760px) { .link-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- About ---------- */
.fold-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.fold-demo > * { min-width: 0; }
.fold-stage { padding: clamp(28px, 5vw, 56px); border-radius: var(--r-lg); background: var(--bg-raised); border: 1px solid var(--line); display: grid; gap: 28px; }
.fold-stage nordrift-logo { display: block; width: 100%; aspect-ratio: 829 / 140; color: var(--ink); }
.fold-stage .wordmark-fallback { width: 92%; margin: 4% auto 0; }
.fold-stage label { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--ink-3); }
.fold-stage input[type="range"] { width: 100%; accent-color: var(--accent); }
@media (max-width: 860px) { .fold-demo { grid-template-columns: minmax(0, 1fr); } }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px; background: var(--line-strong); }
.timeline li { position: relative; padding: 0 0 32px 40px; display: grid; gap: 4px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.timeline li.is-next::before { border-style: dashed; border-color: var(--ink-3); }
.timeline time, .timeline .when { font-size: var(--t-xs); color: var(--ink-3); }
.timeline strong { font-weight: 500; font-size: var(--t-lg); letter-spacing: -.015em; }
.timeline p { color: var(--ink-2); font-size: var(--t-sm); max-width: 52ch; }

/* ---------- Contact ---------- */
.routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.route { padding: clamp(22px, 3vw, 30px); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--bg-raised); display: grid; gap: 10px; align-content: start; }
.route h2 { font-size: var(--t-lg); letter-spacing: -.015em; }
.route p { color: var(--ink-2); font-size: var(--t-sm); }
.route .email-line { margin-top: 8px; gap: 10px 14px; }
.route .email-line a { font-family: var(--f-mono); font-size: var(--t-sm); color: var(--ink); text-underline-offset: 4px; text-decoration-color: var(--line-strong); }
@media (max-width: 760px) { .routes { grid-template-columns: minmax(0, 1fr); } }
.composer { display: grid; gap: 16px; padding: clamp(22px, 4vw, 40px); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg-raised); }
.composer .row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 600px) { .composer .row2 { grid-template-columns: minmax(0, 1fr); } }
.fieldset { display: grid; gap: 8px; }
.fieldset label { font-size: var(--t-sm); color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink);
  padding: 12px 14px; font-size: var(--t-base); transition: border-color .2s; min-width: 0;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.form-note { font-size: var(--t-xs); color: var(--ink-3); }
.form-error { font-size: var(--t-sm); color: var(--warn); min-height: 1.4em; }
.socials { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.socials a { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: padding .3s var(--ease); }
.socials a:hover { padding-inline: 6px; }
.socials span { color: var(--ink-3); font-size: var(--t-sm); }

/* ---------- Legal / docs ---------- */
.doc-layout { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0, 720px); gap: clamp(32px, 6vw, 96px); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 32px); font-size: var(--t-sm); }
.toc p { color: var(--ink-3); margin-bottom: 12px; font-size: var(--t-xs); }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--ink-3); text-decoration: none; transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--ink); border-left-color: var(--ink); }
@media (max-width: 900px) { .doc-layout { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } }
.doc { min-width: 0; font-size: var(--t-base); line-height: 1.7; color: var(--ink-2); }
.doc h2 { color: var(--ink); font-size: var(--t-xl); margin: 56px 0 14px; scroll-margin-top: calc(var(--header-h) + 24px); }
.doc h2:first-child { margin-top: 0; }
.doc h3 { color: var(--ink); font-size: var(--t-lg); letter-spacing: -.015em; margin: 32px 0 8px; }
.doc p { margin: 0 0 16px; }
.doc ul { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--ink-3); }
.doc strong { color: var(--ink); font-weight: 500; }
.doc a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; }
.doc a:hover { text-decoration-color: currentColor; }
.callout, .doc .contact { margin: 0 0 24px; padding: 20px 22px; border-radius: var(--r-md); background: var(--bg-sunk); border: 1px solid var(--line); color: var(--ink); }
.callout p, .doc .contact p { margin: 0; }
.updated { margin-top: 18px; color: var(--ink-3); font-size: var(--t-sm); }
.doc-aside { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: var(--t-sm); }
.doc-aside a { color: var(--ink-2); }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: grid; align-content: center; gap: 24px; padding-block: 80px; }
.notfound .mark { width: 88px; color: var(--ink); }

/* ---------- Motion ---------- */
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal:not(.is-in) { opacity: 0; transform: translateY(24px); }
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .22s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease) both; }
::view-transition-group(site-header) { animation-duration: 0s; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
html.theme-vt::view-transition-old(root), html.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-vt .site-header { view-transition-name: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
  .js .draw:not(.is-in) path, .js .draw:not(.is-in) line, .js .draw:not(.is-in) rect, .js .draw:not(.is-in) circle, .js .draw:not(.is-in) polyline { stroke-dashoffset: 0; }
  .js .statement .w { color: var(--ink); }
  @view-transition { navigation: none; }
}
