@font-face {
  font-family: 'Archivo';
  src: url('../assets/fonts/archivo-var-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('../assets/fonts/plexmono-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  font-feature-settings: 'ss01' on;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection {
  background: var(--signal);
  color: var(--ink);
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ---------- type system ---------- */

.wordmark {
  font-family: var(--font-sans);
  font-variation-settings: 'wdth' 125, 'wght' 900;
  font-stretch: 125%;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.78;
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.display-1 {
  font-variation-settings: 'wdth' 110, 'wght' 800;
  font-stretch: 110%;
  font-weight: 800;
  font-size: clamp(3.25rem, 9vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

.display-2 {
  font-variation-settings: 'wdth' 110, 'wght' 800;
  font-stretch: 110%;
  font-weight: 800;
  font-size: clamp(2.25rem, 5.5vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.display-3 {
  font-variation-settings: 'wdth' 105, 'wght' 750;
  font-stretch: 105%;
  font-weight: 750;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.body-copy {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--paper-dim);
  max-width: 62ch;
}

.mono-label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.slash-label {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--paper-dim);
}

/* ---------- layout helpers ---------- */

/* Screen-reader and crawler text, visually absent. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.container {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.hairline-t {
  border-top: 1px solid var(--hairline);
}

/* line-mask reveal structure produced by IB.splitLines */
.line {
  display: block;
  overflow: hidden;
}
.line-inner {
  display: block;
  will-change: transform;
}

/* ---------- scrollbar ---------- */

/* The last piece of chrome: an ink track, a quiet thumb, signal on hover. */
html {
  scrollbar-width: thin;
  scrollbar-color: #2c2c2f var(--ink);
}

::-webkit-scrollbar {
  width: 11px;
}

::-webkit-scrollbar-track {
  background: var(--ink);
}

::-webkit-scrollbar-thumb {
  background: #2c2c2f;
  border-left: 1px solid var(--hairline);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--signal);
}

/* ---------- grain ---------- */

.grain {
  position: fixed;
  inset: -20%;
  width: 140%;
  height: 140%;
  z-index: var(--z-grain);
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
}

@media (prefers-reduced-motion: no-preference) {
  .grain {
    animation: grain-shift 0.9s steps(4) infinite;
  }
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
