/* ==========================================================================
   base.css — element defaults, layout primitives, accessibility
   ========================================================================== */

::selection { background: var(--accent-strong); color: #fff; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-400);
  color: var(--text);
  background: var(--bg);
  /* Soft circular crimson glow in the background — part of the circles motif. */
  background-image:
    radial-gradient(circle at 12% -5%, rgba(226, 45, 73, 0.16) 0, transparent 40%),
    radial-gradient(circle at 92% 8%, rgba(158, 18, 40, 0.18) 0, transparent 34%);
  background-attachment: fixed;
}

/* --- Themed scrollbars ---------------------------------------------------- */
html { scrollbar-color: var(--accent-strong) var(--bg-alt); scrollbar-width: thin; }
*::-webkit-scrollbar { width: 12px; height: 12px; }
*::-webkit-scrollbar-track { background: var(--bg-alt); }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent), var(--red-700));
  border-radius: var(--r-pill);
  border: 3px solid var(--bg-alt);
}
*::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--red-400), var(--accent-strong)); }
*::-webkit-scrollbar-corner { background: var(--bg-alt); }

h1 { font-family: var(--font-display); font-size: var(--fs-800); letter-spacing: -0.015em; }
h2 { font-family: var(--font-display); font-size: var(--fs-700); letter-spacing: -0.01em; }
h3 { font-family: var(--font-display); font-size: var(--fs-600); }
h4 { font-family: var(--font-body); font-size: var(--fs-500); font-weight: 700; }

p { color: var(--text-soft); }

strong { color: var(--text); font-weight: 700; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { color: var(--red-300); }

/* Prices, tickers, runner numbers — mono only. */
.mono, .price, .ticker { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* --- Layout primitives ---------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }

.section { padding-block: var(--sp-8); position: relative; }
.section--alt { background: var(--bg-alt); }

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: var(--fs-300);
  font-weight: 700;
  color: var(--accent);
}

.lede { font-size: var(--fs-500); color: var(--text-soft); max-width: 60ch; }

/* --- Accessibility -------------------------------------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -120px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-pill);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

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

/* Reveal animation base (IntersectionObserver-driven). */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.985);
  filter: blur(6px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), filter var(--dur) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}
