/* ==========================================================================
   Base — reset, typography, layout primitives, utilities
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
html:focus-within { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink-800);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main.page { flex: 1 0 auto; }
img, svg, video { display: block; max-width: 100%; }
svg { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-700); }
ul, ol { padding: 0; list-style: none; }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); }
::selection { background: var(--accent-soft); color: var(--ink-900); }

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

/* Skip link */
.skip-link {
  position: absolute; left: 16px; top: -100px;
  padding: 10px 14px; background: var(--ink-900); color: #fff;
  border-radius: var(--radius-md); z-index: 1000;
  font-family: var(--font-display); font-weight: 600; font-size: var(--text-sm);
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-wrap: balance;
}
h1, .h1 { font-size: var(--text-5xl); letter-spacing: -0.03em; }
h2, .h2 { font-size: var(--text-4xl); }
h3, .h3 { font-size: var(--text-2xl); letter-spacing: -0.015em; }
h4, .h4 { font-size: var(--text-xl); letter-spacing: -0.01em; }
p { text-wrap: pretty; }
.lead {
  font-size: var(--text-xl);
  line-height: 1.55;
  color: var(--ink-600);
  max-width: 62ch;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-700);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
}
.section--dark .eyebrow { color: var(--accent); }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }
.muted { color: var(--ink-500); }
.text-accent { color: var(--accent-700); }
.small { font-size: var(--text-sm); }
.measure { max-width: 68ch; }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { font-size: var(--text-2xl); margin-top: var(--space-8); }
.prose h3 { font-size: var(--text-xl); margin-top: var(--space-6); }
.prose ul { list-style: disc; padding-left: 1.25rem; }
.prose ul li + li { margin-top: var(--space-2); }
.prose a { color: var(--accent-700); text-decoration: underline; text-underline-offset: 3px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}
.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 840px; }

.section { padding-block: clamp(72px, 10vw, 128px); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--flush-top { padding-top: 0; }
.section--paper { background: var(--paper); }
.section--paper-2 { background: var(--paper-2); }
.section--white { background: var(--surface); }
.section--dark {
  background: var(--ink-900);
  color: var(--ink-100);
}
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark .lead, .section--dark .muted { color: var(--ink-300); }
.section--dark a:hover { color: var(--accent); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--space-6); flex-wrap: wrap;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.section-head > div { max-width: 62ch; }
.section-head h2 + p, .section-head h1 + p { margin-top: var(--space-4); }
.section-head__actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.stack--sm { gap: var(--space-2); }
.stack--lg { gap: var(--space-6); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.cluster--between { justify-content: space-between; }

.split {
  display: grid; gap: clamp(32px, 5vw, 72px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  align-items: center;
}
.split--top { align-items: start; }

.divider { height: 1px; background: var(--line); border: 0; }

/* --------------------------------------------------------------------------
   Reveal animations (progressively enhanced)
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(0.96); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 80ms; }
[data-reveal-delay="2"] { transition-delay: 160ms; }
[data-reveal-delay="3"] { transition-delay: 240ms; }
[data-reveal-delay="4"] { transition-delay: 320ms; }
[data-reveal-delay="5"] { transition-delay: 400ms; }
[data-reveal-delay="6"] { transition-delay: 480ms; }
html.no-js [data-reveal] { opacity: 1; transform: none; }

@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;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Print: keep quote pages clean */
@media print {
  .site-header, .site-footer, .drawer, .drawer-backdrop, .toast-root, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
}
