/* Tokens follow DESIGN.md (indigo on cool white, navy ink, light display weight). */
:root {
  --bg: #ffffff;
  --bg-soft: #f6f9fc;
  --text: #0d253d;
  --text-2: #273951;
  --muted: #64748d;
  --line: #e3e8ee;
  --accent: #533afd;
  --accent-press: #4434d4;
  --link: #533afd;
  --on-accent: #ffffff;
  --ruby: #ea2261;
  --magenta: #f96bee;
  --sherbet: #ffb27a;
  --lavender: #b9b9f9;
  --plate: #ffffff;
  --well-empty: #f1f4f8;
  --band: #0d253d;
  --band-text: #ffffff;
  --band-muted: #a9b9cf;
  --shadow-1: 0 1px 3px rgba(0, 55, 112, .08);
  --shadow-2: 0 8px 24px rgba(0, 55, 112, .08), 0 2px 6px rgba(0, 55, 112, .04);
  --mesh-opacity: .55;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1a2d;
    --bg-soft: #0e2238;
    --text: #e8eefa;
    --text-2: #c3d0e4;
    --muted: #8fa3bd;
    --line: #1d3350;
    --accent: #6552ff;
    --accent-press: #7b6dff;
    --link: #a69cff;
    --plate: #112943;
    --well-empty: #17314f;
    --band: #060f1c;
    --shadow-1: 0 1px 3px rgba(0, 0, 0, .4);
    --shadow-2: 0 8px 24px rgba(0, 0, 0, .35);
    --mesh-opacity: .3;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 6px; z-index: 20; }
.skip:focus { left: 8px; }

/* Type */
h1, h2 { font-weight: 300; letter-spacing: -.03em; line-height: 1.06; }
h1, h2 { text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); max-width: 14ch; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); max-width: 20ch; }
h3 { font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; }
.lead { font-size: 1.25rem; font-weight: 300; color: var(--text-2); max-width: 46ch; line-height: 1.5; margin-top: 24px; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1;
  padding: 15px 24px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--accent-press); border-color: var(--accent-press); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--muted); }
.btn-small { padding: 11px 18px; font-size: .95rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.4rem; font-weight: 600; letter-spacing: -.03em; }
.nav nav { display: flex; gap: 32px; margin-left: auto; }
.nav nav a { text-decoration: none; color: var(--text-2); font-size: .98rem; }
.nav nav a:hover { color: var(--accent); }
@media (max-width: 760px) { .nav nav { display: none; } .nav-inner { justify-content: space-between; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 88px; }
.mesh {
  position: absolute; inset: -10% -10% 0;
  opacity: var(--mesh-opacity);
  filter: blur(60px);
  background:
    radial-gradient(40% 55% at 78% 30%, var(--lavender), transparent 70%),
    radial-gradient(34% 45% at 92% 62%, var(--magenta), transparent 70%),
    radial-gradient(30% 40% at 66% 78%, var(--sherbet), transparent 70%),
    radial-gradient(36% 50% at 55% 20%, var(--accent), transparent 72%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr; gap: 56px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); } }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.creds { margin-top: 36px; font-size: .95rem; color: var(--muted); max-width: 44ch; }

/* The plate: the one memorable thing */
.plate-wrap { position: relative; }
#plate {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 55, 112, .14));
}
.plate-body { fill: var(--plate); stroke: var(--line); stroke-width: 1.5; }
.plate-label { fill: var(--muted); font: 500 11px "Hanken Grotesk", sans-serif; text-anchor: middle; }
.well {
  fill: var(--well-empty);
  stroke: var(--line);
  stroke-width: 1;
  transition: fill .7s cubic-bezier(.2, .7, .2, 1), stroke .7s;
  transition-delay: var(--d, 0ms);
}
.well.on { fill: var(--c); stroke: transparent; }
.well:hover { stroke: var(--text); stroke-width: 2; transition-delay: 0ms; }
.tip {
  position: absolute; pointer-events: none; z-index: 2;
  background: var(--text); color: var(--bg);
  font-size: .85rem; line-height: 1.3; padding: 7px 11px; border-radius: 8px;
  white-space: nowrap; transform: translate(-50%, calc(-100% - 12px));
}
.plate-wrap figcaption { margin-top: 14px; font-size: .9rem; color: var(--muted); text-align: center; }

/* Partners */
.partners { border-block: 1px solid var(--line); background: var(--bg); }
.partners-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 48px; padding: 28px 0; }
.partners p { color: var(--muted); font-size: .95rem; }
.partners ul { display: flex; flex-wrap: wrap; gap: 12px 44px; }
.partners li { font-size: 1.2rem; color: var(--text-2); opacity: .8; }
.p1 { font-weight: 600; letter-spacing: -.02em; }
.p2 { font-weight: 300; letter-spacing: .04em; }
.p3 { font-weight: 500; font-style: italic; }
.p4 { font-weight: 600; letter-spacing: .02em; }
.p5 { font-weight: 400; letter-spacing: -.04em; }

/* Sections */
.section { padding: 112px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { margin-bottom: 56px; }
.split { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 7fr; gap: 80px; } .split-head { position: sticky; top: 112px; align-self: start; } }
.split-head p { margin-top: 24px; color: var(--text-2); max-width: 40ch; }

.index li { padding: 28px 0; border-top: 1px solid var(--line); transition: padding-left .25s; }
.index li:last-child { border-bottom: 1px solid var(--line); }
.index li:hover { padding-left: 14px; }
.index li:hover h3 { color: var(--accent); }
.index h3 { transition: color .2s; }
.index p { margin-top: 6px; color: var(--text-2); max-width: 52ch; }

/* Workflow: a real sequence, so the numbers earn their place */
.flow { --p: 0; position: relative; counter-reset: step; max-width: 720px; padding-left: 64px; }
.flow::before, .flow::after { content: ""; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; }
.flow::before { background: var(--line); }
.flow::after { background: linear-gradient(var(--accent), var(--ruby)); transform-origin: top; transform: scaleY(var(--p)); }
.flow li { position: relative; padding-bottom: 44px; counter-increment: step; }
.flow li:last-child { padding-bottom: 0; }
.flow li::before {
  content: counter(step);
  position: absolute; left: -64px; top: -4px; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 500; font-size: 1rem;
  background: var(--bg); color: var(--text); border: 2px solid var(--line);
  transition: background .3s, color .3s, border-color .3s;
}
.flow li.lit::before { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.flow p { margin-top: 6px; color: var(--text-2); max-width: 50ch; }
.js .flow li { opacity: .45; transition: opacity .3s; }
.js .flow li.lit { opacity: 1; }

/* About */
.about { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .about { grid-template-columns: 6fr 5fr; gap: 96px; align-items: start; } }
.about-body p + p { margin-top: 18px; }
.about-body p { color: var(--text-2); max-width: 54ch; }
.facts { margin-top: 36px; border-top: 1px solid var(--line); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.facts strong { font-weight: 500; font-size: 1.5rem; color: var(--text); letter-spacing: -.02em; margin-right: 8px; }

/* Team */
.team { display: grid; gap: 28px 40px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .team { grid-template-columns: repeat(4, 1fr); } }
.team li { display: flex; gap: 16px; align-items: center; }
.team p { color: var(--muted); font-size: .95rem; line-height: 1.35; margin-top: 2px; }
.av { flex: none; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 500; letter-spacing: .02em; }
.a1 { background: linear-gradient(135deg, #533afd, #665efd); }
.a2 { background: linear-gradient(135deg, #533afd, #f96bee); }
.a3 { background: linear-gradient(135deg, #ea2261, #ff8a5c); }
.a4 { background: linear-gradient(135deg, #4434d4, #ea2261); }

/* Contact band */
.band { background: var(--band); color: var(--band-text); padding: 112px 0; }
.band-grid { display: grid; gap: 56px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .band-grid { grid-template-columns: 5fr 6fr; gap: 96px; } }
.band h2 { max-width: 14ch; }
.band p { margin-top: 20px; color: var(--band-muted); max-width: 38ch; }
.band address { margin-top: 36px; font-style: normal; color: var(--band-muted); line-height: 1.7; }
.band address a { color: var(--band-text); text-underline-offset: 3px; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 6px; font-size: .95rem; color: var(--band-muted); }
input, textarea {
  font: inherit; color: var(--band-text);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 8px; padding: 12px 14px;
}
input:focus-visible, textarea:focus-visible { outline: 2px solid #b9b9f9; outline-offset: 1px; border-color: transparent; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #ff7a9c; }
form .btn { justify-self: start; margin-top: 6px; }
.status { margin-top: 0 !important; min-height: 1.6em; color: var(--band-text) !important; }

.footer { background: var(--band); color: var(--band-muted); border-top: 1px solid rgba(255, 255, 255, .1); font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 28px 0; }
.footer-inner span:first-child { margin-right: auto; }

@media (max-width: 600px) {
  .hero { padding: 44px 0 64px; }
  .section, .band { padding: 72px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .well, .index li, .flow li, .flow li::before { transition: none !important; transition-delay: 0ms !important; }
}

/* Products page */
[hidden] { display: none !important; }
.nav nav a[aria-current="page"] { color: var(--link); }
.page-head { position: relative; overflow: hidden; padding: 72px 0 56px; border-bottom: 1px solid var(--line); }
.mesh-soft { opacity: calc(var(--mesh-opacity) * .7); background:
  radial-gradient(40% 70% at 85% 20%, var(--lavender), transparent 70%),
  radial-gradient(30% 60% at 65% 90%, var(--sherbet), transparent 70%); }
.page-head .wrap { position: relative; }
.page-head h1 { max-width: 18ch; font-size: clamp(2.3rem, 5vw, 3.8rem); }
.search { margin-top: 36px; max-width: 460px; }
.search label { display: block; font-size: .95rem; color: var(--muted); margin-bottom: 6px; }
.search input {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 999px;
  padding: 14px 20px; box-shadow: var(--shadow-1);
}
.search input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }
.search p { min-height: 1.6em; margin-top: 8px; font-size: .95rem; color: var(--muted); }

.catalog-section { padding-top: 64px; }
.catalog { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .catalog { grid-template-columns: 250px 1fr; gap: 72px; } }
.cats { display: flex; flex-wrap: wrap; gap: 8px; align-self: start; }
.cats a { text-decoration: none; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: .95rem; color: var(--text-2); transition: border-color .15s, color .15s; }
.cats a:hover { border-color: var(--accent); color: var(--accent); }
.cats a.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cats a.dim { opacity: .4; }
@media (min-width: 900px) {
  .cats { position: sticky; top: 96px; flex-direction: column; flex-wrap: nowrap; gap: 2px; }
  .cats a { border: 0; border-left: 2px solid var(--line); border-radius: 0; padding: 8px 16px; }
  .cats a:hover { border-left-color: var(--accent); }
  .cats a.current { background: none; color: var(--accent); border-left-color: var(--accent); font-weight: 500; }
}

.cat { scroll-margin-top: 88px; }
.cat + .cat { margin-top: 72px; }
.cat h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); max-width: none; margin-bottom: 20px; }
.products li { display: grid; gap: 4px 24px; padding: 22px 0; border-top: 1px solid var(--line); grid-template-columns: 1fr; align-items: baseline; }
.products li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .products li { grid-template-columns: 1fr 140px 130px; } }
.products h3 { font-size: 1.1rem; }
.products p { color: var(--text-2); font-size: .98rem; margin-top: 4px; max-width: 54ch; }
.spec { color: var(--muted); font-size: .95rem; }
.products a { color: var(--link); text-underline-offset: 3px; font-weight: 500; font-size: .95rem; }
@media (min-width: 700px) { .products a { text-align: right; } }
.empty { padding: 32px 0; color: var(--text-2); }
.empty a { color: var(--link); }
.band-cta { display: flex; align-items: center; }
.index h3 a { text-decoration: none; color: inherit; }
.index h3 a:hover { color: var(--accent); }
.index h3 a:focus-visible { outline-offset: 4px; }
