/* ============================================================
   NULL//POINT — Base styles
   ============================================================ */

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

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

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

body {
  background: var(--void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--accent);
  color: var(--void);
}

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

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--void);
}
::-webkit-scrollbar-thumb {
  background: #26262c;
  border-radius: 8px;
  border: 2px solid var(--void);
}
::-webkit-scrollbar-thumb:hover {
  background: #3a3a44;
}

/* ---- Typography helpers ---- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0;
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Layout ---- */
.container {
  width: min(var(--container-max), calc(100% - clamp(2.5rem, 8vw, 6rem)));
  margin-inline: auto;
}

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
  position: relative;
}

.section-tight {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

/* Section label — "// 01 — MISSION" motif */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}
.section-label::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

.section-title {
  font-size: var(--text-xl);
  max-width: 22ch;
}

.page-head {
  padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem));
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.page-head .lede {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 62ch;
  margin-top: var(--space-sm);
}

/* ---- Dot grid backdrop (static fallback; canvas enhances) ---- */
.dotfield {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.dotfield canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---- Grids ---- */
.grid {
  display: grid;
  gap: var(--space-md);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

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