/* ============================================================================
   01-BASE — Reset, root typography, layout primitives, reveal animations.
   ============================================================================ */

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--tracking-body);
  color: var(--color-ink);
  background: var(--color-cream-warm);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
ul, ol { list-style: none; padding: 0; }
strong { font-weight: 500; }

/* ---- Headings (serif) -------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: var(--lh-snug);
  letter-spacing: 0;
  text-wrap: balance;     /* balance heading lines so no single word is left hanging */
}
/* avoid orphan last words in body copy */
p { text-wrap: pretty; }
/* display blocks that aren't h1–h4 but should still balance */
.hero__title-line, .hero__title-italic, .cta-banner__italic, .founder__quote { text-wrap: balance; }
em.accent, .accent { font-style: italic; color: var(--color-rust); }

/* ---- Layout primitives ------------------------------------------------- */
.container {
  width: min(var(--container), 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

/* Vertical rhythm for standard flow sections */
.section { padding-block: clamp(72px, 8vw, 120px); }

/* Small rust eyebrow label used across sections */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--color-rust);
  letter-spacing: var(--tracking-body);
}
.eyebrow--light { color: var(--color-cream-warm); }

/* ---- Accessibility helpers -------------------------------------------- */
.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;
}
:focus-visible { outline: 2px solid var(--color-rust); outline-offset: 3px; }

/* ---- Scroll-reveal animation ------------------------------------------ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* Stagger children when a list is revealed together */
[data-reveal].is-visible { transition-delay: var(--reveal-delay, 0s); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* lock scroll while menu / modal is open */
body.is-locked { overflow: hidden; }
