:root {
  --bg: #0b0b0f;
  --bg-alt: #101016;
  --surface: #16161d;
  --ink: #f4f3f8;
  --ink-2: #bcbbc9;
  --ink-3: #8c8b9b;
  --line: #25252f;
  --accent: #c6ff3a;
  --accent-ink: #0b0b0f;
  --accent-soft: #1b2310;
  --violet: #8d6bff;
  --ok: #4ade80;
  --warn: #ff8a4c;
  --tg: #132029;

  --radius: 16px;
  --radius-s: 10px;
  --wrap: 1200px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
img, svg { display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.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;
}

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px;
  text-decoration: none; transition: transform 160ms var(--ease-out);
}
.skip:focus { transform: translateY(64px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--bg);
  border: 1px solid var(--ink); border-radius: 999px;
  font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, color 200ms ease, border-color 200ms ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--block { width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .btn--ghost:hover { background: var(--surface); color: var(--ink); border-color: var(--ink-3); }
}

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; font-size: 17px; }
.logo__mark { width: 22px; height: 22px; border-radius: 7px; background: var(--ink); position: relative; flex: none; }
.logo__mark::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; color: var(--ink-2); font-size: 15px; padding: 8px 0; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--ink); } }
@media (max-width: 820px) { .nav { display: none; } }

/* ---------- Hero ---------- */
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 18px; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding-top: clamp(48px, 8vw, 104px); padding-bottom: clamp(48px, 6vw, 80px); }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(36px, 5vw, 72px); align-items: center; }
@media (max-width: 960px) { .hero__grid { grid-template-columns: 1fr; } }
.hero__title { font-size: clamp(40px, 6.4vw, 76px); max-width: 15ch; letter-spacing: -0.035em; line-height: 1.02; }
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.hero__title .w > span { display: inline-block; }

.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 14%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%); }
.orb { position: absolute; width: 620px; aspect-ratio: 1; border-radius: 50%; will-change: transform; }
.orb--a { top: -220px; right: -120px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 18%, transparent), transparent 62%); animation: drift-a 18s ease-in-out infinite alternate; }
.orb--b { top: 160px; right: 280px; width: 460px; background: radial-gradient(circle, color-mix(in srgb, var(--violet) 30%, transparent), transparent 62%); animation: drift-b 22s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(-140px, 120px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(160px, -80px) scale(0.9); } }

/* Live feed card */
.live { perspective: 1000px; }
.live__card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px;
  box-shadow: 0 1px 0 var(--line), 0 40px 80px -40px rgba(0, 0, 0, 0.7);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
}
.live__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); }
.live__head > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.live__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.live__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(3); opacity: 0; } }
.live__feed { position: relative; height: calc(4 * 72px - 8px); }
.live__item {
  position: absolute; inset: 0 0 auto; height: 64px;
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 0 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line);
  transform: translateY(calc(var(--y, 0) * 72px)) scale(var(--s, 1));
  opacity: var(--o, 1);
  transition: transform 700ms var(--ease-out), opacity 500ms ease;
}
.live__ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.live__ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.live__ic--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.live__ic--warn { background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.live__t { display: block; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live__m { display: block; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live__time { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.live__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.live__foot strong { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
#liveCount { display: inline-block; }
#liveCount.bump { animation: bump 500ms var(--ease-out); }
@keyframes bump { 0% { transform: translateY(-6px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 18px 0; background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee__track span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-size: clamp(18px, 2.2vw, 24px); font-weight: 500; letter-spacing: -0.01em; color: var(--ink-2); white-space: nowrap; }
.marquee__track span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .marquee:hover .marquee__track { animation-play-state: paused; } }

/* Scroll progress */
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform-origin: left; transform: scaleX(0); pointer-events: none; }

/* Arrow button */
.btn--arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .btn--arrow:hover svg { transform: translateX(3px); } }
.hero__lead { margin-top: 28px; font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__note { display: flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 15px; color: var(--ink-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: clamp(56px, 8vw, 88px); background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts li { background: var(--bg); padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.facts strong { font-weight: 600; font-size: 16px; }
.facts span { font-size: 14px; color: var(--ink-3); line-height: 1.5; }
@media (max-width: 900px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 64px); }
.section h2 { font-size: clamp(32px, 4.6vw, 52px); letter-spacing: -0.03em; }
.section__lead { margin-top: 18px; color: var(--ink-2); font-size: 18px; max-width: 62ch; }

/* ---------- Cases ---------- */
.case { border-top: 1px solid var(--line); padding: 40px 0 72px; }
.case:last-child { padding-bottom: 0; }
.case__meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.case__num { font-family: var(--mono); font-size: 14px; color: var(--ink-3); }
.tag { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-text); }
.case__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 960px) { .case__grid { grid-template-columns: 1fr; } }
.case h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.025em; }
.case__sub { margin-top: 10px; color: var(--ink-2); font-size: 18px; }
.case h4 { margin-top: 32px; margin-bottom: 10px; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.case__text > p { color: var(--ink-2); }
.list li { position: relative; padding-left: 22px; color: var(--ink-2); }
.list li + li { margin-top: 10px; }
.list li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 8px; height: 2px; border-radius: 2px; background: var(--accent); }

/* ---------- Demo frame ---------- */
.demo { position: sticky; top: 92px; }
@media (max-width: 960px) { .demo { position: static; } }
.demo__bar, .demo__body { background: var(--surface); border: 1px solid var(--line); }
.demo__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; }
.demo__bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.demo__bar em { margin-left: 10px; font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.demo__body { border-radius: 0 0 var(--radius) var(--radius); padding: 24px; box-shadow: 0 1px 0 var(--line), 0 24px 48px -32px rgba(0, 0, 0, 0.6); }
.demo__title { font-weight: 600; font-size: 18px; margin-bottom: 20px; letter-spacing: -0.01em; }
.demo__caption { margin-top: 12px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.demo__toast { margin-top: 12px; font-size: 14px; color: var(--ok); }

/* Fields */
.field { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.field__label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 0; }
.field__label output { font-family: var(--mono); color: var(--ink); }
.field__error { font-size: 13px; color: var(--warn); }
.opt { font-weight: 400; color: var(--ink-3); }
.input {
  width: 100%; min-height: 46px; padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s);
  font-size: 16px; transition: border-color 150ms ease, box-shadow 150ms ease;
}
textarea.input { resize: vertical; min-height: 110px; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input[aria-invalid="true"] { border-color: var(--warn); }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--line) var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }

/* Segmented + chips */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.seg label, .chips label { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.input::placeholder { color: var(--ink-3); opacity: 0.8; }
.seg input, .chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px; border-radius: 9px; font-size: 14px; color: var(--ink-2); text-align: center; transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease; }
.seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px var(--line); }
.seg input:focus-visible + span, .chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; background: var(--surface); transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out); }
.chips label:active span { transform: scale(0.97); }
.chips input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Calc */
.calc__result { display: flex; flex-direction: column; gap: 2px; padding: 18px; margin: 6px 0 16px; border-radius: 12px; background: var(--accent-soft); }
.calc__label { font-size: 13px; color: var(--ink-2); }
.calc__result strong { font-size: clamp(24px, 3vw, 30px); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc__hint { font-size: 13px; color: var(--ink-3); }

/* Flow demo */
.flow__form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.field--wide { grid-column: 1 / -1; }
@media (max-width: 460px) { .flow__form { grid-template-columns: 1fr; } }
.flow__out { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.flow__out > li { border-radius: 12px; padding: 14px 16px; font-size: 14px; transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out); }
.flow__out > li[hidden] { display: none; }
@starting-style { .flow__out > li { opacity: 0; transform: translateY(8px); } }
.tg, .alert { background: var(--tg); }
.alert { background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.tg__from { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin-bottom: 6px; }
.tg p, .alert p { white-space: pre-line; line-height: 1.5; }
.tg__btn { margin-top: 10px; min-height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; transition: transform 160ms var(--ease-out), background-color 180ms ease; }
.tg__btn:active { transform: scale(0.97); }
.tg__btn:disabled { cursor: default; color: var(--ok); }
.sheet { background: var(--bg); border: 1px solid var(--line); overflow-x: auto; }
.sheet__title { display: block; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); margin-bottom: 8px; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { text-align: left; padding: 7px 8px; border-top: 1px solid var(--line); white-space: nowrap; }
.sheet th { font-weight: 500; color: var(--ink-3); border-top: 0; }
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: color-mix(in srgb, var(--warn) 14%, transparent); color: var(--warn); }
.status--ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }

/* Before / after */
.ba { padding: 0; overflow: hidden; }
.ba__stage { position: relative; aspect-ratio: 4 / 3.4; --pos: 50%; user-select: none; }
.ba__layer { position: absolute; inset: 0; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ba__after { clip-path: inset(0 0 0 var(--pos)); }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); pointer-events: none; }
.ba__handle span { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.2); }
.ba__handle span::before, .ba__handle span::after { content: ""; position: absolute; top: 50%; width: 7px; height: 7px; border-top: 2px solid #222; border-left: 2px solid #222; }
.ba__handle span::before { left: 9px; transform: translateY(-50%) rotate(-45deg); }
.ba__handle span::after { right: 9px; transform: translateY(-50%) rotate(135deg); }
.ba__chip { position: absolute; bottom: 14px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; padding: 5px 9px; border-radius: 999px; background: rgba(0,0,0,.62); color: #fff; pointer-events: none; }
.ba__chip--l { left: 14px; }
.ba__chip--r { right: 14px; }
.ba { position: relative; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; touch-action: pan-y; -webkit-tap-highlight-color: transparent; }
.ba:has(.ba__range:focus-visible) .ba__handle span { box-shadow: 0 0 0 3px var(--accent), 0 2px 10px rgba(0,0,0,.2); }

.ba__before { background: #fff8e7; color: #5a3b1a; font-family: "Times New Roman", serif; font-size: 12px; }
.old__top { display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; border-bottom: 2px dotted #c9a36b; }
.old__top span:first-child { font-size: 18px; font-weight: 700; color: #b5361d; letter-spacing: 0.06em; }
.old__menu { font-size: 10px; color: #2244aa; text-decoration: underline; white-space: nowrap; overflow: hidden; }
.old__slider { display: flex; align-items: center; justify-content: space-between; padding: 18px 8px; background: linear-gradient(90deg, #f2b600, #ff6f3c); color: #fff; font-size: 14px; text-shadow: 1px 1px 0 #933; border-radius: 3px; }
.old__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.old__row i { display: flex; align-items: center; justify-content: center; height: 44px; background: #f6d9b4; border: 1px dashed #c9a36b; font-style: italic; }
.old__news { background: #fff; border: 1px solid #e5cfa8; padding: 8px; font-size: 11px; line-height: 1.35; }
.old__foot { margin-top: auto; font-size: 10px; color: #8a6a44; text-align: right; }

.ba__after { background: #2b211a; color: #f6ead8; font-family: var(--font); }
.new__top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.new__logo { font-weight: 600; letter-spacing: -0.01em; }
.new__time { font-size: 11px; padding: 4px 8px; border-radius: 999px; background: rgba(246, 234, 216, .12); }
.new__hero { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.new__kicker { font-size: 11px; color: #d9b98c; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.05em; }
.new__title { font-size: clamp(22px, 3.2vw, 30px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; max-width: 12ch; }
.new__btn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; background: #e9a24a; color: #2b211a; font-size: 13px; font-weight: 600; }
.new__strip { display: flex; gap: 14px; font-size: 11px; color: #d9c3a3; padding-top: 10px; border-top: 1px solid rgba(246, 234, 216, .14); padding-bottom: 26px; }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services { grid-template-columns: 1fr; } }
.service { display: flex; flex-direction: column; gap: 12px; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.service h3 { font-size: 21px; }
.service p { color: var(--ink-2); font-size: 15.5px; flex: 1; }
.service__term { font-family: var(--mono); font-size: 13px; color: var(--ink-3); padding-top: 14px; border-top: 1px solid var(--line); }
.icon { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: s; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; gap: 28px; } }
.step { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 2px solid var(--ink); }
.step__n { font-family: var(--mono); font-size: 13px; color: var(--ink-3); }
.step h3 { font-size: 20px; }
.step p { color: var(--ink-2); font-size: 15.5px; }
.pay { margin-top: 48px; padding: 18px 22px; border-radius: var(--radius); background: var(--accent-soft); color: var(--ink); font-size: 16px; max-width: 720px; }

/* ---------- Honest ---------- */
.honest__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .honest__list { grid-template-columns: 1fr; } }
.honest__list li { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.honest__list h3 { font-size: 19px; margin-bottom: 10px; }
.honest__list p { color: var(--ink-2); font-size: 15.5px; }

/* ---------- FAQ ---------- */
.faq__list { max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 0; cursor: pointer; font-size: 19px; font-weight: 500; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-3px) rotate(45deg); transition: transform 200ms var(--ease-out); }
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 66ch; }

/* ---------- Contact ---------- */
.contact { background: var(--accent); color: var(--accent-ink); }
.contact .eyebrow, .contact .section__lead { color: color-mix(in srgb, var(--accent-ink) 72%, var(--accent)); }
.contact :focus-visible { outline-color: var(--accent-ink); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }
.contacts { margin-top: 40px; display: flex; flex-direction: column; }
.contacts li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 18px 0; border-top: 1px solid color-mix(in srgb, var(--accent-ink) 22%, var(--accent)); }
.contacts__label { width: 100px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: color-mix(in srgb, var(--accent-ink) 62%, var(--accent)); }
.contacts a { font-size: 20px; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .contacts a:hover { text-decoration: underline; text-underline-offset: 4px; } }
.copy { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent-ink) 35%, var(--accent)); background: transparent; color: inherit; font-size: 13px; cursor: pointer; transition: transform 160ms var(--ease-out), background-color 180ms ease; }
.copy:active { transform: scale(0.97); }

.cform { background: var(--surface); color: var(--ink); padding: clamp(22px, 3vw, 32px); border-radius: calc(var(--radius) + 4px); }
.cform .btn { margin-top: 4px; }
.cform__hint { margin-top: 12px; font-size: 13px; color: var(--ink-3); text-align: center; }

/* ---------- Footer ---------- */
.footer { background: var(--bg); color: var(--ink-3); border-top: 1px solid var(--line); }
.footer__row { display: flex; justify-content: space-between; align-items: center; min-height: 72px; font-size: 14px; }
.footer a { text-decoration: none; transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .footer a:hover { color: var(--ink); } }

/* ---------- Motion ---------- */
/* Hero intro on load */
.hero__title .w > span { animation: rise 900ms var(--ease-out) both; animation-delay: calc(var(--i) * 70ms + 80ms); }
@keyframes rise { from { transform: translateY(105%); } }
.intro { animation: fade-up 800ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }

/* Reveal on scroll, staggered via --d */
.js .reveal { opacity: 0; transform: translateY(22px); filter: blur(6px);
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out), filter 700ms var(--ease-out);
  transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }

/* Case demo lifts in after the text */
.js .case .demo { opacity: 0; transform: translateY(40px) scale(0.96); transition: opacity 800ms var(--ease-out) 150ms, transform 1000ms var(--ease-out) 150ms; }
.js .case.is-in .demo { opacity: 1; transform: none; }
.js .case .list li { opacity: 0; transform: translateX(-10px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.js .case.is-in .list li { opacity: 1; transform: none; }
.js .case.is-in .list li:nth-child(1) { transition-delay: 250ms; }
.js .case.is-in .list li:nth-child(2) { transition-delay: 320ms; }
.js .case.is-in .list li:nth-child(3) { transition-delay: 390ms; }
.js .case.is-in .list li:nth-child(4) { transition-delay: 460ms; }
.case__num { transition: color 300ms ease; }
.case.is-in .case__num { color: var(--accent-text); }

/* Icons draw themselves */
.js .service .icon > * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1100ms var(--ease-out); transition-delay: calc(var(--d, 0ms) + 250ms); }
.js .service.is-in .icon > * { stroke-dashoffset: 0; }

/* Step line fills */
.js .step { border-top-color: var(--line); position: relative; }
.js .step::before { content: ""; position: absolute; top: -2px; left: 0; right: 0; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 1000ms var(--ease-in-out); transition-delay: calc(var(--d, 0ms) + 200ms); }
.js .step.is-in::before { transform: scaleX(1); }

/* Cards: lift and a light that follows the cursor */
.service, .honest__list li { position: relative; overflow: hidden; }
.service::after, .honest__list li::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 300ms ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%);
}
@media (hover: hover) and (pointer: fine) {
  .service, .honest__list li, .js .service.done, .js .honest__list li.done { transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), border-color 200ms ease; transition-delay: 0ms; }
  .service:hover, .honest__list li:hover, .js .service.done:hover, .js .honest__list li.done:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -28px rgba(0, 0, 0, 0.6); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
  .service:hover::after, .honest__list li:hover::after { opacity: 1; }
  .nav a { position: relative; }
  .nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 300ms var(--ease-out); }
  .nav a:hover::after { transform: scaleX(1); transform-origin: left; }
}

/* Demo details */
.calc__result strong { display: inline-block; }
.calc__result.pulse { animation: pulse-bg 600ms var(--ease-out); }
@keyframes pulse-bg { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 35%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.demo__toast:not(:empty) { animation: fade-up 500ms var(--ease-out); }
.sheet tbody tr:first-child { animation: row-in 900ms var(--ease-out); }
@keyframes row-in { from { background: var(--accent-soft); } }
.status { transition: background-color 300ms ease, color 300ms ease; }

@media (prefers-reduced-motion: reduce) {
  .hero__title .w > span, .intro, .orb, .marquee__track, .live__dot::after { animation: none; }
  .js .reveal, .js .case .demo, .js .case .list li { transform: none; filter: none; transition: opacity 300ms ease; }
  .js .service .icon > * { stroke-dashoffset: 0; transition: none; }
  .js .step::before { transform: none; transition: none; }
  .live__item { transition: opacity 200ms ease; }
  .flow__out > li { transition: opacity 200ms ease; transform: none; }
  @starting-style { .flow__out > li { transform: none; } }
}

/* ---------- Type: serif headings, plain labels ---------- */
:root { --serif: "Literata", Georgia, "Times New Roman", serif; }
h1, h2, .work h3, .chero h1, .rt-teaser h3, .cta-band h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.025em; }
h1 em, h2 em, h3 em { font-style: italic; }
.hero__title { letter-spacing: -0.03em; line-height: 1.04; }
.section h2 { letter-spacing: -0.025em; }
.eyebrow { font-family: var(--font); font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--ink-3); }
.tag, .step__n, .contacts__label, .rt-num { font-family: var(--font); letter-spacing: 0; text-transform: none; }
.tag { font-size: 13px; }
.contacts__label { font-size: 14px; }
.step__n { font-size: 15px; }

/* ---------- Services: names only ---------- */
.services { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1000px) { .services { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } .service:last-child { grid-column: span 2; } }
.service { justify-content: space-between; gap: 40px; min-height: 170px; padding: 24px; }
.service h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(21px, 2vw, 25px); letter-spacing: -0.02em; line-height: 1.1; }
@media (max-width: 640px) { .service { min-height: 130px; gap: 24px; padding: 18px 16px; } .service h3 { font-size: 17px; } }

/* Calm example card: no pulsing dot */
.live__dot::after { display: none; }

/* ---------- Page background: lime and violet glow from the palette over a faint dot grid ---------- */
body { background: var(--bg); }

/* Key words in headings: italic serif in soft violet, a partner to the lime accent */
:root { --em: #b9a7ff; }
h1 em, h2 em, h3 em, .chero h1 em, .work h3 em, .rt-teaser h3 em { font-style: italic; color: var(--em); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1.2px, transparent 1.4px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 40%, transparent 90%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 40%, transparent 90%);
}
.section--alt { background: color-mix(in srgb, var(--bg-alt) 72%, transparent); }
.footer { background: transparent; }
.kpi b, .kpi-band b { font-variant-numeric: tabular-nums; }

/* ---------- Light theme (toggle in the header, choice saved per visitor) ---------- */
:root { --accent-text: var(--accent); --dot: rgba(255, 255, 255, 0.1); --glow-a: 34%; --glow-b: 16%; }
:root[data-theme="light"] {
  --bg: #f5f4ee; --bg-alt: #ecebe3; --surface: #ffffff;
  --ink: #15141a; --ink-2: #45444f; --ink-3: #6b6a76; --line: #dcdad0;
  --accent-soft: #eaf8c8; --accent-text: #4a7a0c;
  --violet: #7b5cff; --em: #5b3fd6; --tg: #e6f0f6;
  --dot: rgba(21, 20, 26, 0.09); --glow-a: 22%; --glow-b: 24%;
  color-scheme: light;
}
:root[data-theme="light"] .live__card, :root[data-theme="light"] .demo__body { box-shadow: 0 1px 0 var(--line), 0 30px 60px -36px rgba(30, 30, 50, 0.35); }
body::before { background-image: radial-gradient(var(--dot) 1.2px, transparent 1.4px); }

.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; transition: transform 160ms var(--ease-out), border-color 200ms ease; }
.theme-toggle:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { border-color: var(--ink-3); } }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: transform 400ms var(--ease-out); }
:root[data-theme="light"] .theme-toggle svg { transform: rotate(-90deg); }
.theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: block; }
.header__row > .btn--small { margin-left: 8px; }
.header__tools { display: flex; align-items: center; gap: 8px; }

/* ---------- Live background: three palette blobs on their own slow paths ---------- */
.bg-live { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-live i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; will-change: transform; }
.bg-live i:nth-child(1) { left: 45%; top: -25%; background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) var(--glow-a), transparent), transparent); animation: blob-a 19s var(--ease-in-out) infinite alternate; }
.bg-live i:nth-child(2) { left: -25%; top: 30%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) var(--glow-b), transparent), transparent); animation: blob-b 23s var(--ease-in-out) infinite alternate; }
.bg-live i:nth-child(3) { left: 30%; top: 55%; width: 48vmax; height: 48vmax; background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) calc(var(--glow-a) * 0.7), transparent), transparent); animation: blob-c 29s var(--ease-in-out) infinite alternate; }
@keyframes blob-a { to { transform: translate3d(-35vw, 30vh, 0) scale(1.15); } }
@keyframes blob-b { to { transform: translate3d(40vw, -20vh, 0) scale(0.9); } }
@keyframes blob-c { to { transform: translate3d(-25vw, -35vh, 0) scale(1.2); } }

/* Cursor light: follows the pointer with an eased lag (fine pointers only) */
.cursor-glow { position: fixed; left: 0; top: 0; z-index: -1; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%; pointer-events: none; opacity: 0; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent); transition: opacity 400ms ease; will-change: transform; }
.cursor-glow.on { opacity: 1; }
:root[data-theme="light"] .cursor-glow { background: radial-gradient(closest-side, color-mix(in srgb, var(--violet) 14%, transparent), transparent); }
@media (prefers-reduced-motion: reduce) { .bg-live i { animation: none; } .cursor-glow { display: none; } }

/* ---------- About me ---------- */
.about-me__grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 760px) { .about-me__grid { grid-template-columns: 1fr; } }
.about-me__photo { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 50% 30%; border-radius: 28px; border: 1px solid var(--line); display: block; }
@media (max-width: 760px) { .about-me__photo { max-width: 280px; } }
.about-me p + p { margin-top: 14px; }
.about-me__photo { aspect-ratio: auto; }
