/*
 * Base — reset, global styles, typography, utilities
 */

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

html {
  font-size: 16px; /* decoupled from token — prevents rem double-scaling with clamp() */
  line-height: var(--hap-line-height);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--hap-font-body);
  font-weight: var(--hap-weight-regular);
  color: var(--hap-black);
  background-color: var(--hap-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hap-font-heading);
  font-weight: var(--hap-weight-bold);
  line-height: 1.2;
  color: var(--hap-black);
}

h1 { font-size: var(--hap-text-6xl); }
h2 { font-size: var(--hap-text-5xl); }
h3 { font-size: var(--hap-text-3xl); }
h4 { font-size: var(--hap-text-2xl); }

p {
  margin-bottom: var(--hap-space-sm);
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--hap-green);
  text-decoration: none;
  transition: color var(--hap-transition);
}

a:hover {
  color: var(--hap-navy);
}

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

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Focus states — accessibility baseline */
:focus-visible {
  outline: 2px solid var(--hap-green);
  outline-offset: 2px;
}

/* ─── Utilities ─────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--hap-max-width);
  margin: 0 auto;
  padding: 0 var(--hap-space-md);
}

.section {
  padding: var(--hap-section-pad) 0;
}

@media (min-width: 1920px) {
  :root { --hap-max-width: 1440px; }
}

@media (min-width: 2560px) {
  :root { --hap-max-width: 1680px; }
}

.section--alt {
  background-color: var(--hap-bg-light);
}

.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;
}

.skip-link:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100000;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  font-size: var(--hap-text-sm);
  font-weight: var(--hap-weight-bold);
  color: var(--hap-white);
  background: var(--hap-navy);
  border-radius: var(--hap-radius-sm);
}
