/* Gruda Labs – Layout: Labor-Notizbuch. Feines Millimeterraster als Grund,
   Protokoll-Etiketten in Mono, eine einzige Akzentfarbe (Kobalt-Tinte)
   plus Textmarker-Gelb für Hervorhebungen. */
:root {
  --paper: #eef0f4;
  --paper-2: #e4e7ee;
  --surface: #f8f9fb;
  --ink: #131a2e;
  --ink-soft: #4a5370;
  --line: #c9cedb;
  --grid: rgba(43, 75, 255, 0.07);
  --accent: #2b4bff;
  --accent-ink: #ffffff;
  --marker: #f3dc4a;
  --marker-ink: #131a2e;
  --good: #1f8a5b;
  --deep: #131a2e;
  --on-deep: #eef0f4;
  --bad: #d23c3c;
  --shadow: 0 1px 0 rgba(19, 26, 46, 0.04), 0 12px 32px -18px rgba(19, 26, 46, 0.35);

  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.86rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
  --step-4: clamp(2.8rem, 1.9rem + 4.6vw, 6.2rem);

  --radius: 14px;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1200px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c0f1c;
    --paper-2: #121729;
    --surface: #151a2e;
    --ink: #e7e9f3;
    --ink-soft: #9aa2bf;
    --line: #283052;
    --grid: rgba(124, 147, 255, 0.06);
    --accent: #8197ff;
    --accent-ink: #0c0f1c;
    --marker: #f3dc4a;
    --marker-ink: #0c0f1c;
    --good: #4cc98f;
    --deep: #1c2444;
    --on-deep: #eef0f4;
    --bad: #ff7a7a;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c0f1c;
  --paper-2: #121729;
  --surface: #151a2e;
  --ink: #e7e9f3;
  --ink-soft: #9aa2bf;
  --line: #283052;
  --grid: rgba(124, 147, 255, 0.06);
  --accent: #8197ff;
  --accent-ink: #0c0f1c;
  --marker: #f3dc4a;
  --marker-ink: #0c0f1c;
  --good: #4cc98f;
  --deep: #1c2444;
  --on-deep: #eef0f4;
  --bad: #ff7a7a;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg, canvas { max-width: 100%; display: block; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--marker); color: var(--marker-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

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

/* ---------- Typo-Bausteine ---------- */
.label {
  font-family: var(--f-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.label b { color: var(--accent); font-weight: 500; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.02; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: 34ch; }
.mark {
  background: linear-gradient(transparent 58%, var(--marker) 58%, var(--marker) 92%, transparent 92%);
  padding-inline: 0.06em;
  color: var(--marker-ink);
}

/* ---------- Buttons ---------- */
.btn {
  --b-bg: var(--ink); --b-fg: var(--paper);
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.85em 1.35em; border-radius: 999px; border: 1.5px solid var(--b-bg);
  background: var(--b-bg); color: var(--b-fg);
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--accent { --b-bg: var(--accent); --b-fg: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand svg { width: 32px; height: 32px; }
.brand small { font-family: var(--f-mono); font-weight: 400; font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.06em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  font-size: 0.95rem; color: var(--ink-soft); transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--paper-2); }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }
.nav .btn { padding: 0.6em 1.1em; font-size: 0.92rem; }

@media (max-width: 880px) {
  .menu-btn { display: grid; }
  .nav .btn { display: none; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; color: var(--ink); background: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(40px, 7vw, 96px) clamp(32px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy { display: grid; gap: 28px; min-width: 0; }
.hero h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.045em; line-height: 0.92; }
.hero h1 .thin { font-weight: 300; font-style: normal; display: block; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.field {
  position: relative; aspect-ratio: 1 / 1; max-width: 100%;
  border-radius: 28px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  cursor: crosshair; touch-action: pan-y;
}
.field canvas { width: 100%; height: 100%; }
.field-hud {
  position: absolute; inset: auto 14px 14px 14px; display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--f-mono); font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.04em;
  pointer-events: none;
}
.field-hud span b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.field-tag {
  position: absolute; top: 14px; left: 14px; pointer-events: none;
  font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--paper); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; color: var(--ink-soft);
}
.field-tag i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-right: 6px; vertical-align: 1px; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

.facts {
  margin-top: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1.5px solid var(--ink); border-bottom: 1px solid var(--line);
}
.fact { padding: 18px 18px 20px 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.fact + .fact { padding-left: 18px; border-left: 1px solid var(--line); }
.fact .big { font-family: var(--f-display); font-size: var(--step-2); font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.fact p { color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .field { aspect-ratio: 4 / 3; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding-block: clamp(64px, 10vw, 128px); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head > div { display: grid; gap: 16px; min-width: 0; }
.section-head p.intro { color: var(--ink-soft); max-width: 46ch; }
@media (max-width: 880px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Forschung ---------- */
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rfield {
  position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px;
  padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  min-width: 0; overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-color 0.3s;
}
.rfield:hover { transform: translateY(-4px); border-color: var(--ink); }
.rfield .glyph { width: 100%; height: 120px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.rfield .meta { display: flex; justify-content: space-between; align-items: baseline; }
.rfield p { color: var(--ink-soft); }
.rfield ul { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 8px; font-size: 0.93rem; }
.rfield li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 6px; }
.rfield li::before { content: "?"; font-family: var(--f-mono); color: var(--accent); font-weight: 500; }
@media (max-width: 880px) { .fields { grid-template-columns: 1fr; } }

/* ---------- Labor ---------- */
.lab {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 0;
  border: 1.5px solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow);
}
.lab-tabs { display: grid; align-content: start; border-right: 1px solid var(--line); background: var(--paper-2); }
.lab-tab {
  text-align: left; padding: 22px 22px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; cursor: pointer; display: grid; gap: 6px;
  transition: background 0.2s;
}
.lab-tab:hover { background: var(--surface); }
.lab-tab[aria-selected="true"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.lab-tab .t { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.lab-tab .d { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.4; }
.lab-tab .best { font-family: var(--f-mono); font-size: 0.75rem; color: var(--accent); }
.lab-note { padding: 18px 22px; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.5; }

.lab-panel { padding: clamp(20px, 3vw, 36px); display: grid; gap: 20px; min-width: 0; align-content: start; }
.lab-panel header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; align-items: baseline; }
.lab-panel header h3 { font-size: var(--step-2); }

.stage {
  position: relative; min-height: 300px; border-radius: 16px; border: 1px solid var(--line);
  background: var(--paper); display: grid; place-items: center; text-align: center; padding: 24px;
  user-select: none; -webkit-user-select: none; overflow: hidden;
}
.stage.clickable { cursor: pointer; }
.stage .big-msg { font-family: var(--f-display); font-size: var(--step-3); font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.stage .small-msg { color: var(--ink-soft); margin-top: 10px; }
.stage[data-state="wait"] { background: var(--paper-2); }
.stage[data-state="go"] { background: var(--accent); color: var(--accent-ink); }
.stage[data-state="go"] .small-msg { color: var(--accent-ink); opacity: 0.8; }
.stage[data-state="early"] { background: var(--bad); color: #fff; }
.stage[data-state="early"] .small-msg { color: #fff; opacity: 0.85; }

.readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.readout div { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); display: grid; gap: 2px; min-width: 0; }
.readout .v { font-family: var(--f-mono); font-size: 1.35rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.readout .k { font-size: 0.8rem; color: var(--ink-soft); }
@media (max-width: 560px) { .readout { grid-template-columns: 1fr 1fr; } .readout div:last-child { grid-column: span 2; } }

.trials { display: flex; align-items: flex-end; gap: 6px; height: 64px; padding-top: 4px; border-bottom: 1px solid var(--line); }
.trials .bar { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 3px; position: relative; transition: height 0.4s cubic-bezier(.2,.7,.2,1); }
.trials .bar.empty { background: var(--paper-2); }
.trials .bar span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font-family: var(--f-mono); font-size: 0.68rem; color: var(--ink-soft); white-space: nowrap; }

.stroop-word { font-family: var(--f-display); font-weight: 800; font-size: clamp(3rem, 2rem + 6vw, 6rem); letter-spacing: -0.03em; line-height: 1; }
.choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.choice {
  padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; font-weight: 600; display: grid; gap: 4px; justify-items: center;
}
.choice:hover { border-color: var(--ink); }
.choice:disabled { opacity: 0.45; cursor: default; }
.choice kbd { font-family: var(--f-mono); font-size: 0.7rem; color: var(--ink-soft); }
.choice i { width: 18px; height: 18px; border-radius: 50%; display: block; }
@media (max-width: 560px) { .choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.digits { font-family: var(--f-mono); font-size: clamp(3rem, 2rem + 6vw, 6rem); font-weight: 500; font-variant-numeric: tabular-nums; }
.span-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.span-form input {
  width: min(260px, 100%); padding: 12px 16px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--surface); font-family: var(--f-mono); font-size: 1.4rem; letter-spacing: 0.2em; text-align: center;
}
.span-form input:focus { border-color: var(--accent); outline: none; }
.hint { font-size: 0.88rem; color: var(--ink-soft); }
.hint b { color: var(--ink); font-weight: 600; }

@media (max-width: 880px) {
  .lab { grid-template-columns: 1fr; }
  .lab-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); }
  .lab-tab { padding: 14px 12px; border-bottom: 0; border-right: 1px solid var(--line); }
  .lab-tab:last-of-type { border-right: 0; }
  .lab-tab .d { display: none; }
  .lab-tab .t { font-size: 0.98rem; }
  .lab-tab[aria-selected="true"] { box-shadow: inset 0 -3px 0 var(--accent); }
  .lab-note { display: none; }
}

/* ---------- Produkte ---------- */
.products { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.product {
  grid-column: span 4; display: grid; gap: 14px; align-content: start;
  padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  min-width: 0; position: relative; overflow: hidden;
}
.product.feature {
  grid-column: span 12; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 32px;
  background: var(--deep); color: var(--on-deep); border-color: var(--deep); padding: clamp(24px, 4vw, 44px);
}
.product.feature p { color: color-mix(in srgb, var(--on-deep) 75%, transparent); }
.product.feature .label { color: color-mix(in srgb, var(--on-deep) 65%, transparent); }
.product h3 { font-size: var(--step-2); }
.product p { color: var(--ink-soft); }
.chip {
  justify-self: start; font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor;
}
.chip.dev { color: var(--accent); }
.chip.proto { color: var(--good); }
.chip.research { color: var(--ink-soft); }
.product.feature .chip { color: var(--marker); }
.feature-visual {
  aspect-ratio: 16 / 10; max-width: 100%; border-radius: 14px; overflow: hidden;
  background: color-mix(in srgb, var(--on-deep) 8%, var(--deep)); border: 1px solid color-mix(in srgb, var(--on-deep) 18%, transparent);
  padding: 16px; display: grid; grid-template-rows: auto 1fr; gap: 12px;
}
.fv-bar { display: flex; gap: 6px; }
.fv-bar i { width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--on-deep) 30%, transparent); }
.fv-canvas { position: relative; }
.fv-node {
  position: absolute; transform: translate(-50%, -50%);
  padding: 6px 12px; border-radius: 999px; font-size: 0.8rem; white-space: nowrap;
  background: color-mix(in srgb, var(--on-deep) 12%, var(--deep)); border: 1px solid color-mix(in srgb, var(--on-deep) 25%, transparent);
  color: var(--on-deep); transition: transform 0.3s;
}
.fv-node.core { background: var(--marker); color: var(--marker-ink); border-color: var(--marker); font-weight: 600; }
.fv-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.fv-svg line { stroke: color-mix(in srgb, var(--on-deep) 35%, transparent); stroke-width: 1; stroke-dasharray: 3 4; }
@media (max-width: 880px) {
  .product, .product.feature { grid-column: span 12; }
  .product.feature { grid-template-columns: 1fr; }
}

/* ---------- Ansatz ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-top: 40px; }
.steps-track { position: absolute; top: 12px; left: 0; right: 0; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.steps-track i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 1)); background: var(--accent); }
.step { display: grid; gap: 10px; align-content: start; min-width: 0; position: relative; }
.step::before {
  content: ""; position: absolute; top: -34px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--accent);
}
.step .num { font-family: var(--f-mono); font-size: 0.85rem; color: var(--accent); }
.step p { color: var(--ink-soft); font-size: 0.97rem; }
@media (max-width: 880px) {
  .steps { grid-template-columns: 1fr; padding-top: 0; padding-left: 32px; gap: 28px; }
  .steps-track { top: 0; bottom: 0; left: 6px; right: auto; width: 2px; height: auto; }
  .steps-track i { transform-origin: top; transform: scaleY(var(--p, 1)); }
  .step::before { top: 4px; left: -32px; }
}

/* ---------- Manifest ---------- */
.manifest { padding-block: clamp(56px, 9vw, 120px); border-block: 1.5px solid var(--ink); }
.manifest blockquote { margin: 0; font-family: var(--f-display); font-size: var(--step-3); font-weight: 600; line-height: 1.08; letter-spacing: -0.03em; max-width: 22ch; text-wrap: balance; }
.manifest .rot { color: var(--accent); display: inline-block; transition: opacity 0.35s ease, transform 0.35s ease; }
.manifest .rot.out { opacity: 0; transform: translateY(0.25em); }
.manifest figcaption { margin-top: 24px; }

/* ---------- Kontakt ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.contact-info { display: grid; gap: 24px; min-width: 0; }
.mail-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mail-line .addr { font-family: var(--f-display); font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; text-decoration: none; word-break: break-all; }
.mail-line .addr:hover { color: var(--accent); }
.copy-btn { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-family: var(--f-mono); font-size: 0.75rem; }
.copy-btn:hover { border-color: var(--ink); }
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 24px; margin: 0; }
.dl dt { font-family: var(--f-mono); font-size: 0.8rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.dl dd { margin: 0; }

.form { display: grid; gap: 14px; padding: clamp(20px, 3vw, 32px); border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 0.88rem; color: var(--ink-soft); min-width: 0; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink); transition: border-color 0.2s;
}
.form textarea { min-height: 130px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--accent); outline: none; }
.topics { position: relative; display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.topics legend { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 8px; padding: 0; }
.topics input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.topics label { display: inline-block; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; color: var(--ink); font-size: 0.9rem; }
.topics input:checked + label { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topics input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-status { font-size: 0.9rem; min-height: 1.4em; }
.form-status.ok { color: var(--good); }
.form-status.err { color: var(--bad); }
@media (max-width: 880px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { padding-block: 40px 56px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.9rem; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: center; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--ink); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 0.9rem;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; z-index: 80;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
