/* opc-liner – Grundlagen: Farben, Schriften, Typografie, wiederkehrende Bausteine.
   Alle url() sind relativ, damit die Vorschau unter einem Pfadpraefix funktioniert. */

/* ---- Schriften (OFL, Fontsource 5.3.0, nur Latin, nur genutzte Schnitte, echte Kursive) ---- */
@font-face {
  font-family: "Barlow Condensed";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/barlow-condensed-latin-700-italic.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: italic;
  font-weight: 800;
  font-display: swap;
  src: url(../fonts/barlow-condensed-latin-800-italic.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/barlow-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/barlow-latin-400-italic.woff2) format("woff2");
}
@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/barlow-latin-600-normal.woff2) format("woff2");
}

/* ---- Farben und Masse ---- */
:root {
  --asphalt: #121417;      /* Grund */
  --flaeche: #1b1f25;      /* Karten, Kopf */
  --kante: #2b3039;        /* Linien */
  --text: #eef1f5;         /* 16.3 : 1 auf Asphalt */
  --text-leise: #a3abb7;   /* 8.0 : 1 auf Asphalt */
  --opc-blau: #0b5fd8;     /* Akzent, Flaechen mit weisser Schrift: 5.8 : 1 zu Weiss */
  --link: #6ea8ff;         /* Blau fuer Schrift auf Asphalt: 7.7 : 1 */
  --gruen: #3dbb6c;        /* Nordschleifen-Gruen, sparsam: 7.5 : 1 auf Asphalt */
  --weiss: #ffffff;

  --schrift-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --schrift-text: "Barlow", "Segoe UI", system-ui, sans-serif;
  --mass: 54ch;            /* Fliesstext hoechstens ca. 70 Zeichen (Barlow: 1ch ist breiter als ein Durchschnittszeichen) */
  --breite: 76rem;
  --rand: clamp(1rem, 4vw, 2.5rem);
  --schraeg: -12deg;
}

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

html {
  font-synthesis: none;    /* kein kuenstliches Fett oder Schraeg: es gibt nur echte Schnitte */
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--asphalt) url(../img/asphalt.svg);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--schrift-display);
  font-style: italic;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--weiss);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3, h4 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 700; }

p, ul, ol, dl { margin: 0 0 1em; }
strong, b { font-weight: 600; color: var(--weiss); }
em, i { font-style: italic; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--weiss); text-decoration-color: var(--gruen); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; border-radius: 2px; }
/* Auf und an blauen Flaechen ist der blaue Ring zu schwach (ca. 2,4 : 1), dort ist er weiss (5,8 : 1 zu OPC-Blau,
   18,5 : 1 zu Asphalt). Der schraege clip-path wuerde den Ring abschneiden, beim Fokus faellt er deshalb weg. */
.knopf:focus-visible, .nav-story a:focus-visible { clip-path: none; outline-color: var(--weiss); }
.story-teaser :focus-visible, .menue-knopf:focus-visible, .reiter a[aria-current]:focus-visible { outline-color: var(--weiss); }
::selection { background: var(--opc-blau); color: var(--weiss); }

/* ---- Bausteine ---- */
.breite {
  width: 100%;
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

.sprunglink {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--weiss);
  color: var(--asphalt);
  font-weight: 600;
}
.sprunglink:focus { top: 1rem; }

/* Zielflaggen-Streifen: zwei Reihen Karos, zur Seite hin ausgeblendet */
.zielflagge {
  height: 12px;
  background: repeating-conic-gradient(var(--weiss) 0 25%, var(--asphalt) 0 50%) 0 0 / 12px 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 85%);
  mask-image: linear-gradient(90deg, transparent 15%, #000 85%);
  opacity: 0.85;
}

/* Startnummer: weisses Feld, schwarze kursive Ziffern */
.startnummer {
  display: inline-block;
  font-family: var(--schrift-display);
  font-style: italic;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  color: var(--asphalt);
  background: var(--weiss);
  padding: 0.06em 0.2em 0.02em 0.16em;
  border-radius: 0.1em;
  box-shadow: 0.06em 0.06em 0 var(--opc-blau);
}

.knopf {
  display: inline-block;
  font-family: var(--schrift-display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--weiss);
  background: var(--opc-blau);
  padding: 0.55rem 1.4rem 0.5rem;
  clip-path: polygon(0.6rem 0, 100% 0, calc(100% - 0.6rem) 100%, 0 100%);
}
.knopf::after { content: " \2192"; }
.knopf:hover { color: var(--weiss); background: #0a52bb; }

.leer { display: none; }

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