/* ==========================================================================
   base.css — reset, base typography, layout primitives, buttons, section
   wrappers, reveal. Depends on tokens.css.
   ========================================================================== */

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

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

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* Reduced motion: kill smooth scroll + all transitions/animations globally --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Typography --------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--ink);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-display);
  font-weight: var(--fw-black);
  letter-spacing: var(--ls-display);
}
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { text-wrap: pretty; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--brand-2); }

strong, b { font-weight: var(--fw-bold); }

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

/* Section wrappers --------------------------------------------------------- */
.section {
  padding-block: var(--section-y);
}
.section--alt {
  background: var(--bg-alt);
}
.section--ink {
  background: var(--ink);
  color: var(--on-dark);
}
.section--ink h1,
.section--ink h2,
.section--ink h3,
.section--ink h4 { color: var(--on-dark); }
.section--ink .section-lead,
.section--ink p { color: var(--on-dark-muted); }

/* Centered heading block --------------------------------------------------- */
.section-head {
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--brand);
}
.section--ink .eyebrow { color: #6DB2FF; }
.section-title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  color: var(--ink);
}
.section--ink .section-title { color: var(--on-dark); }
.section-lead {
  margin-top: var(--space-4);
  font-size: var(--fs-lead);
  color: var(--muted);
}

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85em 1.6em;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 123, 255, .28);
}
.btn--primary:hover {
  background: var(--brand-2);
  border-color: var(--brand-2);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 123, 255, .34);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}
/* Ghost on a dark surface */
.section--ink .btn--ghost,
.hero .btn--ghost {
  border-color: var(--on-dark-line);
  color: var(--on-dark);
}
.section--ink .btn--ghost:hover,
.hero .btn--ghost:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,.08);
}

.btn--light {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
.btn--light:hover {
  background: rgba(255,255,255,.9);
  color: var(--ink);
}

/* Accessibility helpers ---------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 1000;
  padding: 10px 18px;
  background: #fff;
  color: var(--ink);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus {
  top: 12px;
  color: var(--ink);
}

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

/* Scroll-reveal ------------------------------------------------------------ */
/* No-JS fallback = fully visible: the hidden state is scoped to .has-js, which
   main.js (or the inline head snippet) stamps on <html> before paint. */
.has-js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-reveal) var(--ease),
              transform var(--dur-reveal) var(--ease);
  will-change: opacity, transform;
}
.has-js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .has-js .reveal { opacity: 1; transform: none; transition: none; }
}
