/* ==========================================================================
   HAPPY BEAR GROUP — BASE / RESET / TYPOGRAPHY
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}
img { object-fit: cover; }

input, button, textarea, select {
  font: inherit;
  color: inherit;
}
button { cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, var(--text-5xl)); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 3vw + 1rem, var(--text-3xl)); font-weight: 700; }
h3 { font-size: clamp(1.375rem, 1.4vw + 1rem, var(--text-xl)); font-weight: 600; }
h4 { font-size: var(--text-lg); font-weight: 600; }

p { max-width: 68ch; }
p.lede { font-size: var(--text-md); line-height: var(--leading-relaxed); color: var(--text-muted); }

/* Balanced heading wraps on short headlines */
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-gold-dark);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--color-gold);
  border-radius: var(--radius-pill);
}

.stat-number {
  font-family: var(--font-heading);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-tight);
}

/* ---- Focus states ---- */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible { outline-offset: 3px; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--color-ink);
  color: var(--color-bg);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  z-index: var(--z-modal);
  transition: top var(--duration-base) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 768px) { .container { padding-inline: var(--space-8); } }

.container-narrow { max-width: var(--container-narrow); margin-inline: auto; }

.section { padding-block: var(--space-8); }
@media (min-width: 1024px) { .section { padding-block: var(--space-10); } }
.section-tight { padding-block: var(--space-6); }

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-8);
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin-top: var(--space-3); }
.section-head p { margin-top: var(--space-4); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.bg-dark { background: var(--surface-dark); color: var(--text-on-dark); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--text-on-dark); }
.bg-dark p { color: var(--text-on-dark-muted); }
.bg-sand { background: var(--surface-sand); }
.bg-gold-wash { background: rgba(184, 137, 61, 0.16); }
.bg-raised { background: var(--surface-raised); }
