/*
Theme Name: mainstream.news
Description: Eigenes Theme fuer mainstream.news. Zeit als Ordnungsprinzip, Petrol als
             Markenfarbe, Messing ausschliesslich fuer Aktualitaet. Schriften liegen
             lokal im Theme (keine Verbindung zu Google) — siehe schriften/.
Author: fnerds
Version: 1.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: mainstream
*/

/* ================================================================
   Schriften — lokal ausgeliefert, damit keine Besucherdaten an
   Google gehen (DSGVO). Beide sind variabel: eine Datei je Familie.
   ================================================================ */
@font-face {
  font-family: "Newsreader";
  src: url("schriften/newsreader.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("schriften/newsreader-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("schriften/archivo.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  src: url("schriften/archivo-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ================================================================
   Farben. Der helle Satz steht auf :root, der dunkle wird nur
   ueber die Systemeinstellung nachgezogen.
   ================================================================ */
:root {
  --grund:       #EEF1F3;
  --flaeche:     #FFFFFF;
  --flaeche-2:   #F6F8F9;
  --tinte:       #131A20;
  --tinte-2:     #3D4A54;
  --stumm:       #6B7B86;
  --linie:       #D6DDE2;
  --petrol:      #0C5A66;
  --petrol-2:    #08434C;
  --petrol-hell: #E3EFF1;
  --messing:     #A8741A;
  --warnung:     #A3341F;
  --schatten:    0 1px 2px rgba(19,26,32,.06), 0 8px 24px rgba(19,26,32,.06);
  --breite:      1180px;
  --radius:      3px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund:       #0E1317;
    --flaeche:     #161D23;
    --flaeche-2:   #1B242B;
    --tinte:       #E9EEF1;
    --tinte-2:     #B3C0C9;
    --stumm:       #8496A1;
    --linie:       #2A353D;
    --petrol:      #4FAEBB;
    --petrol-2:    #6FC6D2;
    --petrol-hell: #12333A;
    --messing:     #D9A441;
    --warnung:     #E07A5F;
    --schatten:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--tinte);
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 2px;
}
img { max-width: 100%; height: auto; display: block; }

.huelle { max-width: var(--breite); margin: 0 auto; padding: 0 24px; }

/* Sprungmarke fuer Tastatur- und Screenreader-Nutzung */
.sprung {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--petrol); color: #fff; padding: 12px 20px;
  font-weight: 600; font-size: 14px;
}
.sprung:focus { left: 0; }

.nur-fuer-vorleser {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ================================================================
   Kopfleiste
   ================================================================ */
.kopf {
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; z-index: 20;
}
.kopf-oben {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px 0 12px;
}
.marke { display: flex; align-items: baseline; gap: 2px; min-width: 0; }
.marke-haupt {
  font-family: "Newsreader", Georgia, serif;
  font-size: 27px; font-weight: 700; letter-spacing: -.02em;
  white-space: nowrap;
}
.marke-punkt { color: var(--petrol); }
.marke-zusatz {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--stumm); margin-left: 14px; padding-left: 14px;
  border-left: 1px solid var(--linie); align-self: center; white-space: nowrap;
}
.kopf-rechts { display: flex; align-items: center; gap: 18px; }
.kopf-stand {
  font-size: 12px; color: var(--stumm);
  font-variant-numeric: tabular-nums; letter-spacing: .02em; white-space: nowrap;
}
.kopf-stand strong { color: var(--messing); font-weight: 600; }

.suche-knopf {
  background: none; border: 1px solid var(--linie); border-radius: 2px;
  color: var(--tinte-2); cursor: pointer; padding: 6px 9px;
  display: inline-flex; align-items: center;
}
.suche-knopf:hover { border-color: var(--petrol); color: var(--petrol); }
.suche-feld { display: none; padding: 0 0 14px; }
.suche-feld.offen { display: block; }
.suche-feld form { display: flex; gap: 8px; }
.suche-feld input[type="search"] {
  flex: 1; padding: 10px 13px; font: inherit; font-size: 15px;
  border: 1px solid var(--linie); border-radius: 2px;
  background: var(--flaeche-2); color: var(--tinte);
}
.suche-feld button[type="submit"] {
  padding: 10px 20px; font: inherit; font-size: 14px; font-weight: 600;
  background: var(--petrol); color: #fff; border: 0; border-radius: 2px; cursor: pointer;
}

.nav { display: flex; gap: 26px; overflow-x: auto; padding: 0 0 11px; scrollbar-width: thin; }
.nav a {
  font-size: 14px; font-weight: 500; color: var(--tinte-2);
  white-space: nowrap; padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--petrol); border-bottom-color: var(--petrol); }
.nav .aktuell-menue-eintrag > a,
.nav .current-menu-item > a,
.nav .current-cat > a { color: var(--tinte); border-bottom-color: var(--messing); }
.nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }

/* ================================================================
   Startseite: Aufmacher und Nachrichtenlage
   ================================================================ */
.oben {
  display: grid; grid-template-columns: minmax(0,1.85fr) minmax(0,1fr);
  gap: 32px; margin: 30px 0 44px;
}
.aufmacher {
  background: var(--flaeche); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--schatten);
}
.aufmacher-bild { aspect-ratio: 16/9; background: var(--flaeche-2); }
.aufmacher-bild img { width: 100%; height: 100%; object-fit: cover; }
.aufmacher-text { padding: 24px 28px 28px; }
.aufmacher h2, .aufmacher h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12;
  font-weight: 600; letter-spacing: -.015em; margin: 12px 0 14px;
  text-wrap: balance;
}
.aufmacher h2 a:hover, .aufmacher h1 a:hover { color: var(--petrol); }
.aufmacher p { color: var(--tinte-2); font-size: 17px; margin: 0 0 18px; max-width: 58ch; }
.aufmacher-fuss {
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px; color: var(--stumm);
  border-top: 1px solid var(--linie); padding-top: 14px;
  font-variant-numeric: tabular-nums;
}

.chip {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--petrol); background: var(--petrol-hell);
  padding: 4px 9px; border-radius: 2px;
}
.chip:hover { background: var(--petrol); color: var(--flaeche); }

.lage {
  background: var(--flaeche); border-radius: var(--radius); padding: 22px 24px 8px;
  box-shadow: var(--schatten); align-self: start;
}
.lage-kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 14px; border-bottom: 2px solid var(--tinte);
}
.lage-kopf h2 {
  font-family: "Archivo", sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; margin: 0;
}
.lage-puls {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--messing); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.lage-punkt {
  width: 6px; height: 6px; border-radius: 50%; background: var(--messing);
  animation: pulsieren 2.4s ease-in-out infinite;
}
@keyframes pulsieren { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.lage ul { list-style: none; margin: 0; padding: 0; }
.lage-eintrag {
  display: grid; grid-template-columns: 46px 1fr; gap: 14px;
  padding: 15px 0; border-bottom: 1px solid var(--linie);
}
.lage-eintrag:last-child { border-bottom: 0; }
.lage-zeit {
  font-size: 13px; font-weight: 600; color: var(--messing);
  font-variant-numeric: tabular-nums; padding-top: 1px;
}
.lage-kat {
  display: block; font-size: 10.5px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--stumm); margin-bottom: 3px;
}
.lage-titel {
  font-family: "Newsreader", Georgia, serif;
  font-size: 16.5px; line-height: 1.32; font-weight: 500; display: block;
  transition: color .15s;
}
.lage-titel:hover { color: var(--petrol); }

/* ================================================================
   Kategorieband und Karten
   ================================================================ */
.band { margin-bottom: 46px; }
.band-kopf {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 2px solid var(--tinte); padding-bottom: 10px; margin-bottom: 22px;
  gap: 16px;
}
.band-kopf h2, .band-kopf h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 23px; font-weight: 600; margin: 0; letter-spacing: -.01em;
}
.band-mehr { font-size: 12.5px; font-weight: 600; color: var(--petrol); letter-spacing: .04em; white-space: nowrap; }
.band-mehr:hover { text-decoration: underline; }

.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 26px; }
.raster-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.karte { display: flex; flex-direction: column; gap: 9px; }
.karte-bild { aspect-ratio: 16/9; overflow: hidden; border-radius: 2px; background: var(--flaeche-2); }
.karte-bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.karte:hover .karte-bild img { transform: scale(1.03); }
.karte .chip { align-self: flex-start; }
.karte-titel {
  font-family: "Newsreader", Georgia, serif;
  font-size: 19px; line-height: 1.25; font-weight: 600; margin: 0;
  letter-spacing: -.005em; text-wrap: balance;
}
.karte-titel a:hover { color: var(--petrol); }
.karte-text { font-size: 14px; color: var(--tinte-2); margin: 0; }
.karte-fuss {
  font-size: 12px; color: var(--stumm); font-variant-numeric: tabular-nums;
  margin-top: auto; padding-top: 4px;
}

/* ================================================================
   Artikelseite
   ================================================================ */
.artikel { background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten); margin: 30px 0 40px; }
.artikel-kopf { padding: 30px 40px 0; max-width: 780px; }
.artikel h1 {
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(29px, 3.6vw, 43px); line-height: 1.13; font-weight: 600;
  letter-spacing: -.015em; margin: 14px 0 16px; text-wrap: balance;
}
.artikel-vorspann { font-size: 19px; line-height: 1.5; color: var(--tinte-2); margin: 0 0 20px; }
.artikel-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  font-size: 13px; color: var(--stumm); font-variant-numeric: tabular-nums;
  border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie);
  padding: 13px 0; margin-bottom: 26px;
}
.artikel-bild { margin: 0 0 8px; }
.artikel-bild img { width: 100%; border-radius: 0; }
.artikel-bild figcaption { font-size: 12.5px; color: var(--stumm); padding: 9px 40px 0; }

.artikel-text { padding: 0 40px 34px; max-width: 780px; font-size: 17.5px; line-height: 1.68; }
.artikel-text p { margin: 0 0 1.15em; }
.artikel-text h2 {
  font-family: "Newsreader", Georgia, serif; font-size: 26px; font-weight: 600;
  line-height: 1.25; margin: 1.7em 0 .55em; letter-spacing: -.01em;
}
.artikel-text h3 { font-size: 20px; font-weight: 700; margin: 1.5em 0 .5em; }
.artikel-text a { color: var(--petrol); text-decoration: underline; text-underline-offset: 2px; }
.artikel-text a:hover { color: var(--petrol-2); }
.artikel-text img { border-radius: 2px; margin: 1.4em 0; }
.artikel-text figure { margin: 1.5em 0; }
.artikel-text figcaption { font-size: 13px; color: var(--stumm); padding-top: 7px; }
.artikel-text blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--messing);
  font-family: "Newsreader", Georgia, serif; font-size: 20px; line-height: 1.45;
  color: var(--tinte); font-style: italic;
}
.artikel-text ul, .artikel-text ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.artikel-text li { margin-bottom: .45em; }
.artikel-text iframe, .artikel-text video { max-width: 100%; border-radius: 2px; }

.quellen {
  margin: 0 40px 34px; padding: 16px 20px; background: var(--flaeche-2);
  border-left: 2px solid var(--petrol); border-radius: 0 2px 2px 0;
  font-size: 14px; color: var(--tinte-2);
}
.quellen strong { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--stumm); margin-bottom: 5px; }

.weiter { margin-bottom: 46px; }

/* Krumenpfad */
.krumen { font-size: 12.5px; color: var(--stumm); padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 7px; }
.krumen a { color: var(--petrol); }
.krumen a:hover { text-decoration: underline; }

/* ================================================================
   Listen, Blaettern, Suche
   ================================================================ */
.liste-kopf { padding: 30px 0 0; }
.liste-kopf h1 {
  font-family: "Newsreader", Georgia, serif; font-size: 34px; font-weight: 600;
  margin: 6px 0 8px; letter-spacing: -.015em;
}
.liste-kopf p { color: var(--tinte-2); margin: 0 0 4px; max-width: 62ch; }
.liste-anzahl { font-size: 13px; color: var(--stumm); font-variant-numeric: tabular-nums; }

.blaettern {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin: 8px 0 50px;
}
.blaettern .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: 2px;
  font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.blaettern .page-numbers:hover { border-color: var(--petrol); color: var(--petrol); }
.blaettern .page-numbers.current {
  background: var(--petrol); border-color: var(--petrol); color: #fff; font-weight: 600;
}
.blaettern .dots { border: 0; background: none; }

/* ================================================================
   Fussbereich
   ================================================================ */
.fuss {
  background: var(--flaeche); border-top: 1px solid var(--linie);
  margin-top: 20px; padding: 34px 0 40px;
}
.fuss-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 28px; margin-bottom: 26px; }
.fuss h3 {
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--stumm); margin: 0 0 11px;
}
.fuss ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.fuss li a { font-size: 14px; color: var(--tinte-2); }
.fuss li a:hover { color: var(--petrol); }
.fuss-unten {
  border-top: 1px solid var(--linie); padding-top: 18px;
  font-size: 12.5px; color: var(--stumm);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
}

/* ================================================================
   Hinweiskasten (z. B. leere Suche, 404)
   ================================================================ */
.hinweis {
  background: var(--flaeche); border-radius: var(--radius); box-shadow: var(--schatten);
  padding: 44px 40px; margin: 30px 0 50px; text-align: center;
}
.hinweis h1 {
  font-family: "Newsreader", Georgia, serif; font-size: 30px; font-weight: 600; margin: 0 0 10px;
}
.hinweis p { color: var(--tinte-2); margin: 0 auto 20px; max-width: 52ch; }
.hinweis form { max-width: 420px; margin: 0 auto; display: flex; gap: 8px; }
.hinweis input[type="search"] {
  flex: 1; padding: 10px 13px; font: inherit; border: 1px solid var(--linie);
  border-radius: 2px; background: var(--flaeche-2); color: var(--tinte);
}
.hinweis button {
  padding: 10px 20px; font: inherit; font-weight: 600; background: var(--petrol);
  color: #fff; border: 0; border-radius: 2px; cursor: pointer;
}

/* ================================================================
   Kleinere Bildschirme
   ================================================================ */
@media (max-width: 880px) {
  .oben { grid-template-columns: 1fr; gap: 26px; }
  .kopf-stand { display: none; }
  .artikel-kopf, .artikel-text { padding-left: 22px; padding-right: 22px; }
  .quellen { margin-left: 22px; margin-right: 22px; }
  .artikel-bild figcaption { padding-left: 22px; padding-right: 22px; }
  .marke-zusatz { display: none; }
}
@media (max-width: 560px) {
  .huelle { padding: 0 16px; }
  .artikel-text { font-size: 17px; }
}

/* ================================================================
   Bewegung nur, wenn der Besucher sie zulaesst
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .karte:hover .karte-bild img { transform: none; }
}
