/* SEC — base reset + typography + layout primitives */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: var(--color-text-primary);
  background: var(--color-surface-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-surface-strong); }
input, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-6xl); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-5xl); font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
p { margin: 0 0 var(--space-4); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-surface-strong);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--color-surface-strong);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}
.section { padding: var(--space-10) 0; }
.section--tight { padding: var(--space-9) 0; }

.surface-base { background: var(--color-surface-base); color: var(--color-text-primary); }
.surface-muted { background: var(--color-surface-muted); color: var(--color-text-primary); }
.surface-neutral { background: var(--color-surface-neutral); color: var(--color-text-on-neutral); }
.surface-stone { background: var(--color-surface-stone); color: var(--color-text-primary); }
.surface-strong { background: var(--color-surface-strong); color: var(--color-text-on-strong); }

/* Focus styling */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-surface-strong);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* Selection */
::selection { background: var(--color-surface-strong); color: var(--color-text-on-strong); }

/* Utility */
.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;
}
.divider {
  height: 1px;
  background: var(--color-border-muted);
  border: 0;
  margin: var(--space-7) 0;
}

/* Reveal-on-scroll initial state — premium decelerate, 16px distance */
.reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity var(--motion-normal) var(--ease-decelerate),
              transform var(--motion-normal) var(--ease-decelerate);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Sibling stagger — choreograph reveals within a group (1/3 rule, max ~400ms budget) */
.featured-grid .reveal:nth-child(1),
.bento .reveal:nth-child(1),
.stats-grid .reveal:nth-child(1),
.values-grid .reveal:nth-child(1),
.services-grid .reveal:nth-child(1) { transition-delay: 0ms; }

.featured-grid .reveal:nth-child(2),
.bento .reveal:nth-child(2),
.stats-grid .reveal:nth-child(2),
.values-grid .reveal:nth-child(2),
.services-grid .reveal:nth-child(2) { transition-delay: 80ms; }

.featured-grid .reveal:nth-child(3),
.bento .reveal:nth-child(3),
.stats-grid .reveal:nth-child(3),
.values-grid .reveal:nth-child(3),
.services-grid .reveal:nth-child(3) { transition-delay: 160ms; }

.bento .reveal:nth-child(4) { transition-delay: 240ms; }
.bento .reveal:nth-child(5) { transition-delay: 280ms; }
.bento .reveal:nth-child(6) { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
