/* Reset, typography and shared utilities */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg-ink);
  color: var(--text-on-dark);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.35;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
main { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); border-radius: 2px; }
::selection { background: var(--violet); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 999; padding: 10px 14px;
  background: var(--violet); color: #fff; border-radius: var(--radius-s);
  transform: translateY(-200%); transition: transform var(--dur-fast);
}
.skip-link:focus { transform: none; }

.container { width: 100%; padding-inline: var(--gutter); }

[data-theme="dark"] { color: var(--text-on-dark); }
[data-theme="light"] { color: var(--text-on-light); }

/* Type helpers */
.display {
  font-size: var(--fs-display); line-height: 0.98; letter-spacing: var(--tracking-tight);
  font-weight: 500;
}
.h2 { font-size: var(--fs-h2); line-height: 1; letter-spacing: var(--tracking-tight); font-weight: 500; }
.mono {
  font-family: var(--font-mono); font-size: var(--fs-mono); line-height: 1.5;
  letter-spacing: var(--tracking-mono); text-transform: uppercase; font-weight: 400;
}
.caps { font-size: var(--fs-mono); line-height: 1.35; letter-spacing: 0.02em; text-transform: uppercase; font-weight: 500; }
.lead { font-size: var(--fs-lead); line-height: 1.18; letter-spacing: -0.02em; }
.muted { opacity: 0.6; }

/* Rolling text (split per character by assets/js/core/dom.js) */
.roll { display: inline-flex; white-space: pre; }
.roll-c { position: relative; display: inline-block; overflow: hidden; line-height: 1.3; vertical-align: top; }
.roll-c > span { display: block; transition: transform 0.5s var(--ease-out); transition-delay: calc(var(--i) * 14ms); }
.roll-c > span::after { content: attr(data-c); position: absolute; left: 0; top: 100%; }
a:hover .roll-c > span, button:hover .roll-c > span,
a:focus-visible .roll-c > span, button:focus-visible .roll-c > span { transform: translateY(-100%); }

/* Underlined mono CTA — the reference's primary link style */
.cta-line {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 2.5em;
  min-width: clamp(178px, 15.75vw, 280px);
  padding-bottom: 0.9em; border-bottom: 1px solid currentColor;
  font-family: var(--font-mono); font-size: var(--fs-mono); letter-spacing: var(--tracking-mono);
  text-transform: uppercase; line-height: 1.3; white-space: nowrap;
}
.cta-line .arr { display: inline-block; transition: transform var(--dur) var(--ease-out); }
.cta-line:hover .arr, .cta-line:focus-visible .arr { transform: translateX(6px); }

/* Divider with centred plus */
.rule { position: relative; height: 1px; background: currentColor; opacity: 0.18; }
.rule-wrap { position: relative; color: inherit; }
.rule-wrap::after {
  content: "+"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%);
  font-family: var(--font-mono); font-size: 14px; line-height: 1; padding: 0 10px; opacity: 0.7;
}

/* Horizontal "belts" wipe used between dark and light scenes */
.belts { position: absolute; inset: 0; pointer-events: none; z-index: 8; }
.belts i {
  position: absolute; left: 0; width: 100%; height: 10.2%;
  top: calc(var(--n) * 10%); background: var(--belt, var(--bg-lavender-deep));
  transform: scaleY(0); transform-origin: 50% 50%; will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .roll-c > span { transition: none; }
}

html.reduced *, html.reduced *::before, html.reduced *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; }
html.reduced .roll-c > span { transition: none; }
