/* ==========================================================================
   global.css — reset + base styles + shared utilities.
   Loaded after variables.css on every page.
   ========================================================================== */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px); /* anchor nav clears fixed header */
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--color-brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-brand-dark); }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: 1.12;
  color: var(--color-ink);
  letter-spacing: 0.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p  { color: var(--color-text); }

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

.section { padding-block: var(--section-pad); }
.section--alt  { background: var(--color-bg-alt); }
.section--dark { background: var(--color-bg-dark); color: var(--color-white); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-white); }
.section--dark p { color: rgba(255, 255, 255, 0.82); }

/* Section heading block */
.section-head { text-align: center; max-width: 720px; margin-inline: auto; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin-bottom: 0.5rem; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}
.lead { font-size: var(--fs-lead); color: var(--color-text-muted); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: 1rem;
  line-height: 1;
  padding: 0.9rem 1.6rem;
  border: 2px solid var(--color-brand);
  border-radius: var(--radius-pill);
  background: var(--color-brand);
  color: var(--color-white);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}
.btn:hover { background: var(--color-brand-dark); border-color: var(--color-brand-dark); color: #fff; transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--color-brand); }
.btn--outline:hover { background: var(--color-brand); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--color-ink); }
.btn--light:hover { background: var(--color-brand); border-color: var(--color-brand); color: #fff; }

/* ---- Utilities ---- */
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; letter-spacing: 0.04em; }
.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;
}
:where(a, button):focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; border-radius: 4px; }
