/* ============================================================================
   garaliving — Base (reset + element defaults + focus + a11y helpers)
   Consumes tokens.css only. No raw literals.
   ========================================================================== */

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

* { margin: 0; }

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img { height: auto; }

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

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

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

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

/* --- Headings ------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: var(--leading-tight);
  font-weight: 500;
}

h1 { font-size: var(--text-5xl); font-weight: 300; }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { max-width: var(--measure); }

strong { font-weight: 600; }

/* --- Focus (never removed without a replacement) -------------------------- */
:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) { outline: none; }

/* --- 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;
}

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: calc(-1 * var(--space-8));
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--color-navy);
  color: var(--color-text-on-brand);
  border-radius: var(--radius-md);
  transition: top var(--motion-base) var(--motion-ease);
}
.skip-link:focus { top: var(--space-2); }

/* --- Layout helpers ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: var(--space-7);
  scroll-margin-top: 80px;
}

@media (min-width: 768px) {
  .section { padding-block: var(--space-8); }
}

.section--tint { background-color: var(--color-surface-alt); }

/* Eyebrow / label utility */
.eyebrow {
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Section header (centered title + hairline underline) */
.section-head {
  text-align: center;
  margin-bottom: var(--space-7);
}
.section-head h2 { margin-bottom: var(--space-3); }
.section-head::after {
  content: "";
  display: block;
  width: var(--space-7);
  height: 2px;
  margin: var(--space-4) auto 0;
  background: var(--color-navy);
}

/* --- Reduced motion ------------------------------------------------------- */
@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;
  }
}
