/* ExtraMiles-Website. Farben aus der Fahrer-App (android-app/.../theme/Theme.kt).
   Keine externen Schriften oder Ressourcen; Systemschrift. */
:root {
  --navy: #0A2B57;
  --navy-dunkel: #0B1E33;
  --petrol: #018D88;
  --petrol-text: #017A75;
  --petrol-hell: #5CD6CF;
  --petrol-flaeche: #E3F4F3;
  --hintergrund: #F5F7FA;
  --rand: #DDE3EB;
  --tinte: #152235;
  --gedaempft: #56657A;
  --hell-text: #C9D6E8;
  --hell-gedaempft: #AFC0D6;
  --weiss: #FFFFFF;
  --radius: 16px;
  --schatten: 0 1px 2px rgba(10, 43, 87, .06), 0 10px 30px rgba(10, 43, 87, .08);
  /* Fahrbahn mit gestrichelter Mittellinie (Strassenmotiv aus dem Logo) */
  --linie-waagerecht: repeating-linear-gradient(90deg, rgba(255, 255, 255, .8) 0 12px, transparent 12px 24px) center / 100% 2px no-repeat;
  --linie-senkrecht: repeating-linear-gradient(180deg, rgba(255, 255, 255, .8) 0 8px, transparent 8px 16px) center / 2px 100% no-repeat;
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinte);
  background: var(--weiss);
}

img, svg { display: block; max-width: 100%; }
a { color: var(--petrol-text); }
a:focus-visible, .knopf:focus-visible {
  outline: 3px solid var(--petrol);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 { color: var(--navy); line-height: 1.15; letter-spacing: -0.015em; margin: 0; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 1.2rem + 3.4vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.35rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }

.huelle { width: min(1160px, 100% - 32px); margin-inline: auto; }
.huelle.schmal { width: min(820px, 100% - 32px); }

.sprung {
  position: absolute; left: 16px; top: -48px; z-index: 20;
  background: var(--navy); color: var(--weiss); padding: 10px 14px; border-radius: 8px;
}
.sprung:focus { top: 12px; }

.vorschau-leiste {
  background: #FFF1C2; color: #6B4400; border-bottom: 1px solid #F0C36D;
  font-size: .875rem; font-weight: 700; text-align: center; padding: 8px 16px;
}

/* Kopf */
.kopf {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--rand);
}
.kopf-innen {
  display: flex; align-items: center; gap: 24px;
  min-height: 72px; flex-wrap: wrap;
}
.marke img { height: 44px; width: auto; }
.navigation { display: flex; gap: 28px; margin-left: auto; }
.navigation a {
  color: var(--tinte); text-decoration: none; font-weight: 600; font-size: .975rem;
}
.navigation a:hover { color: var(--petrol-text); }

/* Knoepfe */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  background: var(--petrol-text); color: var(--weiss); border: 2px solid var(--petrol-text);
  font-weight: 700; text-decoration: none; line-height: 1.2;
}
.knopf:hover { background: var(--navy); border-color: var(--navy); }
.knopf-hell { background: transparent; color: var(--weiss); border-color: rgba(255, 255, 255, .7); }
.knopf-hell:hover { background: var(--weiss); color: var(--navy); border-color: var(--weiss); }
.knopf-klein { min-height: 42px; padding: 8px 18px; font-size: .95rem; }
.symbol { width: 24px; height: 24px; flex: none; }
.symbol-klein { width: 18px; height: 18px; }

/* Einstieg: dunkler Titelbereich mit Strassenmotiv und echten App-Ansichten */
.held {
  position: relative; overflow: hidden;
  background:
    radial-gradient(760px 520px at 78% 30%, rgba(1, 141, 136, .28), transparent 65%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-dunkel) 100%);
  color: var(--hell-text);
  padding: clamp(44px, 6vw, 80px) 0 clamp(40px, 5vw, 72px);
}
/* Strasse nur hinter den Geraeten, nie unter Text */
.held-strasse { position: absolute; top: 0; right: 0; width: 52%; height: 100%; }
.held-raster {
  position: relative;
  display: grid; gap: clamp(36px, 5vw, 64px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center;
}
.held h1 { color: var(--weiss); }
.held .dachzeile { color: var(--petrol-hell); }
.einleitung { font-size: clamp(1.075rem, 1rem + .4vw, 1.25rem); color: var(--hell-text); margin-top: 20px; max-width: 36em; }
.aktionen { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.held .knopf:not(.knopf-hell) { background: var(--petrol); border-color: var(--petrol); }
.held .knopf:not(.knopf-hell):hover { background: var(--weiss); border-color: var(--weiss); color: var(--navy); }
.fakten {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px;
}
.fakten li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--hell-gedaempft); }
.fakten strong { color: var(--weiss); display: block; }
.fakten .symbol { color: var(--petrol-hell); margin-top: 2px; }

/* Smartphone-Rahmen um echte App-Ansichten (Bilder aus app_bildschirme.py) */
.geraete {
  margin: 0; display: grid; justify-items: center; align-items: start;
  grid-template-columns: minmax(0, 1fr);
}
.telefon {
  --rund: 35px;
  grid-area: 1 / 1; position: relative;
  width: min(290px, 64vw); padding: 9px; border-radius: calc(var(--rund) + 9px);
  background: linear-gradient(145deg, #2A3445, #0B111B 60%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 28px 60px rgba(3, 12, 26, .55), 0 6px 18px rgba(3, 12, 26, .35);
}
.telefon img { width: 100%; height: auto; background: var(--weiss); }
/* Geraeteleisten: oben Statusleiste mit Kameraloch, unten Gestenleiste */
.telefon::before, .telefon::after { content: ""; display: block; background-color: var(--weiss); }
.telefon::before {
  height: 26px; border-radius: var(--rund) var(--rund) 0 0;
  background-image: radial-gradient(circle at 50% 55%, #0B111B 0 5px, transparent 5.6px);
}
.telefon::after {
  height: 22px; border-radius: 0 0 var(--rund) var(--rund);
  background-image: linear-gradient(#3B4556, #3B4556);
  background-size: 34% 4px; background-position: center 40%; background-repeat: no-repeat;
}
.telefon-vorn { transform: translate(22%, 7%); z-index: 1; }
.telefon-hinten { transform: translate(-30%, -3%) scale(.9); }
.geraete figcaption {
  grid-area: 2 / 1; margin-top: clamp(40px, 4vw, 52px); position: relative;
  padding: 6px 14px; border-radius: 12px; background: rgba(11, 30, 51, .82);
  font-size: .85rem; color: var(--hell-text); text-align: center;
}

/* Abschnitte */
.abschnitt { padding: clamp(56px, 8vw, 104px) 0; }
.abschnitt-hell { background: var(--hintergrund); }
.abschnitt-einleitung { color: var(--gedaempft); max-width: 40em; margin-top: 14px; font-size: 1.1rem; }
.dachzeile {
  color: var(--petrol-text); font-weight: 700; font-size: .85rem;
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px;
}

/* Ablauf: Strasse mit Haltepunkten, auf breiten Bildschirmen waagerecht */
.strecke {
  position: relative; list-style: none; margin: 40px 0 0; padding: 0;
  counter-reset: stopp;
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px;
}
.strecke::before {
  content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 16px; border-radius: 8px;
  background: var(--linie-waagerecht), var(--navy);
}
.strecke li { position: relative; padding-top: 58px; }
.strecke li::before {
  counter-increment: stopp; content: counter(stopp);
  position: absolute; left: 0; top: 0; z-index: 1;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--petrol); color: var(--weiss); font-weight: 800;
  border: 4px solid var(--weiss); box-shadow: 0 0 0 2px var(--navy);
}
.strecke strong { display: block; font-size: 1.05rem; color: var(--navy); }
.strecke span { display: block; color: var(--gedaempft); font-size: .95rem; line-height: 1.45; margin-top: 4px; }

/* Funktionen */
.karten {
  display: grid; gap: 20px; margin-top: 40px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.karte {
  background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--schatten);
}
.karte h3 { margin: 18px 0 8px; }
.karte p { color: var(--gedaempft); font-size: 1rem; }
.karte-symbol {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: var(--petrol-flaeche); color: var(--petrol-text); flex: none;
}

/* Zusammenspiel Buero - Plattform - App */
.fluss {
  display: grid; align-items: center; margin-top: 40px;
  grid-template-columns: minmax(0, 1fr) minmax(40px, 110px) minmax(0, 1fr) minmax(40px, 110px) minmax(0, 1fr);
}
.fluss-knoten {
  display: grid; justify-items: center; text-align: center; gap: 4px; height: 100%; align-content: center;
  background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius);
  padding: 24px 16px; box-shadow: var(--schatten);
}
.fluss-knoten .karte-symbol { margin-bottom: 8px; }
.fluss-knoten strong { color: var(--navy); font-size: 1.05rem; line-height: 1.3; }
.fluss-knoten span { color: var(--gedaempft); font-size: .95rem; }
.fluss-mitte { background: var(--navy); border-color: var(--navy); }
.fluss-mitte img { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 8px; }
.fluss-mitte strong { color: var(--weiss); }
.fluss-mitte span { color: var(--hell-gedaempft); }
.fluss-strasse { height: 16px; background: var(--linie-waagerecht), var(--navy); }
.fluss-legende {
  grid-column: 1 / -1; list-style: none; margin: 24px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 36px;
  color: var(--gedaempft); font-size: .975rem;
}
.fluss-legende li { display: flex; gap: 8px; align-items: flex-start; }
.fluss-legende strong { color: var(--tinte); }
.fluss-legende .symbol { color: var(--petrol); margin-top: 3px; }
.fluss-legende .zurueck .symbol { transform: scaleX(-1); }

.zwei-spalten { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 36px; }
.spalte { background: var(--weiss); border: 1px solid var(--rand); border-radius: var(--radius); padding: 28px; }
.spalte-kopf { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.haken-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.haken-liste li { display: flex; gap: 10px; align-items: flex-start; }
.haken-liste .symbol { color: var(--petrol); width: 22px; height: 22px; margin-top: 2px; }

/* Plattform: Schema getrennter Daten */
.abschnitt-dunkel { background: var(--navy); color: #DCE6F2; }
.abschnitt-dunkel h2, .abschnitt-dunkel h3 { color: var(--weiss); }
.abschnitt-dunkel .dachzeile { color: var(--petrol-hell); }
.abschnitt-dunkel .abschnitt-einleitung { color: var(--hell-text); }
.merkmale {
  display: grid; gap: 20px; margin: 40px 0 0; padding: 0; list-style: none; counter-reset: schritt;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.merkmal {
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius); padding: 24px;
}
.merkmal .symbol { width: 32px; height: 32px; color: var(--petrol-hell); }
.merkmal h3 { margin: 16px 0 10px; }
.merkmal h3::before { counter-increment: schritt; content: counter(schritt) ". "; color: var(--petrol-hell); }
.merkmal p { font-size: 1rem; }
.vertrauen {
  list-style: none; margin: 40px 0 0; padding: 24px 0 0; display: flex; flex-wrap: wrap; gap: 14px 36px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.vertrauen li { display: flex; gap: 10px; align-items: center; color: var(--weiss); font-weight: 600; }
.vertrauen .symbol { color: var(--petrol-hell); }

/* Kontakt */
.kontakt-karte {
  display: grid; gap: 32px; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center;
  background: var(--hintergrund); border: 1px solid var(--rand); border-radius: 24px;
  padding: clamp(28px, 5vw, 56px);
}
.kontakt-karte h2 + p { margin-top: 14px; color: var(--gedaempft); }
.klein { font-size: .9rem; color: var(--gedaempft); margin-top: 14px; }
.kontakt-wege { display: grid; gap: 14px; }
.kontakt-weg {
  display: flex; gap: 14px; align-items: center;
  background: var(--weiss); border: 1px solid var(--rand); border-radius: 14px;
  padding: 16px 18px; text-decoration: none; color: var(--navy); font-weight: 700;
  overflow-wrap: anywhere;
}
.kontakt-weg:hover { border-color: var(--petrol); }
.kontakt-weg .symbol { color: var(--petrol-text); }
.kontakt-weg small { display: block; color: var(--gedaempft); font-weight: 600; font-size: .8rem; }

/* Rechtsseiten (Inhalt aus templates/rechtstexte/) */
.rechtsseite { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.rechtsseite h1 { font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.6rem); hyphens: auto; }
.unterzeile { color: var(--gedaempft); margin-top: 8px; font-size: .95rem; }
.hinweis-entwurf {
  margin-top: 20px; padding: 12px 14px; border-radius: 10px; font-weight: 700; font-size: .95rem;
  background: #FFF4DD; border: 1px solid #F0C36D; color: #6B4400;
}
.rechtstext { margin-top: 28px; overflow-wrap: anywhere; }
.rechtstext h2 { font-size: 1.25rem; margin: 32px 0 10px; hyphens: auto; }
.rechtstext h2:first-child { margin-top: 0; }
.rechtstext p { margin: 10px 0; }
.rechtstext ul { margin: 10px 0 14px; padding-left: 22px; }
.rechtstext li { margin: 5px 0; }
mark.rt-offen { background: #FDE2E1; color: #8A1C1C; padding: 0 3px; border-radius: 3px; }
mark.rt-pruefen { background: #FFF1C2; color: #6B4400; padding: 0 3px; border-radius: 3px; }

/* Fuss */
.fuss { background: var(--navy-dunkel); color: #B9C7D9; padding: 48px 0 28px; font-size: .95rem; }
.fuss-raster { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: center; }
.fuss-marke { display: flex; gap: 14px; align-items: center; }
.fuss-marke img { width: 48px; height: 48px; border-radius: 12px; }
.fuss-name { color: var(--weiss); font-weight: 800; font-size: 1.1rem; }
.fuss-links { display: flex; flex-wrap: wrap; gap: 22px; }
.fuss-links a { color: var(--weiss); font-weight: 600; text-decoration: none; }
.fuss-links a:hover { text-decoration: underline; }
.fuss-zeile { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 32px; padding-top: 20px; font-size: .85rem; }

/* Mittlere Bildschirme: Ablauf in zwei Reihen zu je drei Stopps */
@media (max-width: 1080px) {
  .strecke { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 32px; }
  .strecke::before { display: none; }
  .strecke li::after {
    content: ""; position: absolute; left: 0; right: -20px; top: 13px; height: 16px;
    background: var(--linie-waagerecht), var(--navy);
  }
  .strecke li:nth-child(3n + 1)::after { border-radius: 8px 0 0 8px; }
  .strecke li:nth-child(3n)::after { right: 0; border-radius: 0 8px 8px 0; }
}
@media (max-width: 900px) {
  .kopf-innen { gap: 10px 16px; padding: 10px 0; }
  .marke img { height: 36px; }
  .kopf .knopf-klein { margin-left: auto; }
  .navigation {
    order: 3; width: 100%; margin: 0; gap: 6px 10px; flex-wrap: wrap;
    border-top: 1px solid var(--rand); padding-top: 8px;
  }
  .navigation a { font-size: .85rem; }
  .held-raster, .zwei-spalten, .kontakt-karte { grid-template-columns: minmax(0, 1fr); }
  .held-strasse {
    top: auto; bottom: 110px; width: 100%; height: 40%;
    -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
    mask-image: linear-gradient(to bottom, #000 70%, transparent);
  }
  .fakten { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .telefon { --rund: 30px; width: min(250px, 56vw); padding: 8px; }
  .telefon::before { height: 22px; }
  .telefon::after { height: 18px; }
  .telefon-vorn { transform: translate(24%, 6%); }
  .telefon-hinten { transform: translate(-28%, -2%) scale(.9); }
}
@media (max-width: 760px) {
  /* Smartphone ohne Wiederholungen: "Anmelden" steht im Kopf, die Listen
     wiederholen Vorteilskarten und Legende. */
  .knopf-portal, #app .zwei-spalten { display: none; }
  .fluss { grid-template-columns: minmax(0, 1fr); }
  .fluss-strasse { width: 16px; height: 36px; justify-self: center; background: var(--linie-senkrecht), var(--navy); }
  .fluss-legende { flex-direction: column; align-items: flex-start; }
  .merkmale { grid-template-columns: minmax(0, 1fr); }
  /* Ablauf senkrecht: Strassenstueck von Stopp zu Stopp */
  .strecke { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 32px; }
  .strecke li { padding: 6px 0 26px 62px; min-height: 42px; }
  .strecke li::after, .strecke li:nth-child(n)::after {
    left: 13px; right: auto; top: 21px; bottom: -21px; width: 16px; height: auto; border-radius: 0;
    background: var(--linie-senkrecht), var(--navy);
  }
  .strecke li:last-child::after { display: none; }
}
