/*
  main.css — global custom CSS for the child theme.
  ----------------------------------------------------------------------------
  All values reference tokens.css. Never hardcode colors, font sizes, or
  spacing values here.

  Organization:
  1. Resets & base elements
  2. Typography
  3. Layout primitives (container, section)
  4. Components (cards, buttons, etc.) — add as you go
  5. Utilities — add sparingly
*/

/* ===========================================================================
   1. Resets & base
=========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family-base);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-text-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition: color var(--duration-base) var(--ease-out);
}

a:hover {
  color: var(--color-text-link-hover);
}

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

/* ===========================================================================
   2. Typography
=========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin: 0 0 var(--space-4);
  color: var(--color-text);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }
h5 { font-size: var(--font-size-h5); }

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

/* ===========================================================================
   3. Layout primitives
=========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-padding-x);
}

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

.section {
  padding-block: var(--section-padding-y);
}

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

/* ===========================================================================
   4. Components
=========================================================================== */

/* Add component styles as you build each section. Examples:

.card { ... }
.card__title { ... }
.card--featured { ... }

.btn { ... }
.btn--primary { ... }
.btn--ghost { ... }
*/

/* ===========================================================================
   5. Utilities (use sparingly)
=========================================================================== */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
