/* ============================================================
   base.css - reset, tokens, typography, layout primitives
   ============================================================ */

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

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-strong);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

h1, h2, h3, h4, h5, h6, p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:root {
  /* Brand */
  --brand-primary: #5F249F;
  --brand-deep:    #1A0033;
  --brand-accent:  #8A4FFF;

  /* Text */
  --text-strong: #0E0E14;
  --text-muted:  #4A4A55;
  --text-on-dark: #F5F4F8;
  --text-on-dark-muted: #B5B0C5;

  /* Surfaces */
  --surface:        #FFFFFF;
  --surface-muted:  #F5F4F8;
  --surface-dark:   #1A0033;

  /* Lines */
  --hairline: #E4E2EC;
  --hairline-dark: rgba(255, 255, 255, 0.12);

  /* Spacing scale (4px base) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-14: 56px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;
  --s-32: 128px;

  /* Layout */
  --container-max: 1280px;
  --container-pad: clamp(20px, 4vw, 48px);

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 150ms;
  --t-med: 250ms;
  --t-slow: 400ms;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;

  /* Z */
  --z-header: 100;
  --z-overlay: 200;
}

/* Typography ------------------------------------------------- */

.display-1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h1, .h1 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-size: clamp(1.875rem, 3vw, 3rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

h3, .h3 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h4, .h4 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
}

.lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.muted {
  color: var(--text-muted);
}

/* Layout primitives ----------------------------------------- */

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

.section {
  padding-block: clamp(64px, 8vw, 112px);
}

.section--tight {
  padding-block: clamp(48px, 5vw, 72px);
}

.section--dark {
  background: var(--surface-dark);
  color: var(--text-on-dark);
}

.section--muted {
  background: var(--surface-muted);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-8);
  margin-bottom: var(--s-12);
  flex-wrap: wrap;
}

.section-head__title {
  max-width: 720px;
}

.section-head__title .eyebrow {
  display: block;
  margin-bottom: var(--s-3);
}

.grid {
  display: grid;
  gap: var(--s-6);
}

.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Reveal-on-scroll ------------------------------------------
   Only hidden when JS is available - prevents a permanently-blank
   page for crawlers, no-JS users, or capture tools that don't trip
   IntersectionObserver. Each page sets `.js` on <html> inline. */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* 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;
}

/* Skip link ------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--brand-deep);
  color: #fff;
  padding: 12px 16px;
  z-index: 1000;
  border-radius: var(--r-sm);
  transition: top var(--t-fast) var(--ease);
}

.skip-link:focus {
  top: 16px;
}
