/* Reset-lite + document defaults + the v2 atmosphere.
   The page is a grainy chromatic field; everything usable sits on glass. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  min-height: 100dvh;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  background: var(--bg-page);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

/* Chromatic mesh - fixed, painted once, cheap to composite. */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42% 34% at 12% 8%, var(--mesh-a), transparent 70%),
    radial-gradient(38% 30% at 88% 12%, var(--mesh-b), transparent 70%),
    radial-gradient(46% 38% at 78% 92%, var(--mesh-c), transparent 70%),
    radial-gradient(30% 26% at 18% 88%, var(--mesh-b), transparent 72%);
  filter: blur(48px);
  opacity: var(--mesh-opacity);
}

/* Film grain - SVG turbulence, tiled. Keeps the gradients from feeling sterile. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 { line-height: 1.2; font-weight: 650; }

/* The display voice: pixel type for titles and moments, never body copy. */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
}

a { color: inherit; }

button { font: inherit; color: inherit; }

img, svg { display: block; max-width: 100%; }

svg.ri { flex: none; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-ctl); }

.mono { font-family: var(--font-mono); font-size: var(--text-sm); }

/* Glass surface - one recipe, used everywhere. */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-border);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
