/* ============================================================================
   base.css — reset, typography, layout primitives, buttons, utilities, motion
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

/* — Typography — */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.h-display { font-size: clamp(2.5rem, 5.8vw, 4.6rem); font-weight: 600; line-height: 1.02; letter-spacing: -0.035em; }
h1, .h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2, .h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
h3, .h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.02em; }
h4, .h4 { font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
p { color: var(--ink-2); }
strong { font-weight: 600; color: var(--ink); }

.eyebrow {
  font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-700);
}
.eyebrow--light { color: var(--cyan); }
.lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--ink-2); line-height: 1.65; }
.serif { font-family: var(--font-serif); letter-spacing: 0; }

/* — Layout — */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--wide { max-width: var(--container-wide); }
.section { padding-block: clamp(72px, 9vw, 144px); }
.section--tight { padding-block: clamp(52px, 6vw, 96px); }
.section--dark { background: var(--grad-indigo); color: #fff; position: relative; }
.section--dark h1,.section--dark h2,.section--dark h3,.section--dark h4 { color: #fff; }
.section--dark p { color: rgba(255,255,255,.74); }
.section--mist { background: var(--mist); }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head.center { margin-inline: auto; }
.section-head .h2 { margin-top: .5rem; }
.section-head p { margin-top: .85rem; font-size: 1.05rem; }

/* — Buttons — */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-weight: 600; font-size: .9rem; letter-spacing: -0.01em;
  padding: .7em 1.3em; border-radius: var(--r-pill);
  background: var(--bg); color: var(--fg);
  border: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t) var(--ease), background var(--t-fast);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.05em; height: 1.05em; transition: transform var(--t-fast) var(--ease); }
.btn:hover svg { transform: translateX(2px); }
.btn--primary { --bg: var(--accent); --fg: #ffffff; box-shadow: 0 1px 2px rgba(10,106,166,.18); }
.btn--primary:hover { --bg: var(--accent-600); box-shadow: 0 6px 16px rgba(0,160,247,.24); }
.btn--dark { --bg: var(--indigo); --fg: #fff; }
.btn--dark:hover { --bg: var(--indigo-700); box-shadow: 0 6px 16px rgba(41,24,113,.22); }
.btn--light { --bg: #fff; --fg: var(--indigo); box-shadow: var(--sh-sm); }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink-2); background: var(--mist-2); --fg: var(--ink); }
.btn--ghost-light { --bg: transparent; --fg: #fff; border-color: rgba(255,255,255,.4); }
.btn--ghost-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn--block { width: 100%; }
.btn--lg { padding: .9em 1.6em; font-size: .95rem; }
.btn--sm { padding: .55em 1em; font-size: .84rem; }

.link-arrow { display: inline-flex; align-items: center; gap: .45em; font-weight: 600; color: var(--ink); transition: gap var(--t-fast); }
.link-arrow:hover { gap: .75em; color: var(--accent-700); }
.link-arrow svg { width: 1.05em; height: 1.05em; }

/* — Badges / pills — */
.badge {
  display: inline-flex; align-items: center; font-size: .6rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; padding: .32em .6em;
  border-radius: var(--r-pill); background: var(--accent-tint); color: var(--accent-700);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); line-height: 1;
}
.badge--indigo { background: var(--indigo-tint); color: var(--indigo); border-color: color-mix(in srgb, var(--indigo) 18%, transparent); }
.badge--cyan { background: #e6f8fd; color: #0a7d97; border-color: color-mix(in srgb, var(--cyan) 28%, transparent); }
.badge--ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line-2); }

.tag { font-size: .76rem; color: var(--ink-2); background: var(--mist-2); padding: .3em .7em; border-radius: var(--r-pill); }

/* — Rating stars — */
.stars { --pct: 100%; display: inline-block; position: relative; font-size: .95rem; line-height: 1; letter-spacing: 1px; }
.stars::before { content: "★★★★★"; color: var(--line-2); }
.stars::after { content: "★★★★★"; color: var(--star); position: absolute; left: 0; top: 0; width: var(--pct); overflow: hidden; }

/* — Utilities — */
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-sm { gap: .5rem; } .gap { gap: 1rem; }
.hide { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.divider { height: 1px; background: var(--line); border: 0; }

/* — Motion: reveal-on-scroll (GSAP enhances; CSS fallback keeps content visible) — */
[data-reveal] { opacity: 0; transform: translateY(24px); }
.no-js [data-reveal], html:not(.gsap-ready) [data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
