@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink-0: #07060d;
  --ink-1: #0e0c1a;
  --ink-2: #161329;
  --line: rgba(160, 146, 255, 0.16);
  --line-strong: rgba(160, 146, 255, 0.32);
  --text: #f2effb;
  --text-2: #bdb6da;
  --text-3: #9089b3;
  --violet: #8f80ff;
  --violet-soft: #b9afff;
  --violet-deep: #2c1fc0;
  --gold: #f0c35a;
  --gold-hi: #ffd987;
  --gold-ink: #1c1404;
  --danger: #ff9b8f;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --max: 88rem;
  --radius-l: clamp(1.25rem, 2.4vw, 2rem);
  --radius-m: 1rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 4.5rem;

  color-scheme: dark;
}

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

[hidden] { display: none !important; }

html {
  background-color: var(--ink-0);
  color: var(--text);
  font-family: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  scrollbar-color: #3a3170 var(--ink-0);
  scrollbar-width: thin;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background-color: var(--ink-0);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  font-stretch: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--gold);
}

::selection { background: #3b2ed6; color: #fff; }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: var(--gold); }

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

h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
p, dd, li { text-wrap: pretty; }
ol, ul { padding: 0; list-style: none; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--gold);
  color: var(--gold-ink);
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

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

/* Display voice: Archivo at full width, set in capitals */
.display {
  font-stretch: 125%;
  font-weight: 760;
  text-transform: uppercase;
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s var(--ease-out), border-color 0.4s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(7, 6, 13, 0.82);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand { display: inline-flex; flex: none; border-radius: 8px; }
.brand img { width: clamp(7.5rem, 11vw, 9.25rem); height: auto; }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); }
.nav-list { display: flex; gap: clamp(1rem, 2.2vw, 2.25rem); }
.nav-list a {
  font-size: 0.8125rem;
  font-weight: 560;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding-block: 0.5rem;
  position: relative;
}
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.15rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav-list a:hover::after,
.nav-list a:focus-visible::after { transform: scaleX(1); }

.lang {
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  overflow: hidden;
}
.lang a, .lang span {
  padding: 0.4rem 0.7rem;
  text-decoration: none;
  line-height: 1;
}
.lang [aria-current="true"] { background: var(--text); color: var(--ink-0); }
.lang a { color: var(--text-2); }
.lang a:hover { color: var(--text); }

.menu-toggle {
  display: none;
  appearance: none;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 640;
  font-stretch: 108%;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; transition: transform 0.35s var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }

.btn-gold {
  background: var(--gold);
  color: var(--gold-ink);
}
.btn-gold:hover { background: var(--gold-hi); }
.btn-gold:active { transform: translateY(1px); }
.btn-gold:focus-visible { outline-color: var(--text); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn-line {
  min-height: 2.5rem;
  padding: 0 1.1rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.btn-line:hover { background: rgba(143, 128, 255, 0.12); border-color: var(--violet-soft); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: var(--header-h);
  padding-bottom: clamp(1.5rem, 4.5vh, 3.25rem);
  overflow-x: clip;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 46% at 50% 36%, rgba(76, 52, 230, 0.20), transparent 70%),
    var(--ink-0);
}

.loop {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  height: calc(100% + 45vh);
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 52%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0.12) 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 52%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0.12) 86%, transparent 100%);
}

.hero-copy { grid-row: 2; }

.loop {
  transform: translate3d(0, calc(var(--hero-p, 0) * 48vh), 0) scale(calc(1 + var(--hero-p, 0) * 0.04));
  opacity: calc(1 - var(--hero-p, 0) * 0.55);
}

/* Staircase: "WERK DAT" on the left, the glowing line ranged right beneath it. */
.hero-title {
  font-size: clamp(2.75rem, 7.1vw, 6rem);
  display: grid;
  row-gap: 0.06em;
}
.hero-title .w1 { justify-self: start; }
.hero-title .w3 {
  justify-self: end;
  color: #f6f3ff;
  text-shadow:
    0 0 0.12em rgba(196, 186, 255, 0.85),
    0 0 0.45em rgba(122, 102, 255, 0.65),
    0 0 1.1em rgba(84, 60, 255, 0.45);
}
.hero-title .w1 > span,
.hero-title .w3 > span { display: inline-block; }

.hero-band {
  margin-top: clamp(1.25rem, 3.2vh, 2.25rem);
  padding-top: clamp(1rem, 2.6vh, 1.5rem);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem clamp(2rem, 4vw, 4rem);
  align-items: end;
}

.hero-sub {
  font-size: clamp(1.0625rem, 1.4vw, 1.375rem);
  line-height: 1.4;
  font-weight: 450;
  color: var(--text);
  max-width: 21ch;
  text-wrap: balance;
}

.task { display: grid; gap: 0.7rem; }
.task label {
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text-2);
  max-width: 60ch;
}
.task label strong { color: var(--text); font-weight: 600; }

.task-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.375rem 0.375rem 1.25rem;
  border-radius: 999px;
  background: rgba(14, 12, 26, 0.78);
  border: 1px solid var(--line-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.task-field:focus-within {
  border-color: rgba(240, 195, 90, 0.7);
  box-shadow: 0 0 0 4px rgba(240, 195, 90, 0.12);
}
.task-field input {
  flex: 1;
  min-width: 0;
  height: 2.75rem;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-size: 1.0625rem;
}
.task-field input::placeholder { color: var(--text-3); opacity: 1; }
.task-field input:focus { outline: none; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(5rem, 13vw, 10rem); }

.statement { position: relative; z-index: 1; text-align: center; }
.statement h2 { font-size: clamp(2.25rem, 6.2vw, 5.5rem); }
.statement p {
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  color: var(--text-2);
}
.statement p strong { color: var(--text); font-weight: 600; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.section-head h2 { font-size: clamp(2rem, 5vw, 4.25rem); }
.section-head p { color: var(--text-2); max-width: 34rem; font-size: 1.125rem; }

/* ---------- Dictionary ---------- */

.entries { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }

.dictionary { position: relative; isolation: isolate; overflow-x: clip; }
/* Two slow fields of light behind the glass, so the blur has something to carry. */
.dictionary::before,
.dictionary::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(70vw, 60rem);
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}
.dictionary::before { left: -18vw; top: 14%; background: radial-gradient(closest-side, rgba(92, 64, 255, 0.34), transparent); }
.dictionary::after { right: -22vw; top: 52%; background: radial-gradient(closest-side, rgba(64, 104, 255, 0.26), transparent); }
.motion .dictionary::before { animation: drift-a 24s ease-in-out infinite alternate; }
.motion .dictionary::after { animation: drift-b 30s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(14vw, 18vh); } }
@keyframes drift-b { to { transform: translate(-12vw, -22vh); } }

.entry {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(34rem circle at var(--mx, 12%) var(--my, 0%), rgba(110, 90, 255, 0.2), transparent 46%),
    linear-gradient(155deg, rgba(143, 128, 255, 0.1), rgba(14, 12, 26, 0.46) 42%, rgba(14, 12, 26, 0.6));
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(160, 146, 255, 0.14);
  border-radius: var(--radius-l);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
}

.headword {
  font-size: clamp(3rem, 8.4vw, 6rem);
  font-stretch: 125%;
  font-weight: 640;
  line-height: 0.9;
  letter-spacing: -0.035em;
}
.entry > * { min-width: 0; }

/* A glowing rim that follows the pointer (top-left by default). */
.entry::after,
.form::after {
  content: "";
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out);
  inset: -1px;
  padding: 1px;
  background: radial-gradient(22rem circle at var(--mx, 12%) var(--my, 0%), rgba(206, 198, 255, 0.85), transparent 55%);
  -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);
  opacity: 0.55;
}
.entry:hover::after,
.form:hover::after,
.form:focus-within::after { opacity: 1; }
.motion .entry:not(.in)::after { opacity: 0; }

/* A gold spark running slowly around the rim, like the sparks on the hero mark. */
@property --spark {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.spark {
  position: absolute;
  inset: -1px;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgba(255, 217, 135, 0.95)) drop-shadow(0 0 12px rgba(240, 195, 90, 0.6));
  opacity: 0;
  transition: opacity 1s var(--ease-out) 0.4s;
}
.entry.in .spark,
.form.in .spark { opacity: 1; }
.spark > span {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--spark),
    transparent 0deg 304deg,
    rgba(240, 195, 90, 0.45) 342deg,
    #ffe3a0 356deg,
    #fff8e8 359deg,
    transparent 360deg);
  -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);
  animation: spark-run 16s linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes spark-run { to { --spark: 360deg; } }
.headword.is-long { font-size: clamp(2.125rem, 8.2vw, 4.75rem); }

.headword sup {
  font-size: 0.16em;
  font-weight: 500;
  letter-spacing: 0.04em;
  vertical-align: top;
  position: relative;
  top: 0.6em;
  margin-left: 0.4em;
  color: var(--text-3);
}

.pron {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  font-size: 0.9375rem;
  color: var(--text-2);
}
.pron .ipa { color: var(--violet-soft); font-weight: 500; letter-spacing: 0.02em; }

.definition {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-size: clamp(1.375rem, 2.3vw, 2rem);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 22ch;
  text-wrap: balance;
}

.entry-detail { display: grid; gap: 2rem; align-content: start; }
.entry-detail dt {
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-soft);
  margin-bottom: 0.5rem;
}
.entry-detail dd { color: var(--text-2); max-width: 46ch; }

.entries-minor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.entry-minor { grid-template-columns: 1fr; gap: 0; }
.entry-minor .headword { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
.entry-minor .definition { font-size: clamp(1.25rem, 1.8vw, 1.5rem); max-width: 26ch; }
.entry-minor .entry-body { margin-top: 1rem; color: var(--text-2); max-width: 46ch; }

/* ---------- Case ---------- */

.case {
  position: relative;
  background:
    radial-gradient(80% 60% at 85% 0%, rgba(60, 40, 210, 0.22), transparent 70%),
    var(--ink-1);
  border-block: 1px solid var(--line);
}

.case-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.case h2 { font-size: clamp(2rem, 5vw, 4.25rem); }
.case-text { color: var(--text-2); font-size: 1.125rem; max-width: 36rem; }
.case-text p + p { margin-top: 1rem; }
.case-text strong { color: var(--text); font-weight: 600; }

.flow {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  position: relative;
}
.flow-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}
.flow-track {
  position: absolute;
  left: 0.6875rem;
  right: 0;
  top: 0.6875rem;
  height: 1px;
  background: linear-gradient(90deg, var(--violet), rgba(143, 128, 255, 0.25));
  overflow: hidden;
}
.flow-runner {
  position: absolute;
  inset: 0;
  animation: run 5.5s var(--ease-out) infinite;
}
.flow-runner::before {
  content: "";
  position: absolute;
  left: -4rem;
  top: -1px;
  width: 4rem;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--gold));
  box-shadow: 0 0 12px rgba(240, 195, 90, 0.9);
}
@keyframes run {
  from { transform: translateX(0); }
  to { transform: translateX(calc(100% + 4rem)); }
}

.flow-step { position: relative; padding-top: 2.5rem; }
.flow-step::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 1.375rem; height: 1.375rem;
  border-radius: 50%;
  background: var(--ink-0);
  border: 1px solid var(--violet);
  box-shadow: inset 0 0 0 5px var(--ink-0), inset 0 0 0 12px var(--violet);
}
.flow-step:last-child::before {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 5px var(--ink-0), inset 0 0 0 12px var(--gold), 0 0 18px rgba(240, 195, 90, 0.45);
}
.flow-step h3 { font-size: 1.125rem; font-weight: 640; font-stretch: 112%; line-height: 1.25; }
.flow-step p { margin-top: 0.5rem; color: var(--text-2); font-size: 0.9375rem; max-width: 26ch; }

.flow-note { margin-top: 2rem; font-size: 0.8125rem; color: var(--text-3); }

/* ---------- Approach ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 3vw, 3rem);
  counter-reset: step;
}
.step { border-top: 1px solid var(--line-strong); padding-top: 1.5rem; counter-increment: step; }
.step::before {
  content: counter(step);
  display: block;
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 300;
  font-stretch: 125%;
  line-height: 1;
  color: var(--violet);
  margin-bottom: 1.5rem;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 1.25rem; font-weight: 640; font-stretch: 112%; line-height: 1.25; }
.step p { margin-top: 0.75rem; color: var(--text-2); }

/* ---------- About / timeline ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.about h2 { font-size: clamp(2rem, 3.7vw, 3.4rem); }
.about-text { color: var(--text-2); font-size: 1.125rem; }
.about-text p + p { margin-top: 1rem; }
.about-text strong { color: var(--text); font-weight: 600; }


.timeline {
  --from-year: 1995;
  --span: 32;
  margin-top: clamp(3.5rem, 8vw, 6rem);
  position: relative;
}
.timeline-axis {
  position: relative;
  height: 1.1rem;
  font-size: 0.75rem;
  line-height: 1;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.6rem;
  margin-bottom: 1.25rem;
}
.timeline-axis span {
  position: absolute;
  top: 0;
  left: calc((var(--y) - var(--from-year)) / var(--span) * 100%);
  padding-left: 0.4rem;
  border-left: 1px solid var(--line-strong);
}
.timeline-rows { display: grid; gap: 0.75rem; container-type: inline-size; }
.tl { position: relative; display: flex; }

/* The pill sits at its start year and is at least as wide as its label; the filled part inside is the real time span. */
.tl-bar {
  --len: calc((var(--to) - var(--from)) / var(--span) * 100cqw);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  height: 2.75rem;
  margin-left: calc((var(--from) - var(--from-year)) / var(--span) * 100cqw);
  width: var(--len);
  min-width: max-content;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(160, 146, 255, 0.32);
}
.tl-bar::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
  width: calc(var(--len) + 2px);
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(92, 72, 255, 0.6), rgba(143, 128, 255, 0.3));
  transform-origin: left center;
}
/* Rows that run until now end at today and grow leftwards when the label needs room. */
.tl.is-end .tl-bar {
  margin-left: auto;
  margin-right: calc((var(--from-year) + var(--span) - var(--to)) / var(--span) * 100cqw);
}
.tl.is-end .tl-bar::before { left: auto; right: -1px; transform-origin: right center; }

.tl-label {
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.3;
}
.tl-label b { font-weight: 620; color: var(--text); }
.tl-label span { color: var(--text-2); }
.tl-label .yrs { color: #aaa2d0; font-variant-numeric: tabular-nums; }

.tl.is-own .tl-bar { border-color: rgba(196, 186, 255, 0.6); }
.tl.is-own .tl-bar::before { background: linear-gradient(90deg, #4a33ff, #8f80ff); }
.tl.is-own .tl-label span,
.tl.is-own .tl-label .yrs { color: var(--text); }

.tl.is-now .tl-bar { padding-right: 1.9rem; }
.tl.is-now .tl-bar::after {
  content: "";
  position: absolute;
  right: 0.8rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: -0.25rem;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(240, 195, 90, 0.9);
}

.motion .timeline .tl-bar { opacity: 0; transition: opacity 0.6s var(--ease-out); }
.motion .timeline .tl-bar::before { transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
.motion .timeline.is-visible .tl-bar { opacity: 1; }
.motion .timeline.is-visible .tl-bar::before { transform: none; }
.motion .timeline.is-visible .tl:nth-child(2) .tl-bar, .motion .timeline.is-visible .tl:nth-child(2) .tl-bar::before { transition-delay: 0.08s; }
.motion .timeline.is-visible .tl:nth-child(3) .tl-bar, .motion .timeline.is-visible .tl:nth-child(3) .tl-bar::before { transition-delay: 0.16s; }
.motion .timeline.is-visible .tl:nth-child(4) .tl-bar, .motion .timeline.is-visible .tl:nth-child(4) .tl-bar::before { transition-delay: 0.24s; }
.motion .timeline.is-visible .tl:nth-child(5) .tl-bar, .motion .timeline.is-visible .tl:nth-child(5) .tl-bar::before { transition-delay: 0.32s; }
.motion .timeline.is-visible .tl:nth-child(6) .tl-bar, .motion .timeline.is-visible .tl:nth-child(6) .tl-bar::before { transition-delay: 0.40s; }
.motion .timeline.is-visible .tl:nth-child(7) .tl-bar, .motion .timeline.is-visible .tl:nth-child(7) .tl-bar::before { transition-delay: 0.48s; }
.motion .timeline.is-visible .tl:nth-child(8) .tl-bar, .motion .timeline.is-visible .tl:nth-child(8) .tl-bar::before { transition-delay: 0.56s; }

.sectors {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.sectors li {
  font-size: 0.8125rem;
  font-weight: 560;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text-2);
}

/* ---------- Contact ---------- */

.contact { position: relative; overflow: clip; isolation: isolate; }
.contact::before {
  content: "";
  position: absolute;
  inset: auto -10% -30% -10%;
  height: 70%;
  z-index: -1;
  background: radial-gradient(50% 60% at 50% 100%, rgba(76, 52, 230, 0.28), transparent 70%);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 3rem clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.contact h2 { font-size: clamp(2.25rem, 5.6vw, 5rem); }
.contact-intro { margin-top: 2rem; color: var(--text-2); font-size: 1.125rem; max-width: 30rem; }
.contact-direct { margin-top: 2rem; display: grid; gap: 0.35rem; font-size: 1rem; }
.contact-direct a { font-weight: 600; color: var(--text); }

.form {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(30rem circle at var(--mx, 12%) var(--my, 0%), rgba(110, 90, 255, 0.2), transparent 46%),
    linear-gradient(155deg, rgba(143, 128, 255, 0.1), rgba(14, 12, 26, 0.5) 42%, rgba(14, 12, 26, 0.66));
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(160, 146, 255, 0.14);
  border-radius: var(--radius-l);
  padding: clamp(1.25rem, 3.5vw, 2.75rem);
  display: grid;
  gap: 1.25rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field { display: grid; gap: 0.45rem; }
.field label, .field legend {
  font-size: 0.875rem;
  font-weight: 560;
  color: var(--text);
}
.field .opt { color: var(--text-3); font-weight: 400; }
.field input,
.field textarea {
  width: 100%;
  background: var(--ink-0);
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.field textarea { min-height: 9rem; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: rgba(160, 146, 255, 0.5); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(240, 195, 90, 0.14);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); opacity: 1; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { font-size: 0.8125rem; color: var(--danger); min-height: 0; }
.field-error:empty { display: none; }

fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.15rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-block;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
  color: var(--text-2);
  transition: background-color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.chip input:hover + span { border-color: rgba(160, 146, 255, 0.6); color: var(--text); }
.chip input:checked + span { background: var(--text); border-color: var(--text); color: var(--ink-0); font-weight: 560; }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-top: 0.25rem; }
.form-privacy { font-size: 0.8125rem; color: var(--text-3); max-width: 34ch; }
.form-privacy a { color: var(--text-2); }

.form-status { font-size: 0.9375rem; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--danger); }

.form-done {
  background: var(--ink-1);
  border: 1px solid rgba(240, 195, 90, 0.45);
  border-radius: var(--radius-l);
  padding: clamp(1.5rem, 4vw, 3rem);
}
.form-done h3 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); font-stretch: 125%; font-weight: 700; text-transform: uppercase; line-height: 1; }
.form-done p { margin-top: 1rem; color: var(--text-2); max-width: 40ch; }
.form-done:focus { outline: none; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem 2.5rem;
  font-size: 0.875rem;
  color: var(--text-3);
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}
.footer-brand img { width: 8rem; height: auto; margin-bottom: 1.25rem; }
.footer-legal { display: grid; gap: 0.25rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a { color: var(--text-2); }

/* ---------- Legal page ---------- */

.legal { padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)); padding-bottom: clamp(4rem, 10vw, 8rem); }
.legal h1 { font-size: clamp(2.25rem, 6vw, 4.5rem); margin-bottom: 2.5rem; }
.legal-body { max-width: 66ch; color: var(--text-2); }
.legal-body h2 { color: var(--text); font-size: 1.25rem; font-weight: 640; font-stretch: 112%; margin: 2.5rem 0 0.75rem; }
.legal-body p + p, .legal-body ul + p, .legal-body p + ul { margin-top: 0.9rem; }
.legal-body ul { list-style: disc; padding-left: 1.25rem; }
.legal-body li + li { margin-top: 0.35rem; }
.legal-body strong { color: var(--text); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .nav-list { gap: 1.1rem; }
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .flow-track { display: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header-h: 4rem; }
  .menu-toggle { display: inline-flex; }
  .nav { gap: 0.6rem; }
  .nav-list {
    position: absolute;
    top: calc(var(--header-h) - 1px);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: rgba(7, 6, 13, 0.97);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav[data-open="true"] .nav-list { display: flex; }
  .nav-list a { display: block; padding-block: 0.9rem; font-size: 0.9375rem; border-bottom: 1px solid var(--line); }
  .nav-list li:last-child a { border-bottom: 0; }
  .nav-list a::after { display: none; }
  .header-contact { display: none; }

  .section-head, .case-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .entries-minor { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .hero { grid-template-rows: 1fr auto; }
  .hero-title { font-size: clamp(2.5rem, 13.4vw, 4rem); }
  .hero-title .w3 { justify-self: start; }
  .hero-band { grid-template-columns: 1fr; gap: 1rem; margin-top: 1.1rem; padding-top: 1rem; }
  .hero-sub { font-size: 1.0625rem; max-width: 30ch; }
  .task-field { flex-direction: column; align-items: stretch; padding: 0.375rem; border-radius: 1.25rem; }
  .task-field input { padding-inline: 0.75rem; }
  .task-field .btn { width: 100%; }

  .flow-steps { grid-template-columns: 1fr; row-gap: 2rem; }
  .flow-step { padding-top: 0; padding-left: 2.5rem; }
  .flow-step p { max-width: none; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .timeline-axis span:nth-child(even) { display: none; }
  .timeline-axis span:last-child { transform: translateX(-100%); padding-left: 0; padding-right: 0.4rem; border-left: 0; border-right: 1px solid var(--line-strong); }
  /* Phones: the pill carries the label at full width; a thin line below keeps the years in scale. */
  .tl { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
  .tl-bar,
  .tl.is-end .tl-bar {
    margin: 0;
    width: auto;
    min-width: 0;
    max-width: 100%;
    height: auto;
    padding: 0.55rem 0.9rem;
    background: rgba(92, 72, 255, 0.22);
  }
  .tl.is-now .tl-bar { padding-right: 1.9rem; }
  .tl.is-own .tl-bar { background: linear-gradient(90deg, #4a33ff, #6450ff); }
  .tl-bar::before { display: none; }
  .tl-label { white-space: normal; }
  .tl::after {
    content: "";
    height: 3px;
    border-radius: 3px;
    margin-left: calc((var(--from) - var(--from-year)) / var(--span) * 100%);
    width: calc((var(--to) - var(--from)) / var(--span) * 100%);
    min-width: 6px;
    background: linear-gradient(90deg, #5c48ff, #8f80ff);
  }
}

/* ---------- Motion: strands gather, light switches on ---------- */

.motion .loop { animation: fade-in 1.2s var(--ease-out) backwards; }

.motion .hero-title .w1,
.motion .hero-title .w3 {
  clip-path: inset(-0.6em -0.6em 0 -0.6em);
  animation: unclip 0s linear 1s forwards;
}
.motion .hero-title .w1 > span,
.motion .hero-title .w3 > span { animation: rise 0.8s var(--ease-out) backwards; }
.motion .hero-title .w1 > span { animation-delay: 0.15s; }
.motion .hero-title .w3 > span { animation-delay: 0.3s; }
.motion .hero-title .w3 { animation: unclip 0s linear 1s forwards, ignite 1.2s var(--ease-out) 0.95s backwards; }
.motion .hero-band { animation: band-in 0.7s var(--ease-out) 0.35s backwards; }

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes unclip { to { clip-path: inset(-3em -3em -3em -3em); } }
@keyframes band-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes ignite {
  from {
    color: var(--violet-soft);
    text-shadow: 0 0 0 rgba(196, 186, 255, 0), 0 0 0 rgba(122, 102, 255, 0), 0 0 0 rgba(84, 60, 255, 0);
  }
}

/* Statement: words light up in reading order as it scrolls into place. */
.motion .statement .wd { color: #6f67a6; transition: color 0.5s var(--ease-out); }
.motion .statement .wd.lit { color: var(--text); }

/* Headings rise out of their own baseline. */
.motion [data-reveal="rise"] {
  clip-path: inset(-10% -5% 100% -5%);
  transform: translateY(0.35em);
  transition: clip-path 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.motion [data-reveal="rise"].in { clip-path: inset(-10% -5% -10% -5%); transform: none; }

/* Dictionary: the headword switches from violet to white light as its entry arrives. */
.motion .entry .headword { color: var(--violet); transition: color 0.8s var(--ease-out); }
.motion .entry.in .headword { color: var(--text); }

/* Flow: the four steps light up in order, then the spark starts running. */
.motion .flow-step::before { transition: box-shadow 0.6s var(--ease-out), border-color 0.6s var(--ease-out); }
.motion .flow:not(.in) .flow-step::before { border-color: var(--line-strong); box-shadow: inset 0 0 0 5px var(--ink-0), inset 0 0 0 12px rgba(143, 128, 255, 0.25); }
.motion .flow .flow-step:nth-child(2)::before { transition-delay: 0.3s; }
.motion .flow .flow-step:nth-child(3)::before { transition-delay: 0.6s; }
.motion .flow .flow-step:nth-child(4)::before { transition-delay: 0.9s; }
.motion .flow:not(.in) .flow-runner { animation-play-state: paused; opacity: 0; }

/* Approach: each step's rule draws across, the numeral lights up. */
.step { position: relative; }
.step::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -1px;
  height: 1px;
  background: var(--violet);
  transform-origin: left;
}
.motion .steps .step::after { transform: scaleX(0); transition: transform 0.8s var(--ease-out); }
.motion .steps.in .step::after { transform: scaleX(1); }
.motion .steps .step::before { color: #6f67a6; transition: color 0.6s var(--ease-out); }
.motion .steps.in .step::before { color: var(--violet); }
.motion .steps .step:nth-child(2)::after, .motion .steps .step:nth-child(2)::before { transition-delay: 0.12s; }
.motion .steps .step:nth-child(3)::after, .motion .steps .step:nth-child(3)::before { transition-delay: 0.24s; }
.motion .steps .step:nth-child(4)::after, .motion .steps .step:nth-child(4)::before { transition-delay: 0.36s; }

/* Contact: the Kuveco mark assembled from the same strands as the hero. */
.sign {
  position: relative;
  height: clamp(14rem, 34vw, 30rem);
  margin: calc(clamp(5rem, 13vw, 10rem) * -0.35) 0 clamp(1.5rem, 4vw, 3rem);
}
.sign canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sign img { position: absolute; left: 50%; top: 50%; width: clamp(9rem, 22vw, 15rem); height: auto; transform: translate(-50%, -50%); }
.js .sign img { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .motion .timeline .tl-bar { transform: none; }
  .flow-runner { display: none; }
}

@media print {
  .site-header, .loop, .task, .form, .menu-toggle { display: none !important; }
  html, body { background: #fff; color: #000; }
}
