/* =========================================================
   RESET / BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html[id], section[id], div[id] { scroll-margin-top: 90px; }

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

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur-med) ease, color var(--dur-med) ease;
}

/* Page-load transition: fades in once, respects reduced motion */
body.is-loading { opacity: 0; }
body.is-loaded { opacity: 1; transition: opacity 0.5s var(--ease-out); }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
h3 {
  font-size: clamp(1.05rem, 1.4vw, 1.15rem);
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-primary);
}

p { margin: 0 0 1em; color: var(--text-secondary); }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; background: none; border: none; cursor: pointer; }

/* Reusable container primitive — .section-inner kept as an alias so
   existing markup doesn't need to change; both share this rule. */
.container,
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 0.8em 1.2em;
  z-index: 999;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Focus states: per-element, not just a blanket rule ---------- */
:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 3px; }

button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 3px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-color: var(--color-gold);
}

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

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-secondary);
  margin: 0 0 1em;
}
.eyebrow--gold { color: var(--color-gold); }

.section-head { max-width: 640px; margin: 0 0 3rem; }
.section-head__sub { font-size: clamp(0.98rem, 1.4vw, 1.05rem); }

/* content-visibility: skips rendering work for offscreen sections —
   meaningful Lighthouse / Core Web Vitals win on a long homepage. */
.about, .services, .faq, .why-choose {
  content-visibility: auto;
  contain-intrinsic-size: 1px 900px;
}
