/* ZIMS Development · tokens, reset, type, buttons */

:root {
  --canvas: #06090F;          /* page and 3D backdrop, a blue-black, never pure black */
  --canvas-2: #0A0F18;
  --panel: #0D131D;           /* cards and raised surfaces */
  --panel-2: #131B28;
  --line: rgba(226, 236, 255, .10);
  --line-strong: rgba(226, 236, 255, .32);   /* interactive borders, 3:1 on the canvas */
  --text: #F1F4F9;
  --text-2: #A9B4C4;
  --text-3: #7F8B9D;
  --accent: #3FD0FF;          /* the call to action and rare emphasis */
  --accent-hover: #8BE3FF;
  --accent-muted: rgba(63, 208, 255, .16);
  --on-accent: #03121C;

  --font-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(.22, .8, .2, 1);
  --ease-inout: cubic-bezier(.65, 0, .35, 1);

  --gutter: clamp(20px, 5vw, 72px);
  --nav-h: 76px;
  --veil: 0;
}

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

html {
  background: var(--canvas);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-h);
}

body {
  margin: 0;
  overflow-x: hidden;          /* alone on body this applies to the viewport, so sticky stages keep working */
  background: var(--canvas);
  color: var(--text-2);
  font: 400 1.0625rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Where clip exists, use it on both: the page can then never be scrolled sideways, even by script. */
@supports (overflow: clip) { html, body { overflow-x: clip; } }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, address { margin: 0; padding: 0; }
[hidden] { display: none !important; }   /* hidden always wins over a component's own display */
ul, ol { list-style: none; }
address { font-style: normal; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

::selection { background: var(--accent); color: var(--on-accent); }

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

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

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-weight: 500;
  transform: translateY(-200%);
  transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

.wrap {
  width: min(100% - 2 * var(--gutter), 1320px);
  margin-inline: auto;
}

/* ---------- Type ---------- */

.display, .headline, .subhead {
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 300;
  text-wrap: balance;
}
.display {
  font-size: clamp(2.5rem, min(6.1vw, 9.6vh), 5.75rem);
  line-height: 1.02;
  letter-spacing: -.04em;
}
.display--center { text-align: center; }
.headline {
  font-size: clamp(2.05rem, 4.5vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -.035em;
}
.headline--tight { font-size: clamp(1.9rem, 3.5vw, 3.2rem); }
.subhead {
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}
.subhead--small { font-size: 1.375rem; letter-spacing: -.02em; }

/* The one serif voice: a single emphasised word per headline. */
.display em, .headline em, .subhead em, .values em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -.015em;
  line-height: 1;
}

.lede {
  max-width: 34rem;
  color: var(--text-2);
  font-size: clamp(1.0625rem, 1.25vw, 1.1875rem);
  line-height: 1.6;
}

.kicker {
  display: flex; align-items: baseline; gap: 14px;
  color: var(--text-3);
  font: 400 .75rem/1.4 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
@media (max-width: 559px) { .kicker { gap: 10px; font-size: .6875rem; letter-spacing: .1em; } .kicker b { padding-right: 30px; } .kicker b::after { width: 20px; } }
.wide-only { display: none; }
@media (min-width: 560px) { .wide-only { display: inline; } }

.kicker b {
  position: relative;
  padding-right: 38px;
  color: var(--accent);
  font-weight: 400;
}
.kicker b::after {
  content: ""; position: absolute; right: 0; top: 50%;
  width: 26px; height: 1px; background: var(--line-strong);
}

.link {
  color: var(--text);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: color .3s var(--ease), background-size .4s var(--ease);
}
.link:hover { color: var(--accent-hover); background-size: 0 1px; background-position: 100% 100%; }

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

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 28px;
  border-radius: 999px;
  color: var(--text);
  font: 500 .9375rem/1 var(--font-body);
  letter-spacing: .005em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn svg { width: 16px; height: 16px; transition: transform .45s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn--small { min-height: 42px; padding: 0 20px; font-size: .875rem; }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary::before {           /* a slow sheen that crosses on hover, transform only */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease);
}
.btn--primary:hover::before { transform: translateX(120%); }

.btn--ghost { border: 1px solid var(--line-strong); }
.btn--ghost::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(226, 236, 255, .08);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.btn--ghost:hover { border-color: var(--text); }
.btn--ghost:hover::before { opacity: 1; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.actions--center { justify-content: center; }

/* ---------- The fixed 3D stage ---------- */

.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
/* Phones: size the stage to the tallest viewport so the browser bar sliding away never resizes the 3D canvas. */
@supports (height: 100lvh) { .stage { bottom: auto; height: 100lvh; } }
.stage__canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0;
  transition: opacity 1.4s var(--ease);
}
[data-scene="on"] .stage__canvas { opacity: 1; }
[data-scene="off"] .stage__canvas { display: none; }

/* Dims the scene behind text-heavy moments. Driven by the scene itself. */
.stage__veil {
  position: absolute; inset: 0;
  background: var(--canvas);
  opacity: var(--veil);
}
.stage__grain {
  position: absolute; inset: 0;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Without the 3D scene the page still sits in one lit room. */
[data-scene="off"] .stage {
  background:
    radial-gradient(60% 50% at 78% 18%, rgba(63, 208, 255, .10), transparent 70%),
    radial-gradient(50% 45% at 12% 78%, rgba(28, 125, 255, .08), transparent 70%);
}

.stage__labels { position: absolute; inset: 0; }
.node-label {
  position: absolute; left: 0; top: 0;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 12, 20, .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text);
  font: 400 .6875rem/1 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}

main, .footer { position: relative; z-index: 2; }

/* ---------- Entrances (live mode only; plain HTML shows everything) ---------- */

.js-live [data-reveal] { opacity: 0; }
.js-live [data-split] { visibility: hidden; }
.js-live [data-split].is-split { visibility: visible; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .06em .2em; margin: -.08em -.06em -.2em; }
.wi { display: inline-block; will-change: transform; }

body.is-paused *, body.is-paused *::before, body.is-paused *::after { animation-play-state: paused !important; }

@media (pointer: coarse) {
  .btn { min-height: 52px; }
  .btn--small { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
