/* ================================================================
   base.css — reset, body defaults, typography baseline,
   universal helpers (.han, .reveal). No component-specific styles.
   ================================================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* === Type defaults ============================================== */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.018em;
  line-height: 1.05;
  margin: 0 0 var(--space-4);
  font-weight: 700;
}

h1 { font-size: clamp(2.6rem, 5vw + 1rem, 5rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 2.4vw + 1rem, 3rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 var(--space-3); }

a { color: inherit; }

img, svg { display: block; max-width: 100%; }
/* Keep aspect ratio when only width is set in CSS: build.js stamps intrinsic
   width/height on <img>, so without this the stamped height stretches any
   width-only image (e.g. the footer logo). */
img { height: auto; }


/* === Helpers ==================================================== */

.han { font-family: var(--font-han); }


/* === Reveal-on-scroll baseline (GSAP-controlled) =================
   Hides .reveal elements until *-anime.js animates them in. GSAP sets
   inline styles to override, so no CSS transition needed here — that
   would fight with GSAP's tween. The legacy reveal.js IntersectionObserver
   is retired in favour of TL.batchIn('.reveal').                     */

.reveal {
  opacity: 0;
  transform: translateY(30px);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}


/* === Skip link (a11y) =========================================== */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 14px;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus { top: 0; }


/* === Focus ring (consistent) ==================================== */

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