/**
 * base.css
 *
 * Reset und globale Grundeinstellungen. Enthält keine komponenten-
 * spezifischen Regeln — diese liegen in header.css, tabs.css, cards.css usw.
 */

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--color-bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 50% -10%, rgba(201, 151, 79, 0.06), transparent);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0;
  color: var(--color-text);
}

p {
  margin: 0 0 var(--space-3);
  color: var(--color-text-dim);
}

a {
  color: var(--color-brass-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

/* Sichtbarer Fokus-Ring für Tastaturnutzung, überall im Frontend */
:focus-visible {
  outline: 2px solid var(--color-brass-bright);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

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

.mono {
  font-family: var(--font-mono);
}

.text-win {
  /* !important bewusst: Diese Farb-Utility-Klasse muss auch innerhalb von
     Tabellenzellen (.data-table td.numeric) zuverlässig gewinnen, deren
     Selektor (Element + zwei Klassen) sonst per CSS-Spezifität höher
     wiegt als eine einzelne Klasse wie .text-win — unabhängig von der
     Reihenfolge der <link>-Tags. Siehe auch .pr-*/.wr-* in pr-rating.css,
     die aus demselben Grund ebenfalls !important nutzen. */
  color: var(--color-win) !important;
}

.text-loss {
  color: var(--color-loss) !important;
}

.text-dim {
  color: var(--color-text-dim);
}

/* Kleiner, zurückhaltender Outline-Button — seitenübergreifend nutzbar
   (z. B. Verweis von der Clan-Ansicht zur Clan-War-Unterseite, oder der
   "Rohdaten anzeigen"-Umschalter auf der Clan-War-Seite). */
.btn-outline {
  display: inline-block;
  background: none;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text-dim);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-outline:hover {
  color: var(--color-brass-bright);
  border-color: var(--color-brass-dim);
  text-decoration: none;
}

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