/*
 * 21 Young Hearts — Base Styles
 * Reset, base HTML elements, global typography, layout primitives,
 * and utility classes. Consumes tokens from tokens.css.
 * ─────────────────────────────────────────────────────────────────
 */

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip; /* clip not hidden — hidden breaks position:sticky */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
  color: var(--color-warm-black);
  background: white;
  overflow-x: clip; /* clip not hidden — hidden breaks position:sticky */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Base typographic elements ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  font-weight: var(--weight-black);
  letter-spacing: -0.02em;
}

a {
  color: var(--color-blue);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: color var(--duration-fast) var(--ease-out);
}
a:hover { color: var(--color-blue-mid); }
a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ── Layout primitives ─────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}
@media (min-width: 600px)  { :root { --container-gutter: var(--space-2xl); } }
@media (min-width: 900px)  { :root { --container-gutter: var(--space-3xl); } }

.container--narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--container-gutter);
}

.section {
  padding: var(--space-2xl) 0;
}
@media (min-width: 600px) { .section { padding: var(--space-3xl) 0; } }
@media (min-width: 900px) { .section { padding: var(--space-4xl) 0; } }

/* ── Typography helpers ────────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.section-heading {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-lg);
}
@media (min-width: 900px) { .section-heading { font-size: var(--text-4xl); } }
@media (max-width: 600px)  { .section-heading { font-size: var(--text-2xl); } }

/* ── Accessibility utilities ───────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Shared panel style — comic-book aesthetic ─────────────────── */
.comic-panel {
  border: 4px solid var(--color-warm-black);
  border-radius: var(--radius-lg);
  box-shadow: 5px 5px 0 var(--color-warm-black);
}
