/* ==========================================================================
   gi4mba.github.io — landing
   Direction: fantasy in the type, cyberpunk in the frame.
   No framework, no build step. Edit tokens in :root.
   ========================================================================== */

/* --- Fonts (self-hosted, latin subset, SIL OFL) -------------------------- */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/space-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap; src: url("/assets/fonts/space-grotesk-600.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("/assets/fonts/plex-sans-300.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); }

/* --- Tokens --------------------------------------------------------------- */
:root {
  --ground: #07060c;
  --surface: rgba(15, 12, 23, 0.72);
  --field: #0b0912;

  --signal: #ff00ff;   /* lines, glows, brackets. never body text */
  --acid: #d4ff00;     /* primary action and status marks */
  --violet: #9824e5;   /* background fog */
  --pink: #ffb3f7;     /* emphasis in headings */
  --sheet: #120a1c;    /* the colored sheet that slides over the page */
  --lilac: #b48cf0;    /* abstain votes in the simulator */

  --heading: #f6f2fb;
  --text: #efeaf7;
  --soft: #cfc8de;
  --body: #b9b1c9;
  --muted: #a49cb6;
  --faint: #8f87a1;

  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);
  --control: rgba(255, 255, 255, 0.45);

  --display: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1200px;
}

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

html {
  color-scheme: dark;
  background: var(--ground);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 4px; }

:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }

/* Browser surfaces themed from the palette */
::selection { background: #c800c8; color: #fff; }
html { scrollbar-color: rgba(255, 255, 255, 0.28) var(--ground); }
input, textarea, button { caret-color: var(--acid); accent-color: var(--acid); }

p { text-wrap: pretty; }

img, svg { max-width: 100%; }

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--acid);
  color: var(--ground);
  font: 500 13px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus { left: 8px; }

/* Atmosphere: HUD grid + fog, fades out below the hero */
.atmos {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1150px;
  pointer-events: none;
  background-image:
    radial-gradient(620px 420px at 86% 14%, rgba(255, 0, 255, 0.17), transparent 70%),
    radial-gradient(520px 420px at 6% 4%, rgba(152, 36, 229, 0.2), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 64px 64px, 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 720px, transparent 1150px);
          mask-image: linear-gradient(to bottom, #000 0, #000 720px, transparent 1150px);
}

.page { position: relative; z-index: 1; overflow-x: clip; }

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

/* Small mono label used for eyebrows and spec keys */
.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Corner brackets on a panel */
.bracketed { position: relative; }
.bracketed::before,
.bracketed::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 0 solid var(--signal);
  pointer-events: none;
}
.bracketed::before { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.bracketed::after { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }

/* --- Buttons and links ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn--primary {
  background: var(--acid);
  color: var(--ground);
  font-weight: 500;
  box-shadow: 0 0 28px rgba(212, 255, 0, 0.22);
}
.btn--primary:hover { box-shadow: 0 0 40px rgba(212, 255, 0, 0.4); transform: translateY(-1px); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--pink); color: var(--pink); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }

.link-mono {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--acid);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.link-mono:hover { border-bottom-color: var(--acid); }

/* --- Header --------------------------------------------------------------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
}
.brand-mark { display: block; width: 40px; height: 40px; }
.brand-mark .hex { fill: none; stroke: var(--signal); stroke-width: 1.5; }
.brand-mark text { fill: var(--text); font: 500 12px var(--mono); }
.brand-name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; margin-left: auto; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
  text-decoration: none;
}
.nav-link:hover { color: var(--pink); }

.lang { display: inline-flex; border: 1px solid rgba(255, 255, 255, 0.18); }
.lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--body);
  text-decoration: none;
}
.lang a:hover { color: var(--pink); }
.lang a[aria-current="true"] { background: var(--acid); color: var(--ground); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px 64px;
  padding-block: clamp(48px, 9vw, 120px) clamp(56px, 7vw, 104px);
}
.hero-copy { flex: 1 1 520px; min-width: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acid);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--acid); flex: none; }
.eyebrow { text-wrap: balance; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.03em; color: var(--heading); text-wrap: balance; }
/* Space Grotesk has no italic: the accent is carried by color alone */
h1 em, h2 em { font-style: normal; color: var(--pink); }

h1 {
  margin: 28px 0 0;
  font-size: clamp(42px, 6vw, 88px);
  line-height: 1;
  letter-spacing: -0.035em;
}
/* Italian runs longer: keep the hero headline to four lines */
:lang(it) h1 { font-size: clamp(38px, 5vw, 72px); }

.lede {
  max-width: 560px;
  margin: 28px 0 0;
  font-size: clamp(17px, 1.5vw, 18px);
  line-height: 1.65;
  font-weight: 300;
  color: var(--body);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

/* HUD panel */
.hud {
  flex: 1 1 360px;
  min-width: 0;
  max-width: 460px;
  margin-inline: auto;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.hud-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.hud-head .live { display: inline-flex; align-items: center; gap: 8px; }
.hud-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acid); }
.hud-art { display: block; width: 100%; max-width: 320px; height: auto; margin: 20px auto 8px; }
.hud-art .r-outer { fill: none; stroke: rgba(255, 255, 255, 0.14); }
.hud-art .r-ticks { fill: none; stroke: var(--signal); stroke-opacity: 0.55; stroke-width: 6; stroke-dasharray: 1.5 8.5; }
.hud-art .r-mid { fill: none; stroke: rgba(255, 255, 255, 0.12); }
.hud-art .r-dash { fill: none; stroke: var(--signal); stroke-opacity: 0.8; stroke-dasharray: 40 12 4 12; }
.hud-art .hex { fill: rgba(212, 255, 0, 0.04); stroke: var(--acid); stroke-width: 1.2; }
.hud-art .diamond { fill: none; stroke: rgba(255, 255, 255, 0.55); }
.hud-art .core { fill: var(--acid); }
.hud-art .axis { stroke: rgba(255, 255, 255, 0.28); }
.hud-art .ring { transform-box: fill-box; transform-origin: center; }

/* Spec rows (key / value) */
.spec { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.spec > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.spec dt { color: var(--muted); text-transform: uppercase; white-space: nowrap; }
.spec dd { margin: 0; color: var(--text); text-align: right; }
.spec--lg > div { padding: 14px 0; }
.spec--lg > div:last-child { border-bottom: 1px solid var(--line); }
.hud .spec { margin-top: 12px; }

/* --- Sections ------------------------------------------------------------- */
.section { padding-bottom: clamp(64px, 7vw, 104px); scroll-margin-top: 24px; }
/* The sheet brings its own top padding: keep the dark gap before it short */
.section:has(+ .sheet) { padding-bottom: clamp(40px, 4.5vw, 64px); }
.section h2 {
  margin: 16px 0 0;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.1;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}

/* Featured project */
.feature {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 56px;
  margin-top: 48px;
  padding: clamp(24px, 4vw, 52px);
  border: 1px solid rgba(255, 0, 255, 0.28);
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.08), rgba(152, 36, 229, 0.04) 42%, rgba(15, 12, 23, 0.85));
}
.feature-main { flex: 1 1 420px; min-width: 0; }
.feature-spec { flex: 1 1 320px; min-width: 0; align-self: center; }
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acid);
}
.feature-title { margin: 16px 0 0; font-size: clamp(40px, 5vw, 68px); line-height: 1; color: #fff; }
.feature-text { max-width: 520px; margin: 22px 0 0; font-size: 17px; line-height: 1.7; font-weight: 300; color: #c3bbd3; }
.feature .tags { margin-top: 28px; }
.feature .btn { margin-top: 32px; }

/* DnA-DAO vote simulator. Initial state is rendered in the HTML; the bar
   defaults below match it, JS only updates them on input. */
.sim { flex: 1 1 100%; min-width: 0; padding-top: 36px; border-top: 1px solid var(--line); }
.sim-limit { flex: 1 1 100%; max-width: 720px; margin: 0; padding-left: 16px; border-left: 2px solid var(--acid); }
.sim-title { margin: 0; font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; color: var(--heading); }
.sim-note { max-width: 560px; margin: 10px 0 0; font-size: 15px; line-height: 1.6; font-weight: 300; color: var(--body); }
.sim-note code { font-family: var(--mono); font-size: 0.92em; color: var(--acid); }
.sim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 32px 56px; margin-top: 28px; }
.sim-controls { display: grid; align-content: start; gap: 18px; }
.sim-field { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 4px 12px; }
.sim-field label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sim-field output { font: 500 15px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.sim-field input { grid-column: 1 / -1; width: 100%; height: 32px; margin: 0; cursor: pointer; }
.sim-field[data-kind="for"] input { accent-color: var(--acid); }
.sim-field[data-kind="against"] input { accent-color: var(--pink); }
.sim-field[data-kind="abstain"] input { accent-color: var(--lilac); }
.sim-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sim-presets button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  background: transparent;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.sim-presets button:hover { border-color: var(--pink); color: var(--pink); }
.sim-presets button:active { transform: translateY(1px); }
.sim-outcome { min-width: 0; }
.sim-status { display: flex; align-items: center; gap: 12px; margin: 0; font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; letter-spacing: -0.03em; }
.sim-status::before { content: ""; flex: none; width: 12px; height: 12px; background: currentColor; }
.sim-status[data-status="approved"] { color: var(--acid); }
.sim-status[data-status="rejected"] { color: var(--pink); }
.sim-status[data-status="quorum"] { color: var(--soft); }
.sim-bar { --f: 0.3; --a: 0.18; --b: 0.06; position: relative; display: flex; height: 14px; margin-top: 34px; background: rgba(255, 255, 255, 0.07); }
.sim-seg { height: 100%; transition: width 0.18s ease-out; }
.sim-seg-for { width: calc(var(--f) * 100%); background: var(--acid); }
.sim-seg-against { width: calc(var(--a) * 100%); background: var(--pink); }
.sim-seg-abstain { width: calc(var(--b) * 100%); background: var(--lilac); }
.sim-quorum { position: absolute; top: -6px; bottom: -6px; left: 40%; width: 2px; background: var(--text); }
.sim-quorum::after { content: "40%"; position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font: 11px var(--mono); color: var(--muted); }
.sim-checks { display: grid; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.sim-check { display: flex; align-items: baseline; gap: 10px; font-size: 15px; line-height: 1.5; color: var(--body); }
.sim-check::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--pink); }
.sim-check[data-ok="true"]::before { background: var(--acid); }
.sim-check[data-ok="skip"]::before { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
.sim-rest { margin: 10px 0 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* Secondary projects */
/* Link from the home to the projects page (only with the projects flag on) */
.work-more { margin: 28px 0 0; }

/* Projects page: a shorter hero, one section per project */
.hero--page { padding-block: clamp(40px, 7vw, 96px) clamp(16px, 3vw, 40px); }
.hero--page h1 { max-width: 16ch; }
.project .feature { margin-top: 20px; }
.project .feature-title { font-size: clamp(34px, 4vw, 52px); }
.project-side { flex: 1 1 320px; min-width: 0; display: grid; align-content: start; gap: 28px; }
.project-thumb { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.project-thumb img, .project-thumb svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.project-thumb {
  background:
    radial-gradient(70% 70% at 80% 20%, rgba(255, 0, 255, 0.2), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--bg, #07060c);
}
/* Block signature drawn by the build: colours live here, the SVG only has classes */
.sig-bg { fill: transparent; }
.hx-a { fill: var(--acid); }
.hx-m { fill: rgba(255, 0, 255, 0.55); }
.hx-v { fill: rgba(152, 36, 229, 0.35); }
.hx-o { fill: none; stroke: rgba(255, 255, 255, 0.12); }
.sig text { font-family: var(--mono); }
.sig-k { font-size: 13px; letter-spacing: 2px; fill: var(--acid); }
.sig-t { font-family: var(--display); font-weight: 600; font-size: 40px; letter-spacing: -1.2px; fill: var(--text); }
.sig-h { font-size: 14px; fill: var(--muted); }
.sig-s { font-size: 12px; letter-spacing: 1.5px; fill: #5d5570; }

/* Snippet: real code as text. Line numbers sit in their own column, so a copy gets only code */
.snippet { flex: 1 1 100%; min-width: 0; margin: 0; border: 1px solid var(--line); background: rgba(7, 6, 12, 0.6); }
.snippet-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 12px var(--mono); letter-spacing: 0.04em; color: var(--muted); }
.snippet-head .link-mono { margin: 0; white-space: nowrap; }
.snippet-head span { overflow-wrap: break-word; }
.snippet-body { display: grid; grid-template-columns: auto minmax(0, 1fr); }
.snippet pre { margin: 0; padding: 16px; font: 13px/1.75 var(--mono); color: var(--text); tab-size: 4; }
.snippet-ln { padding-right: 4px; text-align: right; color: #5d5570; user-select: none; }
.snippet-code { overflow-x: auto; padding-left: 12px; }
.snippet-code:focus-visible { outline: 2px solid var(--acid); outline-offset: -2px; }
.tk-k { color: var(--pink); }
.tk-n { color: var(--acid); }
.tk-c { color: #6f6684; }
.snippet-note { margin: 0; padding: 0 16px 14px; font-size: 14px; line-height: 1.6; font-weight: 300; color: var(--body); }

.cards { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 24px; }
.card { position: relative; flex: 1 1 340px; min-width: 0; padding: 32px; border: 1px solid var(--line); background: var(--surface); transition: border-color 0.25s; }
.card:hover,
.card:focus-within { border-color: rgba(255, 255, 255, 0.24); }
/* The whole card is the link: one focusable element, named for screen readers */
.card-link::after { content: ""; position: absolute; inset: 0; }
/* Mouse only: the border lights up under the cursor (position set by main.js) */
@media (hover: hover) and (pointer: fine) {
  .card::before {
    content: "";
    position: absolute;
    inset: -1px;
    padding: 1px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    background: radial-gradient(260px circle at var(--x, 50%) var(--y, 50%), rgba(255, 0, 255, 0.9), rgba(152, 36, 229, 0.35) 45%, transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  }
  .card:hover::before { opacity: 1; }
}
.card .kicker { color: var(--muted); }
.card h3 { margin: 14px 0 0; font-size: 26px; font-weight: 500; line-height: 1.15; color: #fff; }
.card p { margin: 14px 0 0; font-size: 16px; line-height: 1.65; font-weight: 300; color: var(--body); }
.card .link-mono { margin-top: 20px; }

/* Stack */
.stack-grid { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 48px; }
.stack-col { flex: 1 1 260px; min-width: 0; padding-top: 24px; border-top: 1px solid var(--signal); }
.stack-col h3 { margin: 0; font-size: 24px; font-weight: 500; color: #fff; }
.stack-col p { margin: 12px 0 0; font-size: 16px; line-height: 1.6; font-weight: 300; color: var(--body); }
.stack-col .tags { margin-top: 20px; }

/* Path */
.path { margin: 28px 0 0; padding: 0; list-style: none; }
.path li { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 20px 0; border-top: 1px solid var(--line); }
.path li:last-child { border-bottom: 1px solid var(--line); }
.path-when { flex: 0 0 120px; font-family: var(--mono); font-size: 13px; color: var(--acid); font-variant-numeric: tabular-nums; }
.path-what { flex: 1 1 320px; font-size: 17px; font-weight: 300; color: var(--text); }

/* --- Contact -------------------------------------------------------------- */
.contact-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 64px;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  background: rgba(15, 12, 23, 0.75);
}
.contact-copy { flex: 1 1 340px; min-width: 0; }
.contact-copy p { max-width: 440px; margin: 20px 0 0; font-size: 16px; line-height: 1.65; font-weight: 300; color: var(--body); }
.contact-copy .btn { margin-top: 28px; }

.form { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  background: var(--field);
  border: 1px solid var(--control);
  border-radius: 2px;
  color: var(--text);
  font: 16px var(--sans);
}
.field textarea { min-height: 120px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.field input:focus,
.field textarea:focus { border-color: var(--acid); outline: 2px solid var(--acid); outline-offset: 2px; }
.field input:user-invalid,
.field textarea:user-invalid { border-color: var(--pink); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { align-self: flex-start; padding-inline: 28px; }
.form-status { min-height: 1.5em; margin: 0; font-size: 14px; color: var(--body); }
.form-status.is-ok { color: var(--acid); }
.form-status.is-error { color: var(--pink); }

/* --- Footer --------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 24px 40px;
}
.copyright { font-family: var(--mono); font-size: 12px; color: var(--faint); }
.social { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; list-style: none; }
.social a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft);
  text-decoration: none;
}
.social a:hover { color: var(--pink); }

/* --- 404 / redirect stubs ------------------------------------------------- */
.lost { min-height: 100dvh; display: grid; place-content: center; gap: 24px; padding: var(--gutter); text-align: center; justify-items: center; }
.lost h1 { margin: 0; }

/* Colored sheet: the contact block rises over the page as you scroll.
   Scroll-driven: the scroll position is the timeline, no JavaScript.
   Without support it is a static band in the sheet color. */
.sheet {
  position: relative;
  isolation: isolate;
  background: var(--sheet);
  border-top: 1px solid rgba(255, 0, 255, 0.35);
  border-radius: 28px 28px 0 0;
  padding-top: clamp(48px, 6vw, 72px);
}
/* Only transform and opacity move, so the compositor runs it without
   repainting: the sheet's color sits on a pseudo-element that fades in. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sheet {
      background: transparent;
      view-timeline: --sheet block;
      animation: sheet-rise linear both;
      animation-timeline: --sheet;
      animation-range: entry 0% entry 50%;
    }
    .sheet::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      border-radius: inherit;
      background: var(--sheet);
      animation: sheet-tint linear both;
      animation-timeline: --sheet;
      animation-range: entry 0% entry 50%;
    }
  }
}
@keyframes sheet-rise { from { transform: translateY(12vh); } to { transform: none; } }
@keyframes sheet-tint { from { opacity: 0; } to { opacity: 1; } }

/* --- Dock ------------------------------------------------------------------
   Scrolling down, the header folds into a hex block parked top right.
   The motion lives in main.js (spring physics on the Web Animations API);
   this file holds the resting states. Without JS the dock never appears. */

/* Header items fold toward the corner while the dock takes over */
.site-header > * {
  transition:
    opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.35s ease-out;
}
.site-header > :nth-child(2) { transition-delay: 40ms; }
.site-header > :nth-child(3) { transition-delay: 80ms; }
.site-header.is-docked > * {
  opacity: 0;
  transform: translateX(28px) scale(0.96);
  filter: blur(3px);
  pointer-events: none;
  transition-delay: 0s;
}

.dock-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 48px; pointer-events: none; }

/* The dock box sits over the header's corner even while the block is hidden,
   so the box itself lets taps through; only the block and panel catch them. */
.dock { position: fixed; top: 16px; right: 16px; z-index: 30; width: 56px; height: 56px; pointer-events: none; }
.dock-block, .dock-panel { pointer-events: auto; }

.dock-block {
  position: relative;
  z-index: 2;
  display: block;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.dock[data-state="off"] .dock-block { visibility: hidden; }

.dock-hex { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 14px rgba(255, 0, 255, 0.28)); }
.dock-hex .hex-fill { fill: #120a1c; stroke: var(--signal); stroke-width: 2; stroke-linejoin: round; transition: fill 0.2s; }
.dock-block:hover .hex-fill,
.dock-block.is-pressed .hex-fill,
.dock[data-state="open"] .hex-fill { fill: #22102f; }
/* 173 = the hexagon's real perimeter in SVG units (no pathLength: some
   engines ignore it on polygons). main.js has the same number. */
.dock-hex .hex-progress { fill: none; stroke: var(--acid); stroke-width: 2.5; stroke-linejoin: round; stroke-dasharray: 173; stroke-dashoffset: 173; }
.dock-hex text { fill: var(--text); font: 500 15px var(--mono); letter-spacing: 0.02em; }

/* The acid outline fills up as you read: page scroll is its timeline */
@supports (animation-timeline: scroll()) {
  .dock-hex .hex-progress { animation: hex-read linear both; animation-timeline: scroll(root); }
}
@keyframes hex-read { to { stroke-dashoffset: 0; } }

/* Stand-in that morphs between the header bar and the hexagon */
.dock-ghost {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.34), rgba(152, 36, 229, 0.3));
  clip-path: polygon(95% 50%, 72.5% 89%, 27.5% 89%, 5% 50%, 27.5% 11%, 72.5% 11%);
  transform-origin: 0 0;
}

/* Panel that opens out of the block, built from the page's sections */
.dock-panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: min(340px, calc(100vw - 32px));
  padding: 84px 8px 12px;
  background: #0d0915;
  border: 1px solid rgba(255, 0, 255, 0.32);
  border-radius: 16px;
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.7);
}
.dock-panel[hidden] { display: none; }

.dock-head { position: absolute; top: 16px; left: 22px; right: 80px; display: grid; gap: 2px; margin: 0; }
.dock-who { font: 500 12px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); }
.dock-role { font-size: 13px; line-height: 1.35; color: var(--muted); text-wrap: balance; }

.dock-list { margin: 0; padding: 0; list-style: none; }
.dock-list a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.2s;
}
.dock-list a:hover { background: rgba(255, 255, 255, 0.05); }
.dock-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 11px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.dock-list a[aria-current] .dock-name { color: var(--acid); }
.dock-list a[aria-current] .dock-name::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acid); }
.dock-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--heading);
}
.dock-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 12px 14px 0;
  border-top: 1px solid var(--line);
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 640px) {
  .brand-name { display: none; }
  .lang { margin-left: auto; }
  /* Section links get their own row under logo and language */
  .site-nav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    justify-content: space-between;
    gap: 0 16px;
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .cta-row .btn { flex: 1 1 100%; min-height: 52px; }
  .feature .btn { width: 100%; min-height: 52px; }
  .form .btn { align-self: stretch; min-height: 52px; }
  .card { padding: 24px; }
  .card h3 { font-size: 24px; }
}

/* --- Motion (only when the visitor allows it) ------------------------------ */
/* One authored moment: the hero rises in once. The rings turn very slowly. */
@keyframes spin { to { transform: rotate(360deg); } }
/* Transform only, no fade: text is painted on the first frame, so the
   largest contentful paint is not held back by the animation. */
@keyframes rise { from { transform: translateY(12px); } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > *,
  .hud { animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 70ms; }
  .hero-copy > :nth-child(3) { animation-delay: 140ms; }
  .hero-copy > :nth-child(4) { animation-delay: 210ms; }
  .hud { animation-delay: 260ms; }

  .hud-art .ring-a { animation: spin 140s linear infinite; }
  .hud-art .ring-b { animation: spin 90s linear infinite reverse; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .site-header.is-docked > * { transform: none; filter: none; }
  .sim-seg { transition: none; }
}
