:root {
  --bg: #0a090c;
  --bg-1: #0e0d12;
  --bg-2: #131118;
  --bg-3: #191621;

  --ink: #eae8ee;
  --ink-2: #b0adb9;
  --ink-3: #8f8c9b;
  --ink-4: #7e7b8a;

  --line: rgba(234, 232, 238, 0.09);
  --line-2: rgba(234, 232, 238, 0.17);
  --line-3: rgba(234, 232, 238, 0.3);

  --accent: #bb9bdd;
  --accent-2: #cab2dc;
  --accent-rgb: 154, 99, 212;
  --ink-rgb: 234, 232, 238;

  --font-display: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --t-display: clamp(3.5rem, 17vw, 16rem);
  --t-xxl: clamp(2.75rem, 10vw, 8.5rem);
  --t-xl: clamp(2.25rem, 6.5vw, 5.5rem);
  --t-l: clamp(1.75rem, 4vw, 3.25rem);
  --t-m: clamp(1.3rem, 2.4vw, 2rem);
  --t-body: clamp(0.95rem, 0.55vw + 0.82rem, 1.0625rem);
  --t-small: 0.8125rem;
  --t-meta: 0.6875rem;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1680px;
  --section: clamp(6rem, 14vh + 4rem, 13rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.85s;
  --dur-fast: 0.4s;

  --nav-h: 5rem;
}

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

* { margin: 0; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: 0.004em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

p { text-wrap: pretty; }

ul, ol { list-style: none; padding: 0; }

[id] {
  scroll-margin-top: calc(var(--nav-h) + 2rem);
}

::selection {
  background: var(--accent);
  color: #17121f;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

:focus:not(:focus-visible) { outline: none; }

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

.skip-link {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 0.9rem 1.4rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: var(--t-meta);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transform: translateY(-120%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus { transform: translateY(0); }

.grain {
  position: fixed;
  inset: -50%;
  z-index: 900;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  will-change: transform;
  animation: grain-shift 8s steps(6) infinite;
}

@keyframes grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  16%  { transform: translate3d(-2%, 1%, 0); }
  33%  { transform: translate3d(1%, -2%, 0); }
  50%  { transform: translate3d(-1%, 2%, 0); }
  66%  { transform: translate3d(2%, 1%, 0); }
  83%  { transform: translate3d(-2%, -1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 899;
  pointer-events: none;
  background: radial-gradient(140% 100% at 50% 12%, transparent 55%, rgba(0, 0, 0, 0.42) 100%);
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2632; }
::-webkit-scrollbar-thumb:hover { background: #3a3446; }

html { scrollbar-color: #2a2632 var(--bg); scrollbar-width: thin; }

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