/* Self-hosted fonts (WOFF2, latin subset). Cormorant Garamond is SIL OFL 1.1 (see OFL-cormorant-garamond.txt). */
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
/* Italic is used only for the home hero subheading and the lead word of each home section title (exceptions in DESIGN.md) */
@font-face { font-family: "Cormorant Garamond"; src: url("/assets/fonts/cormorant-garamond-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/assets/fonts/libre-franklin-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/assets/fonts/libre-franklin-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/assets/fonts/libre-franklin-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
/* Metric-matched fallbacks: the system font shown before the web font loads takes up the same space,
   so text doesn't jump when the swap happens (no layout shift). Values come from each font's metrics. */
@font-face { font-family: "Cormorant Garamond Fallback"; src: local("Georgia"); size-adjust: 88.38%; ascent-override: 104.55%; descent-override: 32.47%; line-gap-override: 0%; }
@font-face { font-family: "Libre Franklin Fallback"; src: local("Arial"); size-adjust: 104.31%; ascent-override: 92.61%; descent-override: 23.58%; line-gap-override: 0%; }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Anchor jumps (e.g. "Schedule a Consultation" → #contact-form) land clear of the sticky header and its gold
     top rule, with a little air */
  scroll-padding-top: calc(var(--header-overlap) + var(--space-3));
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height);
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-heading);
  text-wrap: balance;
}
h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3, h4 { font-size: var(--font-size-h3); }

p, ul, ol, dl, dd, figure, address, blockquote { margin: 0; }
address { font-style: normal; }
img, video { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { color: var(--link-hover); }

:focus-visible { outline: var(--focus-width) solid var(--focus-ring); outline-offset: var(--focus-offset); }
.section--dark :focus-visible { outline-color: var(--color-white); }

time, .tabular { font-variant-numeric: tabular-nums; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: var(--z-skip);
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-target);
  padding: var(--space-2) var(--space-4);
  background: var(--bg);
  color: var(--text);
  font-weight: var(--font-weight-bold);
  border: var(--border-width) solid var(--input-border);
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Scroll is locked only while the mobile menu is open (see main.js). */
html.is-locked { overflow: hidden; }

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