/* ---------- Tokens ---------- */
:root {
  --bg: #f1f1ec;
  --bg-alt: #e9eae4;
  --surface: #f8f8f3;
  --text: #171c1b;
  --text-2: #424c47;
  --text-3: #646e69;
  --line: rgba(23, 28, 27, .12);
  --line-strong: rgba(23, 28, 27, .23);
  --accent: #517c37;
  --accent-ink: #f7f9f2;
  --accent-soft: rgba(81, 124, 55, .11);
  --violet: #7a74cb;
  --shard-1: #3a4044;
  --shard-2: #23282b;
  --shard-3: #575f63;
  --shard-edge: rgba(255, 255, 255, .2);
  --mark-hi: #3a3d42;
  --mark-md: #26292d;
  --mark-lo: #141619;
  --mark-edge: #4a4e54;
  --shadow: rgba(50, 58, 47, .12);
  --header-bg: rgba(241, 241, 236, .84);

  --sans: 'DM Sans', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --mono: 'DM Mono', ui-monospace, Consolas, monospace;
  --wrap: 1280px;
  --gutter: clamp(16px, 5vw, 64px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090b0d;
    --bg-alt: #0d1012;
    --surface: #101416;
    --text: #edf0e9;
    --text-2: #bec5bc;
    --text-3: #929a94;
    --line: rgba(226, 235, 223, .13);
    --line-strong: rgba(226, 235, 223, .23);
    --accent: #c5f276;
    --accent-ink: #10150b;
    --accent-soft: rgba(197, 242, 118, .12);
    --violet: #9495f5;
    --shard-1: #f1f2ec;
    --shard-2: #adb5b2;
    --shard-3: #7d8789;
    --shard-edge: rgba(9, 11, 13, .3);
  --mark-hi: #ffffff;
  --mark-md: #dcdde0;
  --mark-lo: #b4b6bb;
  --mark-edge: #ffffff;
    --mark-hi: #ffffff;
    --mark-md: #dcdde0;
    --mark-lo: #b4b6bb;
    --mark-edge: #ffffff;
    --shadow: rgba(0, 0, 0, .32);
    --header-bg: rgba(9, 11, 13, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #090b0d;
  --bg-alt: #0d1012;
  --surface: #101416;
  --text: #edf0e9;
  --text-2: #bec5bc;
  --text-3: #929a94;
  --line: rgba(226, 235, 223, .13);
  --line-strong: rgba(226, 235, 223, .23);
  --accent: #c5f276;
  --accent-ink: #10150b;
  --accent-soft: rgba(197, 242, 118, .12);
  --violet: #9495f5;
  --shard-1: #f1f2ec;
  --shard-2: #adb5b2;
  --shard-3: #7d8789;
  --shard-edge: rgba(9, 11, 13, .3);
  --shadow: rgba(0, 0, 0, .32);
  --header-bg: rgba(9, 11, 13, .8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s ease, color .35s ease;
}
/* Starfield (drawn by script.js, drifts with scroll) */
.starfield { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
/* Film grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
h1 em, h2 em { color: var(--accent); font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.02em; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Theme-aware logo swap */
.logo-for-dark { display: flex; }
.logo-for-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-for-dark { display: none; }
  :root:not([data-theme="dark"]) .logo-for-light { display: flex; }
}
:root[data-theme="light"] .logo-for-dark { display: none; }
:root[data-theme="light"] .logo-for-light { display: flex; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 88px; display: flex; align-items: center; gap: 24px; }
.lockup { align-items: center; gap: 12px; }
.lockup svg, .lockup img { display: block; flex: none; width: auto; overflow: hidden; }
.brand .mark { height: 54px; }
.brand .wordmark { height: 34px; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 36px); margin-left: auto; font-size: 15px; color: var(--text-2); }
.nav a { transition: color .2s; }
.nav a:hover { color: var(--text); }
.nav .nav-cta { color: var(--text); }
.nav .nav-cta::after { content: "↗"; margin-left: 6px; color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s; }
.icon-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.theme-toggle:hover { transform: rotate(-10deg); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .i-sun { display: none; }
  :root:not([data-theme="dark"]) .i-moon { display: block; }
}
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }
.menu-toggle { display: none; gap: 5px; align-content: center; }
.menu-toggle span { display: block; width: 15px; height: 1px; background: currentColor; transition: transform .2s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 52px; padding: 0 22px; border: 1px solid transparent; font-size: 15px; font-weight: 600; letter-spacing: .01em; cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn span { font-size: 18px; line-height: 1; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 34px color-mix(in srgb, var(--accent) 14%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 42px color-mix(in srgb, var(--accent) 26%, transparent); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { min-height: 58px; padding: 0 28px; font-size: 16px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; min-height: calc(100svh - 88px); max-height: 920px; padding-block: 40px 56px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; color: var(--text-3); font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent); }
.dot::after { content: ""; position: absolute; inset: -4px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 50%; animation: pulse 2.4s ease-out infinite; }
.hero h1 { font-size: clamp(52px, 7.6vw, 112px); font-weight: 500; line-height: .93; letter-spacing: -.055em; margin-bottom: 28px; }
.hero h1 em { letter-spacing: -.03em; }
.lede { max-width: 36ch; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; color: var(--text-2); margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { position: relative; isolation: isolate; display: grid; place-items: center; width: 100%; min-height: 600px; overflow: hidden; }
.visual-halo { position: absolute; z-index: -1; width: min(82%, 480px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--violet) 18%, transparent) 0, color-mix(in srgb, var(--accent) 9%, transparent) 30%, transparent 68%); filter: blur(16px); }
/* Hero: the mark is drawn as a green blueprint, then its faces fill in */
.bp-grid { position: absolute; z-index: -1; inset: 4% 0; background-image: linear-gradient(color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 9%, transparent) 1px, transparent 1px); background-size: 32px 32px; background-position: center; -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent); mask-image: radial-gradient(closest-side, #000 30%, transparent); pointer-events: none; }
.shard { position: relative; z-index: 2; width: min(60%, 330px); overflow: visible; animation: float 7s ease-in-out infinite; }
.shard .piece { transition: transform .5s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.blueprint polygon { stroke-linejoin: miter; stroke-miterlimit: 20; }
.blueprint .hi, .head-art .hi, .contact-art .hi { fill: var(--mark-hi); stroke: var(--mark-hi); stroke-width: 1; }
.blueprint .md, .head-art .md, .contact-art .md { fill: var(--mark-md); stroke: var(--mark-md); stroke-width: 1; }
.blueprint .lo, .head-art .lo, .contact-art .lo { fill: var(--mark-lo); stroke: var(--mark-lo); stroke-width: 1; }
.bp-edge, .mk-edge { fill: none; stroke: var(--mark-edge); stroke-width: 6; }
.bp-face, .bp-edge { animation: bp-fill 11s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 60ms); }
.bp-lines polygon { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: .32; animation: bp-draw 11s ease-in-out infinite; }
.bp-crack-glow { fill: none; stroke: var(--accent); stroke-width: 60; opacity: .5; animation: bp-glow 11s ease-in-out infinite; }
.bp-marks circle { fill: none; stroke: var(--accent); stroke-width: 3; }
.bp-marks text { fill: var(--accent); font-family: var(--mono); font-size: 30px; }
.bp-marks { opacity: .35; animation: bp-marks 11s ease-in-out infinite; }
@keyframes bp-draw { 0% { stroke-dashoffset: 1; opacity: 1; } 30%, 38% { stroke-dashoffset: 0; opacity: 1; } 48%, 82% { stroke-dashoffset: 0; opacity: .32; } 90% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: -1; opacity: 1; } }
@keyframes bp-fill { 0%, 30% { opacity: 0; } 44%, 82% { opacity: 1; } 90%, 100% { opacity: 0; } }
@keyframes bp-glow { 0%, 40% { opacity: 0; } 52% { opacity: .65; } 66% { opacity: .35; } 78% { opacity: .6; } 88%, 100% { opacity: 0; } }
@keyframes bp-marks { 0%, 34% { opacity: .9; } 48%, 82% { opacity: .3; } 92%, 100% { opacity: .9; } }

.visual-card { position: absolute; z-index: 4; display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 86%, transparent); box-shadow: 0 12px 40px var(--shadow); backdrop-filter: blur(12px); color: var(--text-2); font-size: 13px; line-height: 1.45; }
.visual-card-top { top: 22%; left: 0; }
.visual-card-bottom { bottom: 16%; right: 0; }
.card-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); border-radius: 50%; color: var(--accent); font-size: 14px; }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg-alt) 72%, transparent); }
.ticker-track { display: flex; align-items: center; gap: clamp(28px, 5vw, 64px); width: max-content; min-height: 68px; animation: marquee 40s linear infinite; }
.ticker span { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--text-2); white-space: nowrap; }
.ticker b { font-size: 13px; font-weight: 400; color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(88px, 12vw, 160px); }
.section-alt { background: color-mix(in srgb, var(--bg-alt) 62%, transparent); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: var(--text-3); font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.kicker span { color: var(--accent); }
.kicker span::after { content: ""; display: inline-block; width: 34px; height: 1px; margin-left: 12px; vertical-align: middle; background: var(--line-strong); }
h2 { font-size: clamp(42px, 5.8vw, 76px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.section-intro { max-width: 52ch; margin-top: 22px; color: var(--text-2); font-size: 18px; line-height: 1.7; }

/* Services: ruled columns, as in the original */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line-strong); }
.card { display: flex; flex-direction: column; padding: 36px 32px 36px 0; }
.card + .card { padding-left: 32px; border-left: 1px solid var(--line-strong); }
.card-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 32px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); transition: background-color .25s, border-color .25s; }
.card:hover .card-icon { background: var(--accent-soft); border-color: var(--accent); }
.card-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-bottom: 12px; font-size: 24px; font-weight: 500; letter-spacing: -.04em; }
.card p { color: var(--text-2); font-size: 16px; line-height: 1.7; margin-bottom: 28px; }
.card-list { list-style: none; padding: 0; margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.card-list li { padding: 6px 10px; border: 1px solid var(--line); color: var(--text-2); font-family: var(--mono); font-size: 12px; }

/* Process */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-strong); }
.step { padding: 32px 28px 8px 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step-num { display: block; margin-bottom: 44px; color: var(--accent); font-family: var(--mono); font-size: 14px; }
.step h3 { margin-bottom: 10px; font-size: 22px; font-weight: 500; letter-spacing: -.035em; }
.step p { color: var(--text-2); font-size: 16px; line-height: 1.7; }

/* Principles */
.principles { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.principles .section-head { position: sticky; top: 120px; margin-bottom: 0; }
.principle-list { border-top: 1px solid var(--line-strong); }
.principle { display: grid; grid-template-columns: 1fr 1.3fr; gap: 24px; padding-block: 30px; border-bottom: 1px solid var(--line); transition: padding-left .3s; }
.principle:hover { padding-left: 10px; }
.principle dt { font-size: 20px; font-weight: 500; letter-spacing: -.03em; }
.principle dd { color: var(--text-2); font-size: 16px; line-height: 1.7; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.faq-grid .section-head { margin-bottom: 0; }
.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; font-size: 19px; font-weight: 500; letter-spacing: -.02em; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); font-family: var(--mono); font-size: 17px; font-weight: 400; transition: transform .25s, background-color .25s; }
.faq summary:hover::after { background: var(--accent-soft); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { max-width: 58ch; padding-bottom: 26px; color: var(--text-2); font-size: 16px; line-height: 1.7; }

/* Contact */
.contact { padding-block: clamp(88px, 12vw, 160px); }
.contact-panel { position: relative; isolation: isolate; overflow: hidden; padding: clamp(36px, 7vw, 96px); border: 1px solid var(--line-strong); background: var(--surface); }
.contact-panel::before { content: ""; position: absolute; z-index: -1; top: -65%; right: -5%; width: 74%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent) 0, color-mix(in srgb, var(--violet) 8%, transparent) 36%, transparent 68%); pointer-events: none; }
/* Section header graphics: line drawings beside or under each heading */
.section-top { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 56px; align-items: end; margin-bottom: 56px; }
.section-top .section-head { margin-bottom: 0; }
.head-art { justify-self: end; width: min(100%, 620px); pointer-events: none; }
.head-art-side { justify-self: start; width: min(100%, 560px); margin-top: 64px; }
.head-art svg, .contact-art svg { display: block; width: 100%; height: auto; overflow: visible; }
.js .section-top .head-art.reveal { transition-delay: .12s; }

/* Process: loose spreadsheets flow through the mark and come out as one clean tool */
.cf-sheet { transform-box: fill-box; transform-origin: 50% 100%; animation: cf-shuffle 6s ease-in-out infinite; }
.cf-sheet rect:first-child { fill: var(--bg); stroke: var(--line-strong); }
.cf-sheet path { fill: none; stroke: var(--line); }
.cf-sheet-3 { --tilt: -9deg; animation-delay: -2s; }
.cf-sheet-2 { --tilt: -3deg; animation-delay: -4s; }
.cf-sheet-1 { --tilt: 4deg; }
.cf-cell { fill: color-mix(in srgb, var(--violet) 26%, transparent); stroke: none; }
@keyframes cf-shuffle { 0%, 100% { transform: rotate(var(--tilt)); } 50% { transform: rotate(calc(var(--tilt) * 1.5)) translateY(-3px); } }
.cf-wires use { fill: none; stroke: var(--line-strong); stroke-dasharray: 2 5; }
.cf-wires .cf-wire-out { stroke: color-mix(in srgb, var(--accent) 55%, transparent); stroke-dasharray: none; }
.cf-packets rect { fill: var(--text-3); }
.cf-packets .cf-out { fill: var(--accent); }
.cf-ring { fill: var(--surface); stroke: color-mix(in srgb, var(--accent) 45%, transparent); }
.cf-ring-dash { fill: none; stroke: var(--line-strong); stroke-dasharray: 3 6; transform-box: fill-box; transform-origin: center; animation: spin 40s linear infinite; }
.cf-window { fill: var(--bg); stroke: var(--line-strong); }
.cf-rule { fill: none; stroke: var(--line); }
.cf-dot, .cf-nav { fill: var(--line-strong); }
.cf-nav-on, .cf-pill-dot { fill: var(--accent); }
.cf-text { fill: var(--text-3); opacity: .7; }
.cf-text-dim { opacity: .35; }
.cf-bars rect { fill: var(--accent); opacity: .85; transform-box: fill-box; transform-origin: 50% 100%; animation: cf-grow 3.2s cubic-bezier(.3, 0, .2, 1) infinite alternate; animation-delay: calc(var(--i) * -.45s); }
@keyframes cf-grow { from { transform: scaleY(.45); } to { transform: scaleY(1); } }
.cf-pill { fill: var(--accent-soft); stroke: color-mix(in srgb, var(--accent) 50%, transparent); }
.cf-wires-line, .sv-rule { fill: none; stroke: var(--line); }

/* Services: three modules, the spotlight moves from one to the next */
.sv-frame { fill: var(--bg); stroke: var(--line-strong); animation: sv-frame 6s ease-in-out infinite; animation-delay: calc((3 - var(--i)) * -2s); }
.sv-line { fill: var(--bg); stroke: var(--line-strong); }
.sv-tile .sv-acc { animation: sv-stroke 6s ease-in-out infinite; animation-delay: calc((3 - var(--i)) * -2s); }
.sv-acc-fill { fill: var(--line-strong); animation: sv-fill 6s ease-in-out infinite; animation-delay: calc((3 - var(--i)) * -2s); }
.sv-pip { fill: var(--line-strong); animation: sv-fill 6s ease-in-out infinite; animation-delay: calc((3 - var(--i)) * -2s); }
.sv-node { fill: var(--bg); stroke: var(--line-strong); animation: sv-node 2.4s ease-in-out infinite; animation-delay: calc(var(--n) * .18s); }
.sv-layer { fill: var(--bg); stroke: var(--line-strong); transform-box: fill-box; transform-origin: center; animation: sv-layer 4s ease-in-out infinite; animation-delay: calc(var(--k) * .2s); }
.sv-layer-top { fill: var(--accent-soft); stroke: color-mix(in srgb, var(--accent) 70%, transparent); }
@keyframes sv-frame { 0%, 30% { stroke: color-mix(in srgb, var(--accent) 70%, transparent); } 38%, 100% { stroke: var(--line-strong); } }
@keyframes sv-stroke { 0%, 30% { stroke: var(--accent); } 38%, 100% { stroke: var(--line-strong); } }
@keyframes sv-fill { 0%, 30% { fill: var(--accent); } 38%, 100% { fill: var(--line-strong); } }
@keyframes sv-node { 0%, 100% { fill: var(--bg); } 30% { fill: var(--accent); stroke: var(--accent); } }
@keyframes sv-layer { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(calc((var(--k) - 1) * -5px)); } }

/* Principles: noise goes in, a clean signal comes out */
.pr-noise { fill: none; stroke: var(--text-3); stroke-width: 1.2; stroke-linejoin: round; opacity: .7; animation: pr-scroll 6s linear infinite; }
.pr-signal { fill: none; stroke: var(--accent); stroke-width: 2; animation: pr-scroll 6s linear infinite; }
.pr-signal-glow { fill: none; stroke: var(--accent); stroke-width: 8; opacity: .14; animation: pr-scroll 6s linear infinite; }
@keyframes pr-scroll { from { transform: translateX(-400px); } to { transform: translateX(0); } }

/* FAQ: questions route to one clear answer */
.fq-bubble { fill: var(--bg); stroke: var(--line-strong); animation: sv-frame 6s ease-in-out infinite; animation-delay: calc((3 - var(--i)) * -2s); }
.fq-mark { fill: none; stroke: var(--line-strong); animation: sv-stroke 6s ease-in-out infinite; animation-delay: calc((3 - var(--i)) * -2s); }
.fq-mark-text { fill: var(--text-3); font-family: var(--mono); font-size: 12px; }
.fq-link { fill: none; stroke: var(--line-strong); stroke-dasharray: 2 5; animation: fq-link 6s ease-in-out infinite; animation-delay: calc((3 - var(--i)) * -2s); }
@keyframes fq-link { 0%, 30% { stroke: var(--accent); stroke-dasharray: none; } 38%, 100% { stroke: var(--line-strong); stroke-dasharray: 2 5; } }
.fq-answer { fill: var(--bg); stroke: color-mix(in srgb, var(--accent) 45%, transparent); }
.fq-check { fill: var(--accent-soft); stroke: var(--accent); }
.fq-tick { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fq-lines rect { fill: var(--text-3); opacity: .45; transform-box: fill-box; transform-origin: 0 50%; animation: fq-write 2s ease-out infinite; animation-delay: calc(var(--l) * .12s); }
@keyframes fq-write { 0% { transform: scaleX(0); } 45%, 100% { transform: scaleX(1); } }

/* Contact: a message comes in, a reply goes out */
.contact-art { position: absolute; z-index: -1; right: clamp(24px, 5vw, 80px); bottom: clamp(32px, 4vw, 56px); width: min(30vw, 400px); pointer-events: none; }
.cc-bubble { fill: var(--bg); stroke: var(--line-strong); }
.cc-reply { fill: color-mix(in srgb, var(--accent) 7%, var(--bg)); stroke: color-mix(in srgb, var(--accent) 55%, transparent); }
.cc-reply-text { fill: var(--text-2); opacity: .8; }
.cc-reply-text.cc-dim { opacity: .4; }
.cc-avatar { fill: var(--surface); stroke: var(--line-strong); }
.cc-avatar-head, .cc-avatar-body { fill: none; stroke: var(--text-3); }
.cc-dot { fill: var(--text-3); animation: cc-bounce 1s ease-in-out infinite; animation-delay: calc(var(--d) * .15s); }
@keyframes cc-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.cc-ticks { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cc-input { fill: var(--bg); stroke: var(--line-strong); }
.cc-caret { stroke: var(--accent); stroke-width: 1.5; animation: cc-blink 1s steps(1) infinite; }
@keyframes cc-blink { 50% { opacity: 0; } }
.cc-send { fill: var(--accent); }
.cc-send-arrow { fill: none; stroke: var(--accent-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cc-in, .cc-typing, .cc-out { animation: 9s ease-out infinite; }
.cc-in { animation-name: cc-in; }
.cc-typing { animation-name: cc-typing; }
.cc-out { animation-name: cc-out; }
@keyframes cc-in { 0% { opacity: 0; transform: translateY(8px); } 5%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes cc-typing { 0%, 16% { opacity: 0; } 20%, 40% { opacity: 1; } 43%, 100% { opacity: 0; } }
@keyframes cc-out { 0%, 42% { opacity: 0; transform: translateY(8px); } 48%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
.contact-panel h2 { font-size: clamp(46px, 7vw, 92px); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.copy-status { min-height: 1.6em; margin-top: 12px; color: var(--text-3); font-family: var(--mono); font-size: 13px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 32px; padding-block: 28px; }
.brand-sm .mark { height: 46px; }
.brand-sm .wordmark { height: 28px; }
.footer-tag { color: var(--text-2); font-family: var(--serif); font-style: italic; font-size: 19px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-left: auto; font-size: 15px; color: var(--text-2); }
.footer-nav a:hover { color: var(--accent); }
.footer-meta { color: var(--text-3); font-family: var(--mono); font-size: 13px; }

/* ---------- Motion ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .75s ease, transform .75s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.cards .card:nth-child(2), .steps .step:nth-child(2) { transition-delay: .08s; }
.cards .card:nth-child(3), .steps .step:nth-child(3) { transition-delay: .16s; }
.steps .step:nth-child(4) { transition-delay: .24s; }

@keyframes float { 0%, 100% { translate: 0 -7px; } 50% { translate: 0 7px; } }
@keyframes pulse { 0% { opacity: .8; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.75); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow { 50% { opacity: .28; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
@media (max-width: 1150px) {
  .contact-art { position: relative; right: auto; bottom: auto; z-index: auto; width: min(100%, 500px); margin-top: 48px; }
}

@media (max-width: 1000px) {
  .section-top { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .head-art { justify-self: start; }
  .head-art-side { margin-top: 40px; }
  .hero { grid-template-columns: 1fr; min-height: 0; max-height: none; padding-top: 56px; gap: 8px; }
  .hero-art { min-height: min(112vw, 560px); }
  .cards { grid-template-columns: 1fr; }
  .card, .card + .card { padding: 32px 0; border-left: 0; }
  .card + .card { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .principles, .faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .principles .section-head { position: static; }
  }

@media (max-width: 760px) {
  .header-inner { height: 72px; }
  html { scroll-padding-top: 84px; }
  .brand .mark { height: 46px; }
  .brand .wordmark { height: 29px; }
  .lockup { gap: 10px; }
  .menu-toggle { display: inline-grid; }
  .header-tools { margin-left: auto; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 22px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav .nav-cta { border-bottom: 0; }
  .hero { padding-block: 40px 40px; }
  .eyebrow { font-size: 12px; }
  .hero-art { min-height: 440px; }
  .shard { width: min(52%, 240px); }
  .visual-card { font-size: 12px; padding: 10px 12px; }
  .visual-card-top { top: 10%; }
  .visual-card-bottom { bottom: 8%; }
      .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 26px 0; border-left: 0; }
  .step + .step { border-top: 1px solid var(--line); }
  .step-num { margin-bottom: 14px; }
  .principle { grid-template-columns: 1fr; gap: 8px; }
  .principle:hover { padding-left: 0; }
  .contact-actions .btn { width: 100%; }
  .btn-lg { font-size: 15px; padding: 0 18px; }
  .footer-inner { flex-wrap: wrap; gap: 16px 24px; }
  .footer-nav { margin-left: 0; width: 100%; order: 2; }
  .footer-meta { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
