/* ==========================================================================
   Base Reset, Typography, Grid Containers, Noise Grain & Reveal Motion
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--navy-abyss);
  color: var(--ink-dark);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  background: var(--daylight-bg);
  color: var(--ink-dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Fixed GPU-safe subtle tactile grain overlay (never attached to scrolling containers) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

img {
  height: auto;
}

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

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--brand-gold);
  outline-offset: 3px;
}

/* Skip Link for Keyboard Accessibility */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--brand-gold);
  color: var(--navy-abyss);
  font-weight: 700;
  font-size: var(--text-sm);
  transition: transform var(--dur-fast) var(--ease-fluid);
}

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

/* Typography Hierarchy */
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 700;
}

p {
  margin: 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--daylight-hairline-strong);
  background: rgba(0, 20, 167, 0.05);
  color: var(--brand-cobalt);
}

.eyebrow--dark {
  border-color: rgba(254, 178, 30, 0.32);
  background: rgba(254, 178, 30, 0.1);
  color: var(--brand-gold);
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* Layout Containers & Section Themes */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-pad);
}

.section--daylight {
  background: var(--daylight-bg);
  color: var(--ink-dark);
}

.section--white {
  background: var(--daylight-surface);
  color: var(--ink-dark);
}

.section--dark {
  background: var(--navy-abyss);
  color: var(--ink-light);
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-header__text {
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.section-title {
  font-size: var(--text-3xl);
}

.section-lead {
  font-size: var(--text-lg);
  color: var(--ink-body);
  max-width: 62ch;
}

.section--dark .section-lead {
  color: var(--ink-light-body);
}

/* GPU-Composited Scroll Reveal — defaults to visible when JS off or reduced-motion active */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .js-ready .reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
      opacity var(--dur-slow) var(--ease-fluid),
      transform var(--dur-slow) var(--ease-fluid);
  }

  .js-ready .reveal[data-delay="1"] { transition-delay: 90ms; }
  .js-ready .reveal[data-delay="2"] { transition-delay: 180ms; }
  .js-ready .reveal[data-delay="3"] { transition-delay: 270ms; }

  .js-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

.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;
}
