/* ==========================================================
   dornik.de – Präzision
   ========================================================== */

:root,
:root[data-theme="dark"] {
  --bg: #0a0c0f;
  --bg-2: #0e1216;
  --surface: #12171d;
  --surface-2: #181f27;
  --paper: #12171d;
  --line: #222b35;
  --line-strong: #33404d;
  --text: #e8edf2;
  --muted: #8d9aa8;
  --draw: #b9c6d3;
  --accent: #34d67a;
  --accent-2: #6ee7a0;
  --accent-ink: #04170c;
  --accent-soft: rgba(52, 214, 122, .13);
  --gold: #ffd84d;
  --grid: rgba(255, 255, 255, .028);
  --grid-strong: rgba(140, 170, 200, .07);
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, .7);
  --glow: radial-gradient(60% 50% at 75% 0%, rgba(52, 214, 122, .10), transparent 70%);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-2: #ebe6db;
  --surface: #fbfaf6;
  --surface-2: #f2efe7;
  --paper: #fbfaf6;
  --line: #dcd5c6;
  --line-strong: #c3baa6;
  --text: #15191e;
  --muted: #5b646e;
  --draw: #2b3640;
  --accent: #13803f;
  --accent-2: #0e6b33;
  --accent-ink: #ffffff;
  --accent-soft: rgba(19, 128, 63, .1);
  --gold: #e9b800;
  --grid: rgba(20, 25, 30, .045);
  --grid-strong: rgba(30, 60, 90, .08);
  --shadow: 0 24px 50px -24px rgba(40, 30, 10, .35);
  --glow: radial-gradient(60% 50% at 75% 0%, rgba(19, 128, 63, .1), transparent 70%);
  color-scheme: light;
}

:root {
  --font-sans: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 14px;
  --gutter: 16px;
  --header-h: 64px;
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    var(--glow),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 900px, 48px 48px, 48px 48px;
  background-repeat: no-repeat, repeat, repeat;
  overflow-x: hidden;
  transition: background-color .3s, color .3s;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
strong { font-weight: 650; }
.mono { font-family: var(--font-mono); }
.small { font-size: 12px; }

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

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 19px; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
.brand-mark { width: 28px; height: 28px; color: var(--text); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.brand:hover .brand-mark { transform: rotate(90deg); }
.brand-tld { color: var(--accent); }

.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 12px; border-radius: 8px; transition: color .2s, background .2s; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--surface-2); }

.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 40px; height: 40px; display: inline-grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  border-radius: 10px; cursor: pointer; transition: border-color .2s, transform .2s;
}
.icon-btn:hover { border-color: var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .i-sun, :root:not([data-theme]) .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: none; }
:root[data-theme="light"] .i-moon { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span { display: block; width: 16px; height: 1.8px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .header-actions { margin-left: auto; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
  .nav a { padding: 14px 8px; font-size: 17px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, color .2s, box-shadow .2s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--accent); }
.btn-primary:hover { background: var(--accent-2); color: var(--accent-ink); }
:root[data-theme="dark"] .btn-primary:hover { background: #5fe397; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn-lg { padding: 16px 24px; font-size: 17px; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

.chips { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-family: var(--font-mono); font-size: 12.5px; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.card-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.card-bar .dot:first-child { background: var(--accent); }
.card-bar .mono { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.label { display: inline-block; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .hero { padding-top: 80px; } .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 56px; } }

.hello { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px solid var(--accent); background: var(--surface-2); flex: none; box-shadow: 0 0 0 4px var(--accent-soft); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.no-photo { display: none; }

h1 {
  font-size: clamp(52px, 11vw, 112px);
  line-height: .92; letter-spacing: -.045em; font-weight: 800;
  margin: 0 0 24px;
}
.accent-text { color: var(--accent); position: relative; }
.lead { font-size: clamp(20px, 2.6vw, 25px); line-height: 1.35; font-weight: 550; margin: 0 0 14px; letter-spacing: -.01em; }
.sub { color: var(--muted); margin: 0 0 22px; max-width: 56ch; }
.sub strong { color: var(--text); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* Range / target game */
.range { overflow: hidden; }
.range-hud { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.range-hud span { padding: 9px 12px; border-right: 1px solid var(--line); white-space: nowrap; }
.range-hud span:last-child { border-right: 0; }
.range-hud b { color: var(--text); font-weight: 600; }
@media (max-width: 460px) {
  .range-hud { grid-template-columns: repeat(2, 1fr); }
  .range-hud span:nth-child(2) { border-right: 0; }
  .range-hud span:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
.range-stage { position: relative; background: var(--surface-2); }
#target { display: block; width: 100%; aspect-ratio: 4 / 3; cursor: none; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
#target:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }
.range-hint b { color: var(--text); font-weight: 600; }
.range-overlay {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; text-align: center;
  background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(3px);
  animation: fade .3s ease;
}
.range-overlay[hidden] { display: none; }
.range-overlay .big { font-size: 72px; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--accent); }
.range-overlay .small { color: var(--muted); }
.range-overlay .btn { margin-top: 14px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.range-scores { list-style: none; margin: 0; padding: 12px 14px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; border-top: 1px solid var(--line); }
.range-scores li {
  height: 38px; border-radius: 8px; display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 15px;
  border: 1px dashed var(--line-strong); color: var(--muted);
}
.range-scores li.filled { border-style: solid; animation: pop .35s cubic-bezier(.2,1.6,.4,1); }
.range-scores li.z5 { background: #ffe14d; color: #222; border-color: #e6c200; }
.range-scores li.z4 { background: #e5262a; color: #fff; border-color: #c41a1e; }
.range-scores li.z3 { background: #2c9fe0; color: #fff; border-color: #1c86c4; }
.range-scores li.z2 { background: #1b1b1b; color: #fff; border-color: #444; }
.range-scores li.z1 { background: #f4f4f0; color: #222; border-color: #cfcfc8; }
.range-scores li.z0 { background: transparent; color: var(--muted); border-color: var(--line-strong); border-style: solid; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.range-hint { margin: 0; padding: 0 14px 14px; font-size: 13px; color: var(--muted); }

/* Stats */
.stats { margin: 64px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stats > div { padding: 22px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div:nth-child(2n) { border-right: 0; }
.stats > div:nth-last-child(-n+2) { border-bottom: 0; }
@media (min-width: 820px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stats > div { border-bottom: 0; border-right: 1px solid var(--line); }
  .stats > div:nth-child(2n) { border-right: 1px solid var(--line); }
  .stats > div:last-child { border-right: 0; }
}
.stats dt { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stats dd { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: linear-gradient(180deg, transparent, var(--bg-2) 12%, var(--bg-2) 88%, transparent); }
.section-head { max-width: 760px; margin-bottom: 44px; }
h2 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; margin: 0 0 18px; }
h3 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 18px; }
.section-intro { color: var(--muted); font-size: 18px; margin: 0; max-width: 62ch; }
.section-intro strong { color: var(--text); }

.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1.15fr .85fr; gap: 56px; } }

.prose p { margin: 0 0 16px; color: var(--muted); }
.prose strong { color: var(--text); }
.lead-sm { font-size: 21px; line-height: 1.45; color: var(--text) !important; font-weight: 550; letter-spacing: -.01em; }

/* Photo with HUD frame */
.photo { position: relative; margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); aspect-ratio: 3 / 2; }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.8,.2,1); }
.photo:hover img { transform: scale(1.03); }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); pointer-events: none; }
.photo figcaption { position: absolute; left: 20px; bottom: 16px; z-index: 2; color: #fff; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.hud-corner { position: absolute; width: 22px; height: 22px; border: 2px solid var(--accent); z-index: 2; }
.hud-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.photo-fallback { display: none; position: absolute; inset: 0; place-items: center; color: var(--line-strong); }
.photo-fallback svg { width: 70%; height: 70%; }
.no-photo + .photo-fallback, .photo.no-photo .photo-fallback, .contact-photo.no-photo .photo-fallback { display: grid; }
.photo.no-photo img, .contact-photo.no-photo img { display: none; }

/* Pipeline */
.pipeline { margin-top: 72px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.pipeline-head { display: flex; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pipeline-head .ok { color: var(--accent); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) and (max-width: 1079px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-child(odd) { border-right: 1px solid var(--line); }
  .steps li:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
}
@media (min-width: 1080px) { .steps { grid-template-columns: repeat(7, 1fr); } }
.steps li { position: relative; padding: 18px 16px 20px; border-bottom: 1px solid var(--line); display: grid; gap: 4px; align-content: start; transition: background .4s; }
@media (min-width: 1080px) { .steps li { border-bottom: 0; border-right: 1px solid var(--line); } .steps li:last-child { border-right: 0; } }
.steps li::before { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--accent); transition: width .6s ease; }
.steps li .n { font-size: 12px; color: var(--muted); }
.steps li b { font-size: 17px; letter-spacing: -.01em; }
.steps li > span:last-child { font-size: 14px; color: var(--muted); line-height: 1.45; }
.steps li.done::before { width: 100%; }
.steps li.done .n { color: var(--accent); }
.steps li.current { background: var(--accent-soft); }
.steps li.current::before { width: 100%; }
.steps li.current .n { color: var(--accent); }

/* ---------- Bow explorer ---------- */
.explorer { display: grid; gap: 20px; }
@media (min-width: 980px) { .explorer { grid-template-columns: 1.35fr .65fr; align-items: start; } }
.blueprint { padding: 0; overflow: hidden; background: var(--paper); }
.bow-svg { display: block; width: 100%; height: auto; color: var(--draw); font-family: var(--font-mono); }
.bow-svg .part { color: var(--draw); cursor: pointer; transition: color .25s, opacity .25s; outline: none; }
.bow-svg .part .hit { fill: transparent; stroke: none; }
.bow-svg .riser { fill: color-mix(in srgb, var(--draw) 12%, var(--paper)); }
.bow-svg .leader { fill: none; stroke: currentColor; stroke-width: 1; stroke-dasharray: 3 3; }
.bow-svg .callout { font-size: 15px; font-weight: 700; letter-spacing: .1em; fill: currentColor; }
.bow-svg.has-active .part:not(.is-active) { opacity: .42; }
.bow-svg .part.is-active { color: var(--accent); }
.bow-svg .part:focus-visible { color: var(--accent); }
.bow-svg .string { color: var(--draw); opacity: .9; }
.bow-svg .dim { color: var(--muted); font-size: 12px; }
.bow-svg .dim text { fill: currentColor; }
.bow-svg .titleblock { color: var(--line-strong); font-size: 12px; }
.bow-svg .titleblock text { fill: var(--muted); }
.bow-svg .titleblock .tb-title { fill: var(--text); font-weight: 700; letter-spacing: .06em; }
.bow-svg .pin { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.spec { padding: 0; overflow: hidden; }
@media (min-width: 980px) { .spec { position: sticky; top: calc(var(--header-h) + 20px); } }
.spec-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); }
.spec-tabs button {
  font: 500 13.5px var(--font-sans); padding: 7px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--muted); transition: all .2s;
}
.spec-tabs button:hover { color: var(--text); border-color: var(--line-strong); }
.spec-tabs button[aria-selected="true"] { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.spec-body { padding: 22px 22px 24px; }
.spec-body .label { margin-bottom: 6px; }
.spec-body h3 { font-size: 26px; margin-bottom: 14px; }
.spec-body p { color: var(--muted); margin: 0; font-size: 15.5px; }
.spec-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.spec-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.spec-list b { font-weight: 650; }
.spec-list span { font-family: var(--font-mono); font-size: 13px; color: var(--accent); white-space: nowrap; }
.spec-body.swap { animation: swap .35s ease; }
@keyframes swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Werkstatt-Teaser ---------- */
.teaser { overflow: hidden; }
.teaser-body { display: grid; gap: 0; }
@media (min-width: 820px) { .teaser-body { grid-template-columns: 1.3fr 1fr; } }
.teaser-art { position: relative; background: var(--paper); color: var(--draw); border-bottom: 1px solid var(--line); min-height: 220px; display: grid; place-items: center; overflow: hidden; }
@media (min-width: 820px) { .teaser-art { border-bottom: 0; border-right: 1px solid var(--line); } }
.teaser-art svg { width: 100%; height: 100%; display: block; }
.tz-blur { filter: blur(5px); opacity: .8; }
.stamp {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg);
  padding: 8px 18px; border: 3px solid var(--accent); border-radius: 8px; color: var(--accent);
  font-size: clamp(18px, 3vw, 26px); font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  background: color-mix(in srgb, var(--paper) 70%, transparent); box-shadow: 0 0 0 6px var(--accent-soft);
}
.progress { list-style: none; margin: 0; padding: 24px; display: grid; gap: 14px; align-content: center; font-size: 14.5px; }
.progress li { display: flex; align-items: center; gap: 12px; color: var(--muted); flex-wrap: wrap; }
.progress .chk { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 12px; }
.progress li.done { color: var(--text); }
.progress li.done .chk { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.progress li.active { color: var(--text); font-weight: 600; }
.progress li.active .chk { color: var(--accent); border-color: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.progress .bar { flex: 1 1 100%; margin-left: 36px; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 40%; border-radius: 6px; background: var(--accent); animation: scan 1.8s ease-in-out infinite; }
@keyframes scan { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* ---------- Lab ---------- */
.lab-grid { display: grid; gap: 20px; }
@media (min-width: 940px) { .lab-grid { grid-template-columns: 1fr 1fr; } }
.lab { padding: 24px; }
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field > span { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--muted); }
.field output { font-family: var(--font-mono); color: var(--text); font-weight: 600; white-space: nowrap; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line-strong) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-strong); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.seg { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden; }
.seg button { font: 600 14px var(--font-mono); padding: 9px 4px; border: 0; border-right: 1px solid var(--line-strong); background: transparent; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }

.results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0 14px; }
.results-1 { grid-template-columns: 1fr; }
.results > div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 6px; }
.r-val { font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.r-unit { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.r-lbl { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
.traj, .foc-svg { display: block; width: 100%; height: auto; color: var(--draw); margin: 4px 0 12px; overflow: visible; }
.foc-t { font: 600 11px var(--font-mono); fill: var(--muted); }
.foc-t.acc { fill: var(--accent); }
.note { font-size: 13.5px; color: var(--muted); margin: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .contact { grid-template-columns: .7fr 1.3fr; gap: 64px; } }
.contact-photo { position: relative; aspect-ratio: 3 / 4; max-width: 360px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-photo::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; z-index: 1; pointer-events: none; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Making-of ---------- */
.making-of { padding: 0 0 72px; }
.mo-card { max-width: 760px; padding: 24px 26px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.mo-card .label { margin-bottom: 8px; }
.mo-card h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 10px; }
.mo-card p { color: var(--muted); font-size: 15.5px; margin: 0 0 10px; }
.mo-card p:last-child { margin-bottom: 0; }
.mo-card strong { color: var(--text); }
.btn svg.fb { fill: currentColor; stroke: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner a { color: var(--muted); text-decoration: none; }
.footer-inner a:hover { color: var(--text); }
.footer-note { font-size: 12.5px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- Legal pages ---------- */
.legal { padding: 72px 0 96px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(40px, 7vw, 64px); margin-bottom: 36px; }
.legal h2 { font-size: 24px; letter-spacing: -.02em; margin: 40px 0 12px; }
.legal h3 { font-size: 18px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--text); }
.legal .contact-img { background: #fff; padding: 14px 18px; border-radius: 10px; border: 1px solid var(--line); display: inline-block; }
.legal .contact-img img { width: 241px; height: auto; }
.legal .stand { margin-top: 48px; font-family: var(--font-mono); font-size: 13px; }

/* 404 */
.notfound { min-height: calc(100vh - var(--header-h) - 100px); display: grid; place-items: center; text-align: center; padding: 64px 0; }
.notfound h1 { font-size: clamp(64px, 16vw, 160px); margin-bottom: 8px; }
.notfound p { color: var(--muted); margin: 0 0 28px; }
.notfound svg { width: 160px; height: 160px; margin: 0 auto 24px; }
