/* ==========================================================================
   base.css - reset, page shell, typography, buttons, utilities
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* keeps anchor targets clear of the fixed navbar */
  scroll-padding-top: calc(var(--nav-h) + var(--sp-5));
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: var(--lh-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

img {
  height: auto;
}

a {
  color: var(--c-cyan);
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

p {
  margin: 0;
}

/* ---------- focus: always visible, never removed ---------- */
:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--c-cyan);
  color: var(--text-ink);
}

/* ---------- skip link ---------- */
.skip-link {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 200;
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-cyan);
  color: var(--text-ink);
  font-weight: 700;
  border-radius: var(--r-sm);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ==========================================================================
   layout helpers
   ========================================================================== */

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

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   type helpers
   ========================================================================== */

.eyebrow {
  display: block;
  margin: 0 0 var(--sp-3);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--c-cyan);
}

.lead {
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text-muted);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
  text-align: left;
}

.section-head h2 {
  font-size: clamp(var(--fs-xl), 1.2rem + 2.4vw, var(--fs-2xl));
}

.section-head p {
  max-width: 48ch;
  color: var(--text-muted);
}

/* ==========================================================================
   buttons
   Button surfaces are solid, never gradients - the page gradient budget is
   spent on section backgrounds instead.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.9em 1.9em;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--c-cyan);
  color: var(--text-ink);
}

.btn--primary:hover {
  background: var(--c-cyan-bright);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.btn--secondary:hover {
  color: var(--c-cyan);
  background: rgba(255, 255, 255, 0.1);
}

.btn--sm {
  padding: 0.6em 1.2em;
  font-size: var(--fs-sm);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

/* ==========================================================================
   motion preferences
   ========================================================================== */

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

  /* One exception. The hero progress fill is not decoration - it is the
     readout of how long the current slide has left, and freezing it would
     leave the dots stuck looking half-filled. The same goes for the swipe
     itself: a slideshow that teleports instead of moving is not a calmer
     slideshow, it is a broken one. Both keep their real duration; everything
     else on the page still goes instant. */
  .slide-dot.is-timing .slide-dot__fill {
    animation-duration: var(--slide-ms, 10000ms) !important;
  }

  .slide {
    transition-duration: var(--t-swipe) !important;
  }
}
