/* Reset + typography defaults */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-black);
  overflow-x: hidden;
  min-height: 100vh;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

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

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, var(--text-7xl));
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(2rem, 4vw, var(--text-5xl));
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h3 {
  font-size: clamp(1.25rem, 2vw, var(--text-2xl));
  font-weight: 600;
  letter-spacing: -0.015em;
}

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

::selection {
  background: var(--nvert-purple);
  color: var(--text-primary);
}

:focus-visible {
  outline: 2px solid var(--nvert-teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Shared layout primitives */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--space-5);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-accent);
}

.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.lede {
  font-size: clamp(var(--text-lg), 1.4vw, var(--text-xl));
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 640px;
}

.on-light .eyebrow  { color: var(--nvert-teal); }
.on-light h1,
.on-light h2,
.on-light h3        { color: var(--text-on-light); }
.on-light p,
.on-light .lede     { color: var(--text-on-light-secondary); }

/* ----- Mobile typography + safe area (≤ 760px) ----- */
@media (max-width: 760px) {
  body {
    line-height: 1.7;
  }

  /* Bump paragraph contrast on dark backgrounds. .on-light p stays untouched
     because that selector has higher specificity than bare `p`. */
  p {
    line-height: 1.7;
    color: #B6C2D2;
  }

  h1 { line-height: 1.08; }

  .eyebrow {
    font-size: 0.8125rem; /* 13px ⟵ 12px */
  }

  /* Respect notch / rounded-corner safe areas — applied to the inner content
     container so the fixed nav and footer can mirror it separately. */
  .container {
    padding-inline:
      max(var(--space-5), env(safe-area-inset-left))
      max(var(--space-5), env(safe-area-inset-right));
  }
}
