/* Base reset + typography — ROST Premium (mobile-first) */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--graphite-950);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

/* Branded text selection — small premium-polish touch, purely cosmetic
   (no layout/size/color-token changes elsewhere), 2026-07-30. */
::selection {
  background: var(--brand-accent);
  color: var(--warm-white-50);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-md);
  color: var(--graphite-950);
}

/* Keeps any anchor-jumped or programmatically focused section clear of
   the sticky header instead of sliding underneath it — tied to the
   header's real measured height (main.js sets --mobile-header-height)
   plus a 16px breathing gap, so it stays correct across breakpoints
   instead of relying on one guessed constant. */
[id] {
  scroll-margin-top: calc(var(--mobile-header-height) + 16px);
}

h1 {
  font-size: var(--text-hero);
  line-height: 1.02;
}

h2 {
  font-size: var(--text-2xl);
  line-height: var(--leading-snug);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

p {
  margin: 0 0 var(--space-md);
  max-width: 68ch;
}

a {
  color: inherit;
}

ul,
ol {
  margin: 0 0 var(--space-md);
  padding-left: 1.25em;
}

small {
  font-size: var(--text-sm);
  color: inherit;
  opacity: 0.75;
}

button {
  font-family: inherit;
}

/* Accessibility: visible focus state everywhere, no outline: none anywhere */
:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100%;
  background: var(--graphite-950);
  color: var(--warm-white-50);
  padding: var(--space-xs) var(--space-md);
  z-index: 1000;
  border-radius: var(--radius-sm);
  transition: top var(--duration-fast) var(--ease-standard);
}

.skip-link:focus {
  top: var(--space-sm);
}

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