/* =========================================================
   DVOE — landing page styles
   Minimal black & white, inspired by the logo
   ========================================================= */

:root {
  --bg: #000;
  --bg-alt: #070707;
  --surface: #0d0d0d;
  --fg: #fff;
  --muted: #8f8f8f;
  --muted-2: #5c5c5c;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);

  /* Pastel palette — the UI stays monochrome until hover */
  --p-pink: #f7b8d0;
  --p-peach: #fbcfa8;
  --p-lemon: #f4e6a0;
  --p-mint: #b3e8cd;
  --p-sky: #acd4f6;
  --p-lavender: #cdbcf6;
  --accent: var(--p-lavender);
  --on-accent: #0b0b0b;
  --color-speed: .55s;

  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 18px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--fg); color: var(--bg); }

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--bg);
  border-radius: 8px;
  font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Shared bits ---------- */

.underline {
  width: min(320px, 60%);
  height: 6px;
  margin: 28px 0;
  background: var(--fg);
  border-radius: 99px;
  transform-origin: left;
}

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


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 28px;
  border-radius: 99px;
  border: 1px solid var(--fg);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: color var(--color-speed) var(--ease), border-color var(--color-speed) var(--ease), transform .3s var(--ease);
}
/* pastel fill sweeps in on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--color-speed) var(--ease);
}
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn:hover { color: var(--on-accent); border-color: var(--accent); }
.btn:active { transform: scale(.97); }

.btn--light { background: var(--fg); color: var(--bg); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }

.btn--small { height: 42px; padding: 0 20px; font-size: 14px; }
.btn--block { width: 100%; }

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

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: border-color .3s;
  border-bottom: 1px solid transparent;
}
/* The scrolled backdrop lives on a pseudo-element: a backdrop-filter on .header itself would make it
   the containing block of the fixed full-screen .nav inside it and clip the open menu to the header. */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transition: background .3s, backdrop-filter .3s, -webkit-backdrop-filter .3s;
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header.is-scrolled::before {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header__inner {
  position: relative;
  z-index: 2; /* stays above the menu overlay */
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(16px, 2.4vw, 32px);
}
/* header logo is tinted lavender, as in the game concept */
.header .brand { --c: 17px; }
.header .brand__icon { color: var(--p-lavender); }
.header .brand__line { background: var(--p-lavender); }
.header .logo:hover .brand__icon { color: var(--fg); }
.header .logo:hover .brand__line { background: var(--fg); }

/* Brand mark — proportions measured from the original logo.
   --c is the cap height of "DVOE"; every other size derives from it. */
.brand {
  --c: 15px;
  display: inline-flex;
  align-items: center;
  gap: calc(var(--c) * .67);
  flex-shrink: 0;
  color: var(--fg);
}
.brand__icon {
  height: calc(var(--c) * 1.63);
  width: auto;
  aspect-ratio: 362 / 177;
  margin-bottom: calc(var(--c) * .34); /* icon sits slightly higher than the word, as in the original */
  overflow: visible;
  transition: color var(--color-speed) var(--ease);
}
.brand__word {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.brand__text {
  display: block;
  font-family: "Archivo", var(--font-display);
  font-weight: 800;
  font-stretch: 125%;
  font-size: calc(var(--c) / .7);
  letter-spacing: -.055em;
  line-height: 1;
  white-space: nowrap;
  margin: -.135em 0 -.165em; /* trim the line box down to the cap height */
}
.brand__line {
  display: block;
  width: calc(var(--c) * 9.1);
  height: calc(var(--c) * .17);
  margin-top: calc(var(--c) * .37);
  border-radius: 99px;
  background: currentColor;
  transform-origin: left;
  transition: background var(--color-speed) var(--ease);
}
.logo:hover .brand__icon { color: var(--accent); }
.logo:hover .brand__line { background: var(--accent); }

/* Full-screen menu */
.nav {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  background: rgba(5, 5, 7, .7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s var(--ease), visibility .4s;
}
.nav.is-open { opacity: 1; visibility: visible; }
.nav__inner {
  width: min(500px, 100%);
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: calc(var(--header-h) + 16px) clamp(24px, 4vw, 52px) 36px;
  background: var(--bg-alt);
  border-left: 1px solid var(--line);
  transform: translateX(48px);
  transition: transform .55s var(--ease);
}
.nav.is-open .nav__inner { transform: none; }
.nav__list { display: flex; flex-direction: column; }
.nav__link {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 30px);
  transition: color var(--color-speed) var(--ease), padding-left .4s var(--ease);
}
.nav__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: color var(--color-speed);
}
.nav__link:hover { color: var(--accent); padding-left: 8px; }
.nav__link:hover .nav__num,
.nav__link.is-active .nav__num { color: var(--accent); }
.nav__footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.nav__cta { --accent: var(--p-pink); }
.nav__social { font-size: 14px; color: var(--muted); transition: color var(--color-speed); --accent: var(--p-pink); }
.nav__social:hover { color: var(--accent); }

.header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lang {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 99px;
}
.lang__btn {
  min-width: 40px;
  height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--muted);
  transition: background var(--color-speed), color var(--color-speed);
}
.lang__btn:hover { color: var(--accent); }
.lang__btn.is-active { background: var(--fg); color: var(--bg); }
.lang__btn.is-active:hover { background: var(--accent); color: var(--on-accent); }
.lang__btn[data-lang="uk"] { --accent: var(--p-sky); }
.lang__btn[data-lang="en"] { --accent: var(--p-lemon); }

.burger {
  width: 44px;
  height: 44px;
  position: relative;
  --accent: var(--p-lavender);
}
.burger:hover span { background: var(--accent); }
.burger span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  border-radius: 2px;
  background: var(--fg);
  transition: transform .35s var(--ease), top .35s var(--ease), opacity .25s, background var(--color-speed);
}
.burger span:nth-child(1) { top: 13px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 29px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------- Game (interactive 3D menu on the first screen) ---------- */

.game {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background: #16161c;
  isolation: isolate;
}
.game__stage { position: absolute; inset: 0; }
.game__stage canvas { display: block; width: 100%; height: 100%; outline: none; }
.game.is-hovering .game__stage { cursor: pointer; }
.game.is-busy .game__stage { cursor: progress; }

.game__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 68% at 50% 50%, transparent 64%, rgba(0, 0, 0, .38) 100%),
    linear-gradient(to bottom, transparent 82%, var(--bg) 100%);
}

.game__labels { position: absolute; inset: 0; pointer-events: none; }
.game-label {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #e7e7ee;
  pointer-events: auto;
  opacity: 0;
  transform: translate3d(var(--x, -999px), var(--y, -999px), 0) translate(-50%, -100%);
  transition: opacity .6s var(--ease), color var(--color-speed);
  will-change: transform;
}
.game.is-ready .game-label { opacity: 1; }
.game.is-busy .game-label:not(.is-active) { opacity: .35; }
.game-label__text {
  /* two-word labels break onto two lines, as in the concept ("OUR / PROJECTS") */
  white-space: normal;
  max-width: 11ch;
  line-height: 1.3;
  text-align: left;
}
.game-label__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--p-lavender);
  box-shadow: 0 0 10px color-mix(in srgb, var(--p-lavender) 80%, transparent);
  transition: background var(--color-speed), box-shadow var(--color-speed), transform .4s var(--ease);
}
.game-label:hover,
.game-label.is-hover,
.game-label.is-active { color: var(--accent); }
.game-label:hover .game-label__dot,
.game-label.is-hover .game-label__dot,
.game-label.is-active .game-label__dot {
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
  transform: scale(1.3);
}
.game-label[data-station="about"]    { --accent: var(--p-lavender); }
.game-label[data-station="services"] { --accent: var(--p-peach); }
.game-label[data-station="projects"] { --accent: var(--p-sky); }
.game-label[data-station="lab"]      { --accent: var(--p-mint); }
.game-label[data-station="products"] { --accent: var(--p-lemon); }
.game-label[data-station="contact"]  { --accent: var(--p-pink); }

.game__explore,
.game__minimap {
  position: absolute;
  bottom: clamp(16px, 4vh, 40px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(12, 12, 15, .72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.game__explore {
  left: clamp(16px, 2.4vw, 32px);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 268px;
  max-width: calc(100% - 32px - 170px);
  padding: 15px 20px 16px 18px;
}
.game__explore::after { /* connector line, as in the concept */
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  width: 64px;
  height: 1px;
  background: linear-gradient(to right, var(--line-strong), transparent);
}
.game__explore-bullet {
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--accent, var(--p-lavender));
  box-shadow: 0 0 10px var(--accent, var(--p-lavender));
  transition: background var(--color-speed), box-shadow var(--color-speed);
}
.game__explore-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.game__explore-hint { margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--muted); }

.game__minimap {
  right: clamp(16px, 2.4vw, 32px);
  width: 152px;
  height: 86px;
  padding: 6px;
}
.game__minimap { cursor: pointer; }
.game__minimap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.minimap__floor { fill: rgba(255, 255, 255, .025); }
.minimap__grid polyline { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: .6; }
.minimap__routes polyline { fill: none; stroke: rgba(205, 188, 246, .22); stroke-width: .8; stroke-dasharray: 2 2; }
.minimap__trail { fill: none; stroke: var(--p-lavender); stroke-width: 1.2; stroke-dasharray: 2.5 1.8; stroke-linecap: round; }
.minimap__home { fill: rgba(205, 188, 246, .18); stroke: rgba(205, 188, 246, .55); stroke-width: .7; }
.minimap__station {
  fill: rgba(255, 255, 255, .05);
  stroke: rgba(255, 255, 255, .32);
  stroke-width: .9;
  stroke-linejoin: round;
  transition: fill .3s, stroke .3s;
}
.minimap__station.is-hover,
.minimap__station.is-active { fill: color-mix(in srgb, var(--accent) 40%, transparent); stroke: var(--accent); }
.minimap__dot { fill: var(--p-lavender); }
.minimap__pulse { fill: none; stroke: var(--p-lavender); stroke-width: .8; transform-box: fill-box; transform-origin: center; animation: mm-pulse 1.8s ease-out infinite; }
@keyframes mm-pulse { from { transform: scale(.6); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }
.minimap__frame { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: .8; stroke-linejoin: round; }

/* colour wipe when the character enters a station */
.veil {
  position: fixed;
  inset: 0;
  z-index: 95; /* under the header so the logo stays put */
  pointer-events: none;
  visibility: hidden;
  background:
    radial-gradient(circle at var(--vx, 50%) var(--vy, 50%),
      color-mix(in srgb, var(--accent, #cdbcf6) 70%, #0b0a10) 0,
      color-mix(in srgb, var(--accent, #cdbcf6) 22%, #08080b) 22%,
      #050507 60%);
}
.veil.is-on { visibility: visible; }

.game__loader {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 2px solid var(--line);
  border-top-color: var(--p-lavender);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transition: opacity .4s;
}
.game.is-ready .game__loader,
.game.is-fallback .game__loader { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* No WebGL: the labels turn into a simple grid of links */
.game.is-fallback { height: auto; min-height: 100svh; display: flex; align-items: center; }
.game.is-fallback .game__stage,
.game.is-fallback .game__minimap,
.game.is-fallback .game__vignette { display: none; }
.game.is-fallback .game__labels {
  position: relative;
  inset: auto;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: calc(var(--header-h) + 32px) var(--gutter) 140px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.game.is-fallback .game-label {
  position: static;
  transform: none;
  opacity: 1;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* ---------- Marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; flex-shrink: 0; }
.marquee__list li {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-right: 48px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--muted-2);
  white-space: nowrap;
  transition: color var(--color-speed);
}
.marquee__list li::after {
  content: "";
  width: 8px;
  height: 8px;
  border: 2px solid var(--muted-2);
  border-radius: 2px;
  transition: border-color var(--color-speed), transform var(--color-speed) var(--ease);
}
.marquee__list li:hover { color: var(--accent); }
.marquee__list li:hover::after { border-color: var(--accent); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

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

.section { padding: clamp(90px, 12vw, 160px) 0; }
.section--alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 24px;
  row-gap: 18px;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.section__index {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  align-self: center;
  justify-self: start;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -.02em;
}
.section__subtitle {
  grid-column: 2;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
}

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

.about {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.about__text p + p { margin-top: 20px; }
.about__text p { color: var(--muted); }
.about__text .about__lead {
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.35;
  margin-bottom: 32px;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.stat {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background var(--color-speed);
}
.stat:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.stat__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  transition: color var(--color-speed);
}
.stat:hover .stat__value { color: var(--accent); }
.stat__label { color: var(--muted); font-size: 15px; line-height: 1.4; }

.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(60px, 8vw, 110px);
}
.value {
  padding: 36px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--color-speed), background var(--color-speed), transform .4s var(--ease);
}
.value:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  transform: translateY(-4px);
}
.value__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: color var(--color-speed);
}
.value__title::before {
  content: "";
  width: 22px;
  height: 4px;
  border-radius: 99px;
  background: var(--fg);
  transition: background var(--color-speed), width var(--color-speed) var(--ease);
}
.value:hover .value__title { color: var(--accent); }
.value:hover .value__title::before { background: var(--accent); width: 36px; }
.value p { color: var(--muted); font-size: 16px; }

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.service {
  position: relative;
  padding: 44px 36px 48px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform .5s var(--ease);
}
.service:hover::before { transform: translateY(0); }
.service:hover,
.service:hover p,
.service:hover .service__num { color: var(--on-accent); }
.service { transition: color var(--color-speed); }
.service__num {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 56px;
  transition: color .3s;
}
.service__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 14px;
}
.service p { color: var(--muted); font-size: 16px; transition: color .3s; }

/* ---------- Projects ---------- */

.projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.project {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--color-speed), box-shadow var(--color-speed), transform .5s var(--ease);
}
.project:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--accent) 70%, transparent);
}
/* tint the monochrome preview with the pastel accent */
.project__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity var(--color-speed) var(--ease);
  pointer-events: none;
}
.project:hover .project__media::after { opacity: 1; }
.project__meta span,
.project__title,
.project__link,
.badge { transition: color var(--color-speed), border-color var(--color-speed); }
.project:hover .project__title { color: var(--accent); }
.project:hover .project__meta span { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.project:hover .project__link { color: var(--accent); border-color: var(--accent); }
.project:hover .badge { color: var(--accent); border-color: var(--accent); }

.project__media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #0a0a0a;
}
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.project:hover .project__media img { transform: scale(1.04); }

.badge {
  position: absolute;
  z-index: 1;
  top: 18px;
  left: 18px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.project__body { padding: 32px 32px 36px; display: flex; flex-direction: column; flex: 1; }
.project__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.project__meta span {
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 13px;
  color: var(--muted);
}
.project__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -.01em;
  margin-bottom: 12px;
}
.project__text { color: var(--muted); margin-bottom: 28px; }
.project__link {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 700;
  font-size: 15px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--line-strong);
  color: var(--muted);
}

.project-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 36px 40px;
  border: 1px dashed var(--line-strong);
  border-radius: calc(var(--radius) + 6px);
  transition: background var(--color-speed) var(--ease), color var(--color-speed) var(--ease), border-color var(--color-speed);
  --accent: var(--p-peach);
}
.project-cta__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 30px);
}
.project-cta__action { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; }
.arrow { display: inline-block; font-size: 1.4em; transition: transform .4s var(--ease); }
.project-cta:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); border-style: solid; }
.project-cta:hover .arrow { transform: translateX(8px); }

/* ---------- Process ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: 40px;
}
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: -20px;
  height: 2px;
  background: var(--line);
}
.step:last-child::before { right: 0; }
.step::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 0 6px var(--bg-alt);
  transition: background var(--color-speed), transform var(--color-speed) var(--ease);
}
.step__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 54px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line-strong);
  margin-bottom: 24px;
  transition: color var(--color-speed), -webkit-text-stroke-color var(--color-speed);
}
.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  margin-bottom: 12px;
  transition: color var(--color-speed);
}
.step:hover::after { background: var(--accent); transform: scale(1.5); }
.step:hover .step__num { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.step:hover .step__title { color: var(--accent); }
.step p { color: var(--muted); font-size: 16px; }

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

.contact__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(48px, 8vw, 120px);
  align-items: start;
}
.contact__info .section__index { display: inline-block; margin-bottom: 28px; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.1;
  letter-spacing: -.02em;
}
.contact__lead { color: var(--muted); font-size: 18px; max-width: 460px; }

.contact__list { margin-top: 48px; border-top: 1px solid var(--line); }
.contact__list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.contact__label { color: var(--muted); font-size: 14px; padding-top: 2px; }
.contact__list a { font-weight: 600; transition: color var(--color-speed); }
.contact__list a:hover { color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 20px; }
.social-link { display: inline-flex; align-items: center; gap: 10px; }
.social-link__icon { width: 20px; height: 20px; flex-shrink: 0; }

.form {
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.field { position: relative; }
.field__input {
  width: 100%;
  padding: 22px 0 10px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--fg);
  font: inherit;
  font-size: 17px;
  outline: none;
  resize: vertical;
  transition: border-color var(--color-speed);
}
.field__input:hover { border-bottom-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.field__input:focus { border-bottom-color: var(--accent); }
.field__input.is-invalid { border-bottom-color: #ff6b6b; }
.field__label {
  position: absolute;
  left: 0;
  top: 22px;
  color: var(--muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .25s var(--ease), color .25s;
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label {
  transform: translateY(-22px) scale(.8);
  color: var(--fg);
}
.field__input:focus + .field__label { color: var(--accent); }
.form__note { min-height: 1.5em; font-size: 14px; color: var(--muted); text-align: center; }
.form__note.is-error { color: #ff6b6b; }

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

.footer { border-top: 1px solid var(--line); padding: 48px 0; }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.logo--footer { --c: 12px; }
.footer__tagline, .footer__copy { color: var(--muted); font-size: 14px; }
.footer__social {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: color var(--color-speed), border-color var(--color-speed), background var(--color-speed);
  --accent: var(--p-pink);
}
.footer__social svg { width: 20px; height: 20px; }
.footer__social:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* ---------- Pastel accents (assigned per element, shown only on hover) ---------- */

.logo { --accent: var(--p-lavender); }
.form { --accent: var(--p-mint); }
.form .btn { --accent: var(--p-sky); }
.contact__list a[href^="mailto"] { --accent: var(--p-sky); }
.social-link { --accent: var(--p-pink); }

:is(.nav__list > li, .marquee__list li, .stat, .value, .service, .project, .step, .card):nth-child(6n+1) { --accent: var(--p-pink); }
:is(.nav__list > li, .marquee__list li, .stat, .value, .service, .project, .step, .card):nth-child(6n+2) { --accent: var(--p-sky); }
:is(.nav__list > li, .marquee__list li, .stat, .value, .service, .project, .step, .card):nth-child(6n+3) { --accent: var(--p-mint); }
:is(.nav__list > li, .marquee__list li, .stat, .value, .service, .project, .step, .card):nth-child(6n+4) { --accent: var(--p-lemon); }
:is(.nav__list > li, .marquee__list li, .stat, .value, .service, .project, .step, .card):nth-child(6n+5) { --accent: var(--p-lavender); }
:is(.nav__list > li, .marquee__list li, .stat, .value, .service, .project, .step, .card):nth-child(6n+6) { --accent: var(--p-peach); }

/* project cards get their own fixed colours */
.projects .project:nth-child(1) { --accent: var(--p-mint); }
.projects .project:nth-child(2) { --accent: var(--p-lavender); }

/* ---------- Logo keys (inlined SVG, single keys can light up) ---------- */

.brand__icon rect { transition: stroke .2s; }
.logo .brand__icon rect.is-on { stroke: var(--fg); }

/* ---------- Intro ---------- */

.intro { display: none; }
.intro-on body { overflow: hidden; }
.intro-on .header .logo { visibility: hidden; }

.intro-on .intro {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

/* Same .brand component as the header, just with a bigger --c, so it can dock exactly */
.intro__logo {
  --c: clamp(22px, 5.6vw, 60px);
  transform-origin: 0 0;
  will-change: transform;
}
.intro__logo .brand__icon { opacity: 0; }
.intro__logo .brand__icon rect.is-on {
  stroke: var(--p-lavender);
  filter: drop-shadow(0 0 6px var(--p-lavender));
}
.intro__letter { display: inline-block; opacity: 0; }
.intro__logo .brand__line {
  background: var(--p-lavender);
  box-shadow: 0 0 calc(var(--c) * .5) color-mix(in srgb, var(--p-lavender) 60%, transparent);
  transform: scaleX(0);
}
.intro__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 32px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  opacity: 0;
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Cards (products, lab) ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  padding: 34px 32px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color var(--color-speed), background var(--color-speed), transform .4s var(--ease);
}
.card:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
  transform: translateY(-4px);
}
.card__badge {
  align-self: flex-start;
  margin-bottom: 44px;
  padding: 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--color-speed), border-color var(--color-speed);
}
.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  margin-bottom: 12px;
  transition: color var(--color-speed);
}
.card p { color: var(--muted); font-size: 16px; }
.card:hover .card__title,
.card:hover .card__badge { color: var(--accent); border-color: var(--accent); }

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

@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; }
  .about, .contact__inner { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 56px; }
  .step:nth-child(2n)::before { right: 0; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .projects { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .service__num { margin-bottom: 32px; }
  .section__head { grid-template-columns: 1fr; }
  .section__subtitle { grid-column: 1; }
  .project-cta { padding: 28px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .game-label { font-size: 11px; gap: 7px; letter-spacing: .06em; }
  .game__explore { min-width: 0; padding: 12px 14px; gap: 10px; }
  .game__explore::after { display: none; }
  .game__explore-hint { font-size: 12px; }
  .game__minimap { width: 112px; height: 64px; }
}

@media (max-width: 520px) {
  .header .brand { --c: 11px; }
  .header__actions { gap: 10px; }
  .steps { grid-template-columns: 1fr; }
  .step::before { right: 0; }
  .contact__list li { grid-template-columns: 1fr; gap: 4px; }
  .stat { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html { scroll-behavior: auto; }
  .marquee__track { animation: none; }
}
