/* ==========================================================================
   Reset + base
   ========================================================================== */

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

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

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

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

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }

svg { flex-shrink: 0; }

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

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

/* ==========================================================================
   Layout primitives
   ========================================================================== */

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

@media (min-width: 768px) {
  .container { padding-inline: 32px; }
}

.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: 88px;
  position: relative;
}

@media (max-width: 767px) {
  .section { padding-block: 56px; }
}

.section--sunk { background: var(--bg-sunk); }
.section--dark {
  background: linear-gradient(180deg, var(--teal-900), var(--teal-950));
  color: var(--white);
}
.section--dark .section-head p,
.section--dark .stat-item p { color: rgba(255, 255, 255, 0.72); }

/* ==========================================================================
   Typography
   ========================================================================== */

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: clamp(1.75rem, 1.45rem + 1.4vw, 2.5rem);
  margin-bottom: 14px;
}

.section-head p {
  font-size: 1.05rem;
  color: var(--text-soft);
  max-width: 52ch;
}

.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-strong);
  margin-bottom: 14px;
}

.section--dark .eyebrow { color: var(--teal-300); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  padding: 15px 28px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--teal-600);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--teal-700); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.section--dark .btn-primary { background: var(--white); color: var(--teal-800); }
.section--dark .btn-primary:hover { background: var(--teal-100); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-strong); }

.section--dark .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.3); }
.section--dark .btn-ghost:hover { border-color: var(--white); }

.btn-white {
  background: var(--white);
  color: var(--teal-700);
}
.btn-white:hover { background: var(--teal-50); transform: translateY(-1px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--accent-strong);
  transition: gap var(--dur-fast) var(--ease);
}
.link-arrow:hover { gap: 10px; }
.link-arrow svg { width: 18px; height: 18px; }

/* ==========================================================================
   Reveal-on-scroll utility (paired with IntersectionObserver in script.js)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

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

/* stagger children */
.reveal-group > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* ==========================================================================
   Icon sizing helper
   ========================================================================== */

.icon { width: 24px; height: 24px; }
.icon svg { width: 100%; height: 100%; }
