/* ════════════════════════════════════════════════════
   base.css — Trainer DB
   Inhaltsverzeichnis:
   1. CSS Reset (*, html, body)
   2. Globale Elemente (a, hr, img, pre, code)
   3. Typografie-System (tdb1–tdb4 Utility-Klassen)
   4. Globale Heading-Stile (h1–h4)
   REGEL: Keine Komponenten, keine Seiten-spezifischen Stile, keine Navigation.
   ════════════════════════════════════════════════════ */

/* 1. Schriftart ------------------------------------------ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
                 U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
                 U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                 U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* 2. Reset ----------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 1rem;
  scroll-behavior: smooth;
}

/* display:flex/grid auf Elementen mit hidden würde hidden wirkungslos machen */
[hidden] { display: none !important; }

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--white);
}

/* 3. Globale Elemente ------------------------------------ */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-deep);
  text-decoration: underline;
}

a:visited {
  color: var(--primary-deep);
}

/* 4. Heading-Stile --------------------------------------- */
h1 { font-size: var(--font-size-h1); font-weight: 700; line-height: 1.2; letter-spacing: 0.03em; margin-bottom: var(--space-md); color: var(--primary); }
h2 { font-size: var(--font-size-h2); font-weight: 700; margin-bottom: var(--space-md); color: var(--primary); }
h3 { font-size: var(--font-size-h3); font-weight: 700; margin-bottom: var(--space-sm); color: var(--primary); }
p  { margin-bottom: var(--space-md); }

/* 5. Typografie-System: tdb1–tdb4 ------------------------
   Vier verbindliche Stile – keine Abweichungen, keine Zwischengrößen.
   tdb1 – Seitentitel | tdb2 – Abschnitt | tdb3 – Fließtext | tdb4 – Meta/Label */
.tdb1 { font-size: 2rem;                font-weight: 700; color: var(--primary);    }
.tdb2 { font-size: 1.25rem;             font-weight: 700; color: var(--primary);    }
.tdb3 { font-size: 1rem;               font-weight: 400; color: var(--color-text); }
.tdb4 { font-size: var(--font-size-sm); font-weight: 400; color: var(--soft-text);  }


/* ══ Prefers-Reduced-Motion ════════════════════════════════════════════════
   Alle Animationen + Transitions für Nutzer mit "Bewegung reduzieren" deaktivieren.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Scroll-to-Top: sofort sichtbar/unsichtbar ohne Fade */
  .scroll-top-btn {
    opacity: 0;
    transform: none;
    transition: none;
  }
  .scroll-top-btn.is-visible {
    opacity: 1;
  }
}
