/* ==========================================================================
   RC RALLYE LOCATION — Base Styles
   Global element styles using design tokens.
   ========================================================================== */

body {
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* ── Headings ──────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

/* ── Paragraph ─────────────────────────────────────────────────────────── */

p {
  color: var(--text-secondary);
  max-width: 70ch; /* Optimal reading width */
}

p + p {
  margin-top: var(--space-md);
}

/* ── Links ─────────────────────────────────────────────────────────────── */

a {
  color: var(--accent-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-secondary);
}

a:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Selection ─────────────────────────────────────────────────────────── */

::selection {
  background-color: var(--accent-primary);
  color: var(--text-on-accent);
}

/* ── Scrollbar (Webkit) ────────────────────────────────────────────────── */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--color-grey-600);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ── Utility Classes ───────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

.container--narrow {
  max-width: var(--container-narrow);
}

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

.section {
  padding-block: var(--section-py);
}

.section--alt {
  background-color: var(--bg-secondary);
}

.text-center {
  text-align: center;
}

.text-accent {
  color: var(--accent-primary);
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section Header ────────────────────────────────────────────────────── */

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  margin-inline: auto;
  font-size: var(--fs-body);
  color: var(--text-secondary);
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-sm);
}
