/* ==========================================================================
   style.css — root landing / overview page (regelbuch.del-refs.de/)
   Self-contained: the token block below is intentionally kept identical to
   web_source/template/css/base.css. If you change a token here, mirror it there.
   ========================================================================== */

/* ---- Self-hosted fonts (Inter) — no external CDN, GDPR-friendly ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-700.woff2") format("woff2");
}

/* ---- Design tokens ------------------------------------------------------- */
:root {
  color-scheme: light dark;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --accent: #dd5533;
  --accent-hover: #b8421f;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(221, 85, 51, 0.10);
  --link: #c1421d;
  --link-hover: #8f2f13;

  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef0f3;
  --text: #1c2024;
  --text-muted: #5b6470;
  --border: #e3e6ea;
  --border-strong: #cfd4da;

  --header-bg: #24282c;
  --header-text: #ffffff;
  --header-accent: var(--accent);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 24, 0.06), 0 1px 3px rgba(16, 20, 24, 0.05);
  --shadow-md: 0 4px 12px rgba(16, 20, 24, 0.08), 0 2px 4px rgba(16, 20, 24, 0.05);
  --shadow-lg: 0 12px 32px rgba(16, 20, 24, 0.14);

  --content-max: 960px;
  --header-h: 84px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #e56340;
    --accent-hover: #f47c5b;
    --accent-contrast: #ffffff;
    --accent-soft: rgba(229, 99, 64, 0.16);
    --link: #ff8a66;
    --link-hover: #ffab90;

    --bg: #121417;
    --surface: #1b1e22;
    --surface-2: #23272c;
    --text: #e7eaee;
    --text-muted: #9aa3ad;
    --border: #2b3037;
    --border-strong: #3a4048;

    --header-bg: #0f1113;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

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

.content {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  flex-grow: 1;
}

h1, h2, h3 { color: var(--accent); line-height: 1.25; font-weight: 700; }

/* ---- Header -------------------------------------------------------------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--header-bg);
  color: var(--header-text);
  border-bottom: 3px solid var(--header-accent);
  box-shadow: var(--shadow-sm);
}
header.site-header .content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-grow: 0;
}
header.site-header #home_ref {
  color: var(--header-text);
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
}
header.site-header #header_title {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
header.site-header #header_subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: #c9ccd0;
}
header.site-header .brand-logo img { height: 3.1em; display: block; }

/* ---- Footer -------------------------------------------------------------- */
footer.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  background-color: var(--header-bg);
  color: var(--header-text);
  text-align: center;
  border-top: 3px solid var(--header-accent);
}
footer.site-footer .content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 0;
}
footer.site-footer a { color: var(--link); font-weight: 500; }
footer.site-footer a:hover { color: var(--link-hover); }

/* ---- Intro --------------------------------------------------------------- */
.page-intro {
  padding-top: 2rem;
  margin-bottom: 2rem;
}
.page-intro h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  letter-spacing: -0.01em;
}
.page-intro p { margin: 0 0 1rem; color: var(--text); max-width: 68ch; }
.page-intro p:last-child { margin-bottom: 0; }

/* ---- Season cards -------------------------------------------------------- */
.seasons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding-bottom: 1rem;
}
@media (min-width: 720px) {
  .seasons { grid-template-columns: repeat(2, 1fr); }
}

.rulebook {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.4rem 1.5rem;
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.rulebook:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.rulebook-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}
.rulebook h2 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--text);
}
.rulebook.is-current { border-color: var(--accent); }
.badge-current {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.rulebook-adjustments {
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  font-size: 0.97rem;
}
.rulebook-adjustments:last-of-type { margin-bottom: 1rem; }

.rulebook-textlink {
  color: var(--link);
  font-weight: 500;
  white-space: nowrap;
}
.rulebook-textlink:hover { color: var(--link-hover); }

.rulebook-links {
  display: flex;
  flex-flow: row wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

/* ---- Buttons ------------------------------------------------------------- */
.rulebook-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.6rem 1.05rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, transform 0.1s ease;
}
.rulebook-download:active { transform: translateY(1px); }
.rulebook-download img { height: 1.15em; display: block; }

.rulebook-download.rulebook-primary {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.rulebook-download.rulebook-primary:hover {
  background-color: var(--accent-hover);
  color: var(--accent-contrast);
}
.rulebook-download.rulebook-primary img { filter: brightness(0) invert(1); }

.rulebook-download.rulebook-secondary {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.rulebook-download.rulebook-secondary:hover {
  background-color: var(--surface-2);
  color: var(--text);
  border-color: var(--accent);
}
.rulebook-download.rulebook-secondary img { filter: brightness(0); }

@media (prefers-color-scheme: dark) {
  .rulebook-download.rulebook-secondary img { filter: brightness(0) invert(1); }
}
