*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 16px); }
@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;
  }
}
/* Keep text visible while the web font loads (no invisible-text flash). */
@font-face { font-family: "Inter"; font-display: swap; src: local("Inter"); }

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--color-text-primary);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  transition: background var(--transition-base), color var(--transition-base);
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); line-height: var(--lh-tight); font-weight: 600; }
small { font-size: var(--fs-small); }
.caption { font-size: var(--fs-caption); color: var(--color-text-secondary); }
.text-secondary { color: var(--color-text-secondary); }

.container { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--space-5); }
.section { padding-block: var(--space-9); }
.stack > * + * { margin-top: var(--space-4); }

:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }
.skip-link { position: absolute; left: var(--space-4); top: -100px; background: var(--color-primary); color: #fff; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); z-index: 1000; transition: top var(--transition-fast); }
.skip-link:focus { top: var(--space-4); text-decoration: none; }
.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 (max-width: 768px) {
  :root { --fs-hero: 2.25rem; --fs-h1: 1.875rem; --fs-h2: 1.5rem; --fs-h3: 1.25rem; }
  .section { padding-block: var(--space-8); }
  .container { padding-inline: var(--space-4); }
}
