/* ============================================================
   base.css — Reset, page defaults, typography, layout helpers
   ============================================================ */

/* ---- Modern, gentle reset ---- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

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

body {
  font-family: var(--font-sans);
  font-weight: var(--fw-normal);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--text-on-dark);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* prevent any section from causing sideways scroll on small screens */
  overflow-x: hidden;
}

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

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

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

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

/* ---- Headings ---- */
h1, h2, h3, h4 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  text-wrap: balance; /* nicer multi-line heading wrapping */
}

h1 { font-size: var(--fs-display); font-weight: var(--fw-semibold); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { line-height: var(--lh-base); }

/* ---- Layout helpers ---- */

/* Centered content column with responsive side gutters */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Vertical rhythm for full-width sections */
.section {
  padding-block: var(--section-pad-y);
}

/* Eyebrow / kicker label above headings */
.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Lead paragraph under a heading */
.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-loose);
  color: var(--text-on-dark-muted);
  max-width: min(60ch, 100%); /* readable line length, but never wider than screen */
}

/* Section heading group, centered */
.section-head {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
}

/* Utility */
.text-center { text-align: center; }
.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;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  height: 42px;
  padding-inline: 16px 14px;
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease),
              opacity var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background-color: var(--color-light);
  color: var(--color-ink);
}
.btn--primary:hover { background-color: #ffffff; }

.btn--ghost {
  background-color: transparent;
  color: var(--text-on-dark);
  border-color: rgba(255,255,255,0.25);
}
.btn--ghost:hover { background-color: rgba(255,255,255,0.08); }

.btn .icon { width: 18px; height: 18px; }

/* ---- Text weight utilities ---- */
.fw-semibold { font-weight: var(--fw-semibold); } /* 600 */

/* ---- Focus visibility (accessibility) ---- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Respect reduced-motion preference ---- */
@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;
  }
}
