/* ==========================================================================
   Throne Room Sports — Reset, Base & Layout
   Mobile-first. Depends on tokens.css.
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* never allow horizontal scroll */
}

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

a { color: inherit; }

h1, h2, h3, h4 { line-height: var(--leading-tight); font-weight: var(--weight-black); }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--container-pad);
}

/* ---- Sections ---- */
.section { padding-block: var(--space-9); }
.section-sm { padding-block: var(--space-7); }

.section-surface {
  background: var(--surface);
  border-block: 1px solid rgba(255, 255, 255, 0.03);
}

/* ---- Section header ---- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.eyebrow { margin-bottom: var(--space-2); }

.section-title {
  font-size: var(--text-2xl);
  letter-spacing: -0.01em;
}

.center { text-align: center; }
.center-narrow { max-width: 560px; margin-inline: auto; }

/* ---- Grid helpers (mobile-first: 1 col, scale up) ---- */
.grid { display: grid; gap: var(--space-4); }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }

@media (min-width: 600px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Flow helpers ---- */
.stack > * + * { margin-top: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---- Horizontal scroll row (clips) ---- */
.scroll-row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-inline: calc(var(--container-pad) * -1);
  padding-inline: var(--container-pad);
  scroll-snap-type: x mandatory;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row > * { scroll-snap-align: start; flex: 0 0 auto; }

/* ---- Accessibility ---- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
