/* turnierauskunft.de – Ergebnisarchiv
   Gestaltung nach Figma "Startseite" (Desktop/Mobil, hell/dunkel); Standard ist dunkel */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/inter-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/inter-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/inter-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/playfair-display-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/playfair-display-400-italic.woff2") format("woff2"); }

:root {
  --bg: #FAFAF8;
  --surface: #F3F5F4;
  --card: #FFFFFF;
  --text: #102B28;
  --muted: #64716C;
  --line: #DCE2DD;
  --accent: #176B5B;
  --accent-ink: #FFFFFF;
  --gold: #D4AA64;
  --deep: #102B28;          /* dunkle Flächen auch im hellen Modus (Kachel "Alle Jahre", Sattel-Abschnitt) */
  --deep-text: #FAFAF8;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 4px;
  --wrap: 1328px;
  color-scheme: light;
}
/* Dunkel ist Standard; hell nur, wenn über den Schalter gewählt (data-theme="light") */
:root:not([data-theme="light"]) {
  --bg: #0D1D1B; --surface: #142A27; --card: #1A3430; --text: #FAFAF8; --muted: #AABAB1;
  --line: #314A43; --accent: #D4AA64; --accent-ink: #102B28; --deep: #1A3430; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.6 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Typografie */
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 5.5vw, 64px); }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 25px; }
.eyebrow { font: 600 11px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.eyebrow.gold { color: var(--gold); display: flex; align-items: center; gap: 12px; }
.eyebrow.gold::before { content: ""; width: 24px; height: 1px; background: var(--gold); }
.lead { color: var(--muted); max-width: 46ch; }
.small { font-size: 12px; color: var(--muted); }
.muted { color: var(--muted); }

/* Kopf */
.site-head { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; gap: 32px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
/* Logo ist schwarz auf weiß – bleibt daher in beiden Modi auf heller Fläche */
.brand-logo { width: 48px; height: 48px; padding: 3px; background: #FFF; border-radius: 10px; flex: none; }
.brand-name { font: 600 19px/1 var(--sans); }
.brand-sub { font: 400 8px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav { display: flex; gap: 28px; margin: 0 auto; }
.nav a { color: var(--text); font: 500 13px var(--sans); }
.nav a[aria-current="page"] { color: var(--accent); }
.head-tools { display: flex; align-items: center; gap: 18px; font: 600 12px var(--sans); }
.theme-toggle { background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; font-size: 16px; }
@media (max-width: 860px) {
  .site-head .wrap { flex-wrap: wrap; height: auto; padding-top: 12px; row-gap: 10px; }
  .head-tools { margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; gap: 22px; margin: 0; padding: 10px 0 12px; overflow-x: auto; white-space: nowrap;
         scrollbar-width: none; border-top: 1px solid var(--line); }
  .nav::-webkit-scrollbar { display: none; }
}

/* Hero */
.hero { position: relative; min-height: 600px; color: #FAFAF8; display: flex; align-items: center;
  background: linear-gradient(90deg, rgba(16,43,40,.96) 0%, rgba(16,43,40,.85) 38%, rgba(16,43,40,.25) 62%, rgba(16,43,40,0) 80%), url("../img/hero-reiterin.jpg") 70% center/cover; }
.hero h1 { max-width: 12ch; margin: 18px 0 22px; }
.hero p { max-width: 44ch; color: #E0E7DF; margin: 0 0 30px; }
.hero .caption { position: absolute; right: 24px; bottom: 16px; font: 500 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #CCD9D0; }
.searchbar { display: flex; gap: 8px; background: #FFFFFF; border-radius: var(--radius); padding: 8px 8px 8px 16px; max-width: 560px; align-items: center; }
.searchbar input { flex: 1; border: 0; outline: 0; font: 400 13px var(--sans); color: #102B28; background: transparent; min-width: 0; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: var(--radius);
  padding: 11px 16px; font: 600 12px var(--sans); cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.hero .btn { background: #176B5B; color: #FFFFFF; }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--line); }
.link-arrow { font: 600 12px var(--sans); }
.link-arrow::after { content: " →"; }
.hero .link-arrow { color: #FAFAF8; display: inline-block; margin-top: 18px; }

.notice { background: var(--surface); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); padding: 13px 0; }

/* Abschnitte */
.section { padding: 88px 0; }
.section.alt { background: var(--surface); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head .lead { margin: 0; }

/* Karten und Tabellen */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font: 600 10px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:nth-child(even) td { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .place { font: 600 15px var(--sans); width: 52px; }
.table .rank { font: 400 12px var(--sans); color: var(--muted); white-space: nowrap; }
.table .strong { font-weight: 600; color: var(--text); }
.table .sub { display: block; font-size: 11px; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.badge { display: inline-block; font: 600 10px var(--sans); letter-spacing: .04em; padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.badge.gold { border-color: var(--gold); color: var(--gold); }
.medal-1 { color: var(--gold); }

/* Jahres-Kacheln */
.years { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.year { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text); min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; }
.year:hover { text-decoration: none; border-color: var(--accent); }
.year b { font: 400 32px/1 var(--serif); }
.year.deep { background: var(--deep); color: var(--deep-text); }
@media (max-width: 860px) { .years { grid-template-columns: repeat(3, 1fr); } }

/* Orts-Karten */
.places { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.place-card { color: var(--text); overflow: hidden; }
.place-card img { aspect-ratio: 16/8; object-fit: cover; width: 100%; }
.place-card .body { padding: 18px 20px; }
.place-card h3 { font-size: 25px; }
@media (max-width: 860px) { .places { grid-template-columns: 1fr; } }

/* Kennzahlen */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact { background: var(--card); padding: 20px 22px; }
.fact b { display: block; font: 400 32px/1.1 var(--serif); }
.fact span { font-size: 12px; color: var(--muted); }
@media (max-width: 700px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* Seitenkopf Unterseiten */
.page-head { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.page-head h1 { font-size: clamp(30px, 4.4vw, 50px); max-width: 22ch; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.meta b { color: var(--text); font-weight: 600; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.aside h3 { font-size: 20px; margin-bottom: 12px; }
.aside .card { padding: 20px; margin-bottom: 20px; font-size: 13px; }
.day { margin-top: 44px; }
.day h2, .day-title { font-size: 26px; margin-bottom: 14px; }

/* Abschluss / Fuß */
.closing { display: grid; grid-template-columns: 5fr 7fr; background: var(--deep); color: var(--deep-text); }
.closing img { height: 100%; object-fit: cover; }
.closing .text { padding: 80px 64px; }
.closing p { color: #CCD9D0; max-width: 56ch; }
@media (max-width: 860px) { .closing { grid-template-columns: 1fr; } .closing .text { padding: 48px 20px; } }
.site-foot { padding: 64px 0 28px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.site-foot .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-foot h4 { font: 600 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text); margin: 0 0 12px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; line-height: 2.1; }
.site-foot a { color: var(--muted); }
.site-foot .brandline { font: 400 30px var(--serif); color: var(--text); }
.legal { border-top: 1px solid var(--line); margin-top: 44px; padding-top: 18px; font-size: 10px; }
@media (max-width: 700px) { .site-foot .cols { grid-template-columns: 1fr; } }

@media print {
  .site-head, .site-foot, .notice, .aside, .theme-toggle { display: none; }
  body { background: #FFF; color: #000; }
  :root:not([data-theme="light"]) { --bg: #FFF; --surface: #FFF; --card: #FFF; --text: #000; --muted: #444;
    --line: #CCC; --accent: #176B5B; --deep: #FFF; --deep-text: #000; color-scheme: light; }
}

/* Korrekturen Entwurf 2 */
.hero .wrap { width: 100%; }

/* Ergebnislisten auf dem Handy als Karten */
@media (max-width: 700px) {
  .results thead { display: none; }
  .results, .results tbody { display: block; }
  .results tr { display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .results tr:nth-child(even) { background: color-mix(in srgb, var(--surface) 70%, transparent); }
  .results td { display: block; border: 0; padding: 0; background: none !important; }
  .results td.place, .results td.rank { grid-row: span 9; }
  .results td.num { text-align: left; font-size: 12px; color: var(--muted); display: inline; }
  .results td.num:not(:empty)::before { content: attr(data-label) " "; }
  .results td.num:empty { display: none; }
  .results .vals { grid-column: 2; }
  .meta { gap: 4px 16px; }
}

/* Übersichtstabellen mobil als kompakte Karten: Hauptspalte oben, übrige Angaben darunter */
@media (max-width: 700px) {
  .stack thead { display: none; }
  .stack, .stack tbody { display: block; }
  .stack tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .stack tr:nth-child(even) { background: color-mix(in srgb, var(--surface) 70%, transparent); }
  .stack td { display: block; border: 0; padding: 0; background: none !important; font-size: 12px; color: var(--muted); white-space: normal !important; }
  .stack td:nth-child(2) { order: -1; flex-basis: 100%; font-size: 13px; color: var(--text); }
  .stack td .sub { display: inline; }
  .stack td .sub::before { content: " · "; }
  .stack td:nth-child(2) .sub { display: block; }
  .stack td:nth-child(2) .sub::before { content: none; }
  .stack td.num { text-align: left; }
  .stack td[data-label]:not(:empty)::before { content: attr(data-label) " "; }
  .stack td:empty { display: none; }
  .stack td.place, .stack td.rank { color: var(--text); font-size: 12px; width: auto; }
}

/* Fließtext (Über, Impressum, Datenschutz) */
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { max-width: 72ch; }
.prose ul { padding-left: 20px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
