@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --paper: #F5F6FA;
  --panel: #FFFFFF;
  --mist: #DCE2F2;
  --line: #B9C3E0;
  --field: #6F7A9E;
  --ink: #0E1A3D;
  --ink-soft: #4A5576;
  --blue: #2B45D6;
  --blue-ink: #FFFFFF;
  --apricot: #F5A524;
  --night: #0C1536;
  --on-night: #EEF1FA;
  --on-night-soft: #A9B3D3;
  --gutter: clamp(16px, 5vw, 64px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0C1536; --panel: #121D45; --mist: #1C2959; --line: #34447F;
    --ink: #EEF1FA; --ink-soft: #A9B3D3; --blue: #6F86FF; --blue-ink: #0C1536;
  }
}
:root[data-theme="dark"] {
  --paper: #0C1536; --panel: #121D45; --mist: #1C2959; --line: #34447F;
  --ink: #EEF1FA; --ink-soft: #A9B3D3; --blue: #6F86FF; --blue-ink: #0C1536;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; text-underline-offset: 0.24em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.foot :focus-visible { outline-color: var(--on-night); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: var(--paper); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- top bar ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 16px; }
.brand svg { flex: none; }
.nav { display: flex; align-items: center; gap: 26px; font-size: 16px; }
.nav a { text-decoration: none; color: var(--ink-soft); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; text-decoration-color: var(--apricot); }
.menu { display: none; }
.btn {
  display: inline-block; padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--blue); color: var(--blue-ink) !important;
  text-decoration: none !important; font: 600 16px "Instrument Sans", system-ui, sans-serif;
  transition: transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover { transition: none; transform: none; } }
.btn.big { padding: 16px 26px; font-size: 17px; }

/* ---------- headings ---------- */
.display {
  margin: 0;
  font-size: clamp(44px, 5.8vw, 84px);
  line-height: .95;
  font-stretch: 78%;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.page-head { padding-block: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 48px); }
.page-head h1 { margin: 0; font-size: clamp(40px, 5vw, 72px); line-height: .98; font-stretch: 78%; font-weight: 650; letter-spacing: -0.02em; }
.page-head p { margin: 20px 0 0; max-width: 56ch; font-size: clamp(18px, 1.5vw, 20px); color: var(--ink-soft); }
.lead { color: var(--ink-soft); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-block: clamp(36px, 6vw, 80px) clamp(40px, 6vw, 72px);
}
.hero .who { margin: 0 0 18px; font-weight: 600; color: var(--blue); }
.hero p.lead { margin: 28px 0 36px; max-width: 40ch; font-size: clamp(18px, 1.5vw, 20px); }

.diagram {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--mist);
  border-radius: 28px;
  padding: clamp(14px, 2vw, 28px);
  background-image: radial-gradient(var(--mist) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  background-position: 9px 9px;
  box-shadow: 0 30px 60px -30px rgba(14, 26, 61, .28);
}
.diagram svg { display: block; width: 100%; height: auto; }
.diagram .v { display: none; }
.n rect { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.n.hl rect { fill: var(--blue); stroke: var(--blue); }
.n text { font: 600 17px "Instrument Sans", sans-serif; fill: var(--ink); }
.n.hl text { fill: var(--blue-ink); }
.wire { stroke: var(--line); stroke-width: 2; fill: none; }
.perim { fill: none; stroke: var(--blue); stroke-width: 1.5; stroke-dasharray: 6 6; opacity: .7; }
.tag { font: 600 14px "Instrument Sans", sans-serif; fill: var(--blue); }
.ground rect { fill: var(--mist); }
.ground text { font: 500 16px "Instrument Sans", sans-serif; fill: var(--ink-soft); }
.pillar { stroke: var(--mist); stroke-width: 6; }
.packet { fill: var(--apricot); }
.chip rect { fill: var(--apricot); }
.chip text { font: 600 14px "Instrument Sans", sans-serif; fill: #0E1A3D; }

/* ---------- hero backdrop (parallax) ---------- */
.hero-wrap { position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: -20% 0 -20% 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--mist) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 70% 45%, #000 20%, transparent 75%);
  will-change: transform;
}
.hero .diagram { will-change: transform; }

/* ---------- request flow (scroll-driven) ---------- */
.flow { padding-block: clamp(40px, 5.5vw, 80px); }
.flow-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); }
.flow-visual { position: sticky; top: 12vh; align-self: start; height: 70vh; display: grid; place-items: center; }
.flow-visual svg { width: 100%; max-width: 280px; max-height: 66vh; height: auto; }
.fn rect { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; transition: fill .35s ease, stroke .35s ease; }
.fn text { font: 600 17px "Instrument Sans", sans-serif; fill: var(--ink); transition: fill .35s ease; }
.fn.ground rect { fill: var(--mist); stroke: none; }
.fn.on rect { fill: var(--blue); stroke: var(--blue); }
.fn.on text { fill: var(--blue-ink); }
.fn.ground.on rect { fill: var(--apricot); stroke: none; }
.fn.ground.on text { fill: #0E1A3D; }
.flow-packet { fill: var(--apricot); stroke: var(--paper); stroke-width: 3; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.flow-steps { list-style: none; margin: 0; padding: 0; }
.flow-step { min-height: 26vh; display: flex; flex-direction: column; justify-content: center; padding-block: 24px; transition: opacity .4s ease; }
.js .flow-step h3 { color: var(--ink-soft); transition: color .35s ease; }
.js .flow-step.is-active h3 { color: var(--ink); }
.flow-step .layer::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; background: var(--line); vertical-align: 1px; transition: background .35s ease; }
.js .flow-step.is-active .layer::before { background: var(--apricot); }
.flow-step .layer { margin: 0 0 10px; font-weight: 600; font-size: 16px; color: var(--blue); }
.flow-step h3 { margin: 0 0 14px; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.02; font-stretch: 80%; font-weight: 650; letter-spacing: -0.015em; }
.flow-step p:last-child { margin: 0; max-width: 40ch; font-size: clamp(18px, 1.4vw, 21px); color: var(--ink-soft); }
@media (max-width: 860px) {
  .flow-grid { grid-template-columns: 1fr; }
  .flow-visual { display: none; }
  .flow-step { min-height: 0; padding-block: 22px; border-bottom: 1px solid var(--mist); }
  .js .flow-step h3 { color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  .flow-packet, .flow-step h3, .fn rect, .fn text, .flow-step .layer::before { transition: none; }
}

.hero .note { margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); }
.hero .proof { margin: -18px 0 32px; font-size: 16px; font-weight: 600; color: var(--ink); }
.diagram:focus-visible { outline-offset: 6px; border-radius: 28px; }
.steps.six { --n: 6; }
.block.flush-top { padding-top: 0; }
.page-head.tall { padding-bottom: clamp(80px, 12vw, 160px); }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: 2px; }
.details .legal-details { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--mist); }
form.contact .hint { font-weight: 400; font-size: 15px; color: var(--ink-soft); margin-top: -2px; }
form.contact .notice a { color: inherit; }
form.contact .field-err { display: none; font-weight: 500; font-size: 15px; color: #B42318; }
form.contact .invalid .field-err, form.contact .field-err.show { display: block; }
form.contact [aria-invalid="true"] { border-color: #B42318; }

/* ---------- sections ---------- */
section.block { padding-block: clamp(40px, 5.5vw, 80px); }
section.block + section.block, section.block + section.flow, section.flow + section.block { padding-top: 0; }
.hero-wrap + section.block { padding-top: clamp(16px, 2.5vw, 32px); }
.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 64px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.head h2 { margin: 0; font-size: clamp(32px, 4.2vw, 54px); line-height: 1; font-stretch: 80%; font-weight: 650; letter-spacing: -0.015em; }
.head p { margin: 0; color: var(--ink-soft); max-width: 46ch; }

.rows { border-top: 1px solid var(--mist); }
.row {
  display: grid; grid-template-columns: 56px minmax(0, 5fr) minmax(0, 7fr);
  gap: 8px 32px; align-items: start;
  padding-block: 28px; border-bottom: 1px solid var(--mist);
}
.row.nogl { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.row svg { margin-top: 4px; }
.row h3 a { text-decoration: underline; text-decoration-thickness: 1.5px; text-decoration-color: var(--line); }
.row h3 a:hover { color: var(--blue); text-decoration-color: currentColor; }
.row h3, .row .row-title { margin: 0; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; font-weight: 600; letter-spacing: 0; }
.row p { margin: 0 0 10px; max-width: 60ch; }
.row p:last-child { margin-bottom: 0; }
.row .meta { font-size: 15px; color: var(--ink-soft); }
.row dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; }
.row dt { font-weight: 600; }
.row dd { margin: 0; }
.g-fill { fill: var(--blue); }
.g-line { fill: none; stroke: var(--blue); stroke-width: 2; }
.g-acc { fill: var(--apricot); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 28px; position: relative; counter-reset: s; }
.steps::before { content: ""; position: absolute; left: 22px; right: 22px; top: 22px; height: 2px; background: var(--mist); }
.steps li { position: relative; counter-increment: s; }
.steps li::before {
  content: counter(s);
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--blue); color: var(--blue);
  font-weight: 700; font-size: 18px; margin-bottom: 20px; position: relative;
}
.steps li:last-child::before { background: var(--apricot); border-color: var(--apricot); color: #0E1A3D; }
.steps strong { display: block; font-size: 19px; margin-bottom: 6px; }
.steps span { color: var(--ink-soft); font-size: 16px; }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(28px, 4vw, 44px); border-radius: 28px; background: var(--panel); border: 1px solid var(--mist); }
.cta-band .cta-title { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; line-height: 1.2; max-width: 30ch; }
.cta-band .terms-line { margin: 10px 0 0; max-width: 60ch; font-size: 16px; color: var(--ink-soft); }

/* ---------- prose (legal and about) ---------- */
.prose { max-width: 74ch; padding-bottom: clamp(56px, 8vw, 104px); }
.prose h2 { font-size: 24px; line-height: 1.2; margin: 40px 0 12px; font-weight: 650; }
.prose h3 { font-size: 19px; margin: 24px 0 8px; }
.prose p, .prose li { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose .updated { color: var(--ink-soft); font-size: 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--mist); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); padding-bottom: clamp(56px, 8vw, 104px); }
.details dl { margin: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 20px; }
.details dt { color: var(--ink-soft); }
.details dd { margin: 0; }
form.contact { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px); border-radius: 28px; background: var(--panel); border: 1px solid var(--mist); }
form.contact label { display: grid; gap: 6px; font-weight: 600; font-size: 16px; }
form.contact input, form.contact textarea {
  font: 400 17px "Instrument Sans", system-ui, sans-serif; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--field); border-radius: 12px; padding: 12px 14px; width: 100%;
}
form.contact textarea { min-height: 160px; resize: vertical; }
form.contact input:focus, form.contact textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43, 69, 214, .18); }
form.contact .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
form.contact .check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
form.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 14px 18px; border-radius: 12px; font-weight: 500; display: none; }
.notice.ok { background: #E3F4E8; color: #14532D; }
.notice.err { background: #FDE8E8; color: #7F1D1D; }
.notice.show { display: block; }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--on-night); padding-block: clamp(48px, 7vw, 80px) 32px; font-size: 16px; }
.foot .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 32px 48px; }
.foot .entity { margin: 0 0 10px; font-weight: 650; font-size: 18px; }
.foot p { margin: 0 0 6px; color: var(--on-night-soft); }
.foot a { color: var(--on-night); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot .copy { margin-top: 48px; padding-top: 18px; border-top: 1px solid rgba(238, 241, 250, .14); font-size: 14px; color: var(--on-night-soft); }

@media (max-width: 1000px) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; cursor: pointer; padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: 16px; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] .nav { display: grid; gap: 14px; position: absolute; right: 0; top: calc(100% + 10px); z-index: 10; background: var(--panel); border: 1px solid var(--mist); border-radius: 18px; padding: 18px 22px; min-width: 220px; box-shadow: 0 20px 40px -20px rgba(14, 26, 61, .35); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps::before { display: none; }
}
@media (max-width: 760px) {
  .head, .contact-grid { grid-template-columns: 1fr; }
  .row, .row.nogl { grid-template-columns: 44px minmax(0, 1fr); }
  .row.nogl { grid-template-columns: 1fr; }
  .row > div { grid-column: 2; }
  .row.nogl > div { grid-column: 1; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps::before { left: 22px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; }
  .steps li { display: grid; grid-template-columns: 46px 1fr; gap: 0 18px; }
  .steps li::before { margin: 0; grid-row: span 2; }
  .diagram .h { display: none; }
  .diagram .v { display: block; }
  .foot .cols { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  body { font-size: 17px; }
  .brand span { display: none; }
}
