/* public_html/assets/css/base.css */

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

html {
  scroll-behavior: smooth;
}

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

/* Belt-and-braces guard against phantom horizontal scroll on mobile.
   IMPORTANT: this must be `clip`, not `hidden` — `hidden`/`auto`/`scroll`
   turn html/body into a "scroll container" for CSS purposes, which breaks
   `position: sticky` for every sticky element on the page (the announcement
   bar, header, tagline banner all stopped sticking the one time this was
   `overflow-x: hidden`). `clip` prevents the same overflow without creating
   a scroll container, so sticky keeps working. The real overflow source
   (the listing-page toolbar not wrapping on narrow screens) is fixed
   directly in listing.css — this is just a safety net, not the fix. */
html, body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4vw + 1rem, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 2vw + 1rem, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 600; }

p {
  margin: 0 0 1em;
  max-width: 62ch;
  color: var(--text-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

img { max-width: 100%; display: block; }

button {
  font-family: var(--font-body);
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 64px 0;
}

@media (max-width: 640px) {
  .section { padding: 40px 0; }
  .container { padding: 0 16px; }
}
