/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Prevent the sticky header from covering anchor targets on navigation */
[id] {
  scroll-margin-top: var(--header-h);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Solid fallback shown before the video loads or when video fails */
  background-color: #0f0f0f;
  /* overflow-x on html (not body) keeps body at full viewport width,
     preventing the body-shrink bug in Chrome/Edge/Safari mobile */
  overflow-x: hidden;
}

body {
  /* Transparent so the fixed background video (z-index:-2) shows through.
     html { background: #0f0f0f } acts as the solid fallback. */
  background-color: transparent;
  color: var(--color-text);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-heading);
  font-weight: var(--weight-medium);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: var(--text-h1); letter-spacing: -0.03em; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-xl); font-weight: var(--weight-medium); }
h4 { font-size: var(--text-lg); }

p { color: var(--color-text); line-height: var(--leading-loose); }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--color-heading); }

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

ul, ol { list-style: none; }

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.container-lg {
  width: 100%;
  max-width: var(--container-lg);
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.section {
  padding-block: var(--section-py);
}

.section-panel {
  padding-block: var(--section-py);
  background: var(--color-bg-panel);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.section-inner {
  padding-block: var(--section-py);
}

/* Section label */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-label);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.section-label::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-label);
  flex-shrink: 0;
}

.section-heading {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
}

.section-subtext {
  font-size: var(--text-lg);
  color: var(--color-text);
  max-width: 52ch;
  line-height: var(--leading-loose);
}

.section-header-centered {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Flex & Grid helpers */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* Divider */
hr.divider {
  border: none;
  border-top: 1px solid var(--color-border);
}

/* Mono text */
.mono {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Visually hidden */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
