html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 6vw + 1rem, 5.5rem); }
h2 { font-size: clamp(2rem, 3.5vw + 0.5rem, 3.5rem); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Mono label */
.mono {
  font-family: var(--font-mono);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.eyebrow-bordered {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  border: 2px solid var(--accent);
  padding: 0.375rem 0.75rem;
  display: inline-block;
}

/* Selection */
::selection {
  background-color: var(--accent);
  color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

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

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

/* Film grain overlay */
/* The noise texture itself is an alpha mask set by main.js; its colour and strength
   are the --noise-color / --noise-opacity custom properties, so the navbar picker
   can change them live. Light themes multiply a dark speckle in; dark themes
   screen a light one on. */
#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--noise-opacity, 0.04);
  mix-blend-mode: multiply;
  background-color: var(--noise-color, #000000);
}

[data-theme="dark"] #grain{
  mix-blend-mode: screen;
  background-color: var(--noise-color, #FFFFFF);
}

@media (max-width: 767px) {
  h3 { font-size: var(--text-lg); }
}
