/* Overlander Cockpit -- Webseite.
   Farben eins zu eins aus der App (AppTheme.palette): die Seite soll sich
   anfuehlen wie das Cockpit selbst. Eine Schriftfamilie in zwei Breiten --
   Barlow, vom Strassenschild inspiriert, schmal fuer Kennzahlen und Titel. */

:root {
  --nacht: #0a0a0b;
  --kachel: #131316;
  --kachel-hell: #1a1a1e;
  --kante: #2c2a25;
  --kante-hell: #3a362e;
  --elfenbein: #f2ecdc;
  --staub: #8c8574;
  --signal: #e1cc4f;
  --signal-dunkel: #7c7029;

  --schmal: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --breit: "Barlow", system-ui, -apple-system, sans-serif;

  --radius-gross: 28px;
  --radius: 16px;
  --rand: clamp(16px, 4vw, 48px);
  --spalte: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--nacht);
  color: var(--elfenbein);
  font: 400 1.125rem/1.6 var(--breit);
  font-feature-settings: "tnum" 0;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--signal); color: var(--nacht);
        padding: 8px 14px; border-radius: 8px; font-weight: 600; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 2 * var(--rand), var(--spalte)); margin-inline: auto; }

/* ---------- Hoehenlinien ---------- */
.topo {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none; opacity: .55;
}

/* ---------- Kopf ---------- */
.kopf {
  position: sticky; top: 0; z-index: 5;
  background: linear-gradient(var(--nacht) 55%, rgb(10 10 11 / 0));
  padding-block: 18px 26px;
}
.kopf .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wortmarke {
  font: 700 1.05rem/1 var(--breit);
  letter-spacing: .42em; text-decoration: none; color: var(--signal);
  padding-block: 8px; margin-right: -.42em;
  /* Die Marke heisst Overlander Cockpit: der Zusatz klein darunter. */
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
}
.wortmarke .zusatz { font-size: .5em; letter-spacing: .9em; margin-right: -.9em; color: var(--elfenbein); font-weight: 600; }
.kopf nav ul { display: flex; gap: clamp(14px, 3vw, 32px); list-style: none; margin: 0; padding: 0; }
.kopf nav a {
  text-decoration: none; color: var(--staub); font-weight: 500; font-size: 1rem;
  padding-block: 8px; transition: color .2s;
}
.kopf nav a:hover, .kopf nav a[aria-current="page"] { color: var(--elfenbein); }
@media (max-width: 640px) {
  .kopf nav .nur-breit { display: none; }
  .wortmarke { letter-spacing: .3em; font-size: .95rem; }
}

/* ---------- Titel ---------- */
.titel { padding-block: clamp(24px, 6vw, 72px) clamp(56px, 9vw, 120px); }
.titel .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 6vw, 88px); align-items: center;
}
.titel h1 {
  font: 700 clamp(3rem, 8.2vw, 6.6rem)/.9 var(--schmal);
  letter-spacing: -.01em; margin: 0 0 28px;
  text-wrap: balance;
}
.titel .lead {
  font-size: clamp(1.15rem, 1.8vw, 1.35rem); line-height: 1.55;
  color: #d9d2c0; max-width: 34ch; margin: 0 0 36px;
}
.bald {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  padding: 14px 22px 14px 18px; border-radius: 999px;
  border: 1px solid var(--kante-hell); background: var(--kachel);
  font-weight: 500;
}
.bald svg { width: 22px; height: 22px; flex: none; }
.bald span { color: var(--staub); font-weight: 400; }
.titel .geraete { position: relative; justify-self: center; width: min(100%, 390px); }

@media (max-width: 860px) {
  /* minmax(0, …): eine Spalte "1fr" waechst mit ihrem breitesten Inhalt
     mit und schob die Seite in Telefonbreite ueber den Rand. */
  .titel .wrap { grid-template-columns: minmax(0, 1fr); }
  .titel .geraete { width: min(78%, 340px); }
}

/* ---------- Geraeterahmen ---------- */
.telefon {
  position: relative; border-radius: 15.5% / 7.1%;
  padding: 3.2%; background: #1d1d20;
  box-shadow: 0 0 0 1px #34322c, 0 40px 80px -30px rgb(0 0 0 / .9),
              0 0 120px -40px rgb(225 204 79 / .18);
}
.telefon img { border-radius: 12.6% / 5.8%; width: 100%; }

/* ---------- Kennzahlenleiste, wie die Leiste unter der Karte ---------- */
.leiste {
  border-block: 1px solid var(--kante);
  background: rgb(19 19 22 / .82);
  backdrop-filter: blur(6px);
}
.leiste ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.leiste li { padding: 26px clamp(12px, 2.4vw, 32px); border-left: 1px solid var(--kante); }
.leiste li:first-child { border-left: 0; }
.leiste b {
  display: block; font: 700 clamp(2.4rem, 5vw, 3.6rem)/1 var(--schmal);
  font-variant-numeric: tabular-nums;
}
.leiste span { color: var(--staub); font-size: 1rem; }
@media (max-width: 720px) {
  .leiste ul { grid-template-columns: repeat(2, 1fr); }
  .leiste li:nth-child(3) { border-left: 0; }
  .leiste li:nth-child(n+3) { border-top: 1px solid var(--kante); }
}

/* ---------- Abschnitte ---------- */
.abschnitt { padding-block: clamp(72px, 11vw, 150px); }
.abschnitt + .abschnitt { padding-top: 0; }
.zweispaltig {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 7vw, 110px); align-items: center;
}
.zweispaltig.gespiegelt > :first-child { order: 2; }
@media (max-width: 860px) {
  .zweispaltig { grid-template-columns: minmax(0, 1fr); }
  .zweispaltig.gespiegelt > :first-child { order: 0; }
}

h2 {
  font: 700 clamp(2.3rem, 5.2vw, 4rem)/.95 var(--schmal);
  margin: 0 0 22px; text-wrap: balance;
}
h3 { font: 600 1.6rem/1.1 var(--schmal); margin: 0 0 8px; letter-spacing: .005em; }
.text p { color: #d9d2c0; max-width: 58ch; margin: 0 0 18px; }
.text p.klein { color: var(--staub); font-size: 1rem; }

/* Fakten als Messwerte: Zahl oder Stichwort schmal und hell, Erklaerung darunter. */
.werte { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 2px;
         grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.werte li { background: var(--kachel); padding: 18px 20px; border: 1px solid var(--kante); }
.werte li:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.werte li:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.werte b { display: block; font: 600 1.55rem/1.1 var(--schmal); color: var(--elfenbein); }
.werte span { color: var(--staub); font-size: .95rem; line-height: 1.4; display: block; margin-top: 4px; }
@media (max-width: 560px) {
  .werte li:first-child { border-radius: var(--radius) var(--radius) 0 0; }
  .werte li:last-child { border-radius: 0 0 var(--radius) var(--radius); }
}

.bild { justify-self: center; width: min(100%, 380px); }
.bild.breit { width: 100%; }
.karte-rahmen {
  border-radius: var(--radius-gross); overflow: hidden;
  border: 1px solid var(--kante-hell); box-shadow: 0 40px 80px -40px rgb(0 0 0 / .9);
}

/* iPad quer */
.ipad-abschnitt { padding-top: 0; }
.tablet { margin-top: clamp(32px, 5vw, 56px); border-radius: 4.2% / 6%; padding: 1.6%;
          background: #1d1d20; box-shadow: 0 0 0 1px #34322c, 0 50px 100px -40px rgb(0 0 0 / .9); }
.tablet img { border-radius: 3% / 4.4%; width: 100%; }

/* Kacheln der App als Dreiergruppe */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px);
           margin-top: clamp(40px, 6vw, 72px); }
.kachel { margin: 0; }
.kachel img { border-radius: 22px; border: 1px solid var(--kante); }
.kachel figcaption { margin-top: 18px; }
.kachel figcaption p { color: var(--staub); font-size: 1rem; margin: 0; max-width: 34ch; }
@media (max-width: 860px) { .kacheln { grid-template-columns: minmax(0, 1fr); max-width: 420px; } }

/* Datenschutz-Versprechen */
.versprechen { border: 1px solid var(--kante); border-radius: var(--radius-gross);
               background: rgb(19 19 22 / .88); padding: clamp(28px, 5vw, 64px); }
.versprechen .werte { margin-top: 36px; }

/* Neuigkeiten */
.notizen { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.notiz { background: var(--kachel); border: 1px solid var(--kante); border-radius: var(--radius);
         padding: clamp(22px, 3vw, 34px); }
.notiz time { color: var(--staub); font-size: .95rem; }
.notiz h3 { margin: 4px 0 14px; }
.notiz ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.notiz li { position: relative; padding-left: 20px; color: #d9d2c0; }
.notiz li::before { content: ""; position: absolute; left: 0; top: .72em; width: 7px; height: 7px;
                    border-radius: 50%; background: var(--signal); }
.mehr { display: inline-block; margin-top: 26px; color: var(--signal); font-weight: 600;
        text-decoration: none; border-bottom: 1px solid var(--signal-dunkel); padding-bottom: 2px; }
.mehr:hover { border-color: var(--signal); }

/* ---------- Unterseiten ---------- */
.seite { padding-block: clamp(32px, 6vw, 72px) clamp(80px, 10vw, 140px); }
.seite .inhalt { max-width: 760px; }
.seite h1 { font: 700 clamp(2.8rem, 7vw, 5rem)/.92 var(--schmal); margin: 0 0 18px; }
.seite .stand { color: var(--staub); margin: 0 0 48px; }
.seite h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin: 56px 0 14px; }
.seite h3 { margin: 32px 0 8px; }
.seite p, .seite li { color: #d9d2c0; }
.seite ul { padding-left: 1.2em; }
.seite li { margin-bottom: 6px; }
.seite a { color: var(--signal); }
.seite table { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 18px 0; }
.seite th, .seite td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0;
                       border-bottom: 1px solid var(--kante); }
.seite th { color: var(--staub); font-weight: 500; }
.tabelle { overflow-x: auto; }
/* Auf dem Telefon je Dienst ein Block statt vier Spalten zum Seitwaerts-Scrollen. */
@media (max-width: 640px) {
  .seite table, .seite tbody, .seite tr, .seite td { display: block; }
  .seite thead { display: none; }
  .seite tr { border: 1px solid var(--kante); border-radius: var(--radius); padding: 14px 16px;
              margin-bottom: 12px; background: var(--kachel); }
  .seite td { border: 0; padding: 4px 0; }
  .seite td::before { content: attr(data-label); display: block; color: var(--staub);
                      font-size: .85rem; }
  .seite td:first-child { font-weight: 600; color: var(--elfenbein); }
  .seite td:first-child::before { display: none; }
}
.platzhalter { background: rgb(225 204 79 / .14); color: var(--signal); padding: 1px 6px;
               border-radius: 4px; font-weight: 500; }
details { border-bottom: 1px solid var(--kante); padding-block: 6px; }
summary { cursor: pointer; padding-block: 14px; font: 600 1.35rem/1.25 var(--schmal);
          list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--signal); font-weight: 500; }
details[open] summary::after { content: "–"; }
details p { margin-top: 0; }

/* ---------- Fuss ---------- */
.fuss { border-top: 1px solid var(--kante); padding-block: 44px 56px; color: var(--staub);
        font-size: 1rem; background: rgb(10 10 11 / .9); }
.fuss .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; }
.fuss ul { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 0; padding: 0; }
.fuss a { text-decoration: none; }
.fuss a:hover { color: var(--elfenbein); }

/* Sanftes Einblenden der Abschnitte -- nur, wenn Bewegung erwuenscht ist. */
@media (prefers-reduced-motion: no-preference) {
  .js .einblenden { opacity: 0; transform: translateY(18px);
                transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js .einblenden.sichtbar { opacity: 1; transform: none; }
}

/* ---------- Titelbuehne mit Geraetewahl ---------- */
.titel .wrap:has(.buehne) { grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 48px); }
.titel-text { max-width: 820px; }
.titel-text h1 { max-width: 14ch; }
.buehne { margin: 0; display: grid; justify-items: center; gap: 22px; }
.rahmen {
  position: relative; background: #1d1d20; padding: 1.4%;
  border-radius: clamp(18px, 3vw, 40px);
  box-shadow: 0 0 0 1px #34322c, 0 50px 100px -40px rgb(0 0 0 / .9),
              0 0 140px -50px rgb(225 204 79 / .2);
  transition: width .45s cubic-bezier(.2, .7, .2, 1), transform .26s ease, opacity .26s ease;
}
.rahmen img { width: 100%; height: 100%; border-radius: clamp(12px, 2.2vw, 30px); object-fit: cover; }
.buehne[data-lage="quer"] .rahmen { width: min(100%, 1180px); }
.buehne[data-lage="hoch"] .rahmen { width: min(100%, 440px); }
.buehne[data-geraet="iphone"][data-lage="hoch"] .rahmen { width: min(78%, 360px); padding: 3%; border-radius: 15% / 7%; }
.buehne[data-geraet="iphone"][data-lage="hoch"] .rahmen img { border-radius: 12.5% / 5.8%; }
.buehne[data-geraet="iphone"][data-lage="quer"] .rahmen { width: min(100%, 1000px); padding: 1.4%; border-radius: 7% / 15%; }
.buehne[data-geraet="iphone"][data-lage="quer"] .rahmen img { border-radius: 5.8% / 12.5%; }
.rahmen.dreht { transform: rotate(-90deg) scale(.55); opacity: 0; }
.rahmen.wechselt { transform: scale(.92); opacity: 0; }
.buehne-steuerung { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
.umschalter { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--kachel);
              border: 1px solid var(--kante-hell); }
.umschalter button, .drehen {
  font: 600 1rem/1 var(--breit); color: var(--staub); background: none; border: 0;
  padding: 11px 20px; border-radius: 999px; cursor: pointer; min-height: 44px;
}
.umschalter button[aria-pressed="true"] { background: var(--elfenbein); color: var(--nacht); }
.drehen { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--kante-hell);
          background: var(--kachel); color: var(--elfenbein); }
.drehen svg { width: 20px; height: 20px; }
.drehen:disabled { opacity: .35; cursor: default; }
@media (prefers-reduced-motion: reduce) { .rahmen { transition: none; } }

/* ---------- Kachelliste ---------- */
.kachelliste { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
               gap: clamp(20px, 3vw, 40px) clamp(24px, 4vw, 56px); margin-top: clamp(36px, 5vw, 60px); }
.kachelzeile { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px; align-items: center; }
.kachelzeile.breit { grid-column: 1 / -1; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); }
.kachelbild img { border-radius: 20px; border: 1px solid var(--kante); width: 100%; }
.kachelzeile p { color: #d9d2c0; margin: 0; max-width: 46ch; }
@media (max-width: 960px) { .kachelliste { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .kachelzeile, .kachelzeile.breit { grid-template-columns: minmax(0, 1fr); }
  .kachelbild { max-width: 300px; }
  .kachelzeile.breit .kachelbild { max-width: none; }
}

/* Lage als lebende Anzeige, nachgebaut wie die Kachel der App */
.lage-live { aspect-ratio: 555 / 561; background: var(--kachel); border: 1px solid var(--kante);
             border-radius: 20px; padding: 10% 7%; display: grid; grid-template-rows: 1fr 1fr; gap: 8%; }
.lage-live .achse { display: grid; grid-template-rows: auto auto auto; align-content: center; gap: 6px;
                    border-bottom: 1px solid var(--kante); padding-bottom: 8%; }
.lage-live .achse:last-child { border-bottom: 0; padding-bottom: 0; }
.lage-live .wert { justify-self: center; font: 600 clamp(1.6rem, 3vw, 2.2rem)/1 var(--breit);
                   font-variant-numeric: tabular-nums; margin-left: 8%; }
.lage-live .spur { position: relative; height: 4px; background: #232327; border-radius: 2px; margin-block: 6px; }
.lage-live .marke { position: absolute; top: -5px; width: 2px; height: 14px; }
.lage-live .marke.gelb { background: var(--signal); }
.lage-live .marke.rot { background: #c8371d; }
.lage-live .punkt { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%;
                    background: var(--elfenbein); transform: translate(-50%, -50%); }
.lage-live small { color: var(--staub); letter-spacing: .28em; font-size: .72rem; font-weight: 600; }

/* ---------- Schichten ---------- */
.schichten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px);
             margin-top: clamp(36px, 5vw, 60px); }
.schicht { margin: 0; }
.schichtbild { border-radius: var(--radius-gross); overflow: hidden; border: 1px solid var(--kante-hell);
               box-shadow: 0 40px 80px -45px rgb(0 0 0 / .9); }
.schicht figcaption { margin-top: 18px; }
.schicht figcaption p { color: #d9d2c0; margin: 0 0 6px; max-width: 52ch; }
.schicht .quelle, .drohnenbild + p { color: var(--staub); font-size: .95rem; }
@media (max-width: 860px) { .schichten { grid-template-columns: minmax(0, 1fr); } }

.kachelzeile.nurtext { grid-template-columns: minmax(0, 1fr); align-self: center;
                       border-left: 2px solid var(--kante-hell); padding-left: 22px; }

/* Positionen als Klassen: die Sicherheitsrichtlinie (style-src 'self')
   verbietet style-Attribute im HTML -- sie wuerden still ignoriert. */
.lage-live .m1 { left: 14.4%; } .lage-live .m2 { left: 22.2%; }
.lage-live .m3 { left: 77.8%; } .lage-live .m4 { left: 85.6%; }
.mehr.eng { margin: 0; }

/* ---------- Sprachschalter ---------- */
.kopf nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 32px); }
.sprache {
  text-decoration: none; color: var(--elfenbein); font: 600 .85rem/1 var(--breit); letter-spacing: .08em;
  border: 1px solid var(--kante-hell); border-radius: 999px; padding: 7px 10px;
}
.sprache:hover { border-color: var(--signal); color: var(--signal); }

/* ---------- Anleitung und FAQ ---------- */
.seite [id] { scroll-margin-top: 96px; }
.inhaltsverzeichnis { background: var(--kachel); border: 1px solid var(--kante); border-radius: var(--radius);
                      padding: 18px 22px; }
.inhaltsverzeichnis ol { columns: 2 220px; column-gap: 32px; margin: 0; padding-left: 1.4em; }
.inhaltsverzeichnis li { break-inside: avoid; }
.schritte { padding-left: 1.4em; }
.schritte li { margin-bottom: 10px; }
.reihe li { margin-bottom: 8px; }
.knoepfe { margin: 18px 0; }
.knoepfe dt { font-weight: 600; color: var(--elfenbein); margin-top: 16px; }
.knoepfe dd { margin: 4px 0 0; color: #d9d2c0; }
.tipp { border-left: 3px solid var(--signal); padding: 4px 0 4px 16px; }
.seite .bild { margin: 28px 0; }
.seite .bild img { display: block; width: 100%; height: auto; border-radius: var(--radius);
                   border: 1px solid var(--kante); }
.seite .bild.hoch { max-width: 320px; }
.seite .bild.klein { max-width: 300px; }
.seite .bild figcaption { color: var(--staub); font-size: .95rem; margin-top: 8px; }
.bildreihe { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.bildreihe .bild { margin: 12px 0; }

/* ---------- Platzhalter ---------- */
body:has(.ph-platzhalter) .kopf .wortmarke { visibility: hidden; }
.ph-platzhalter { min-height: calc(100svh - 230px); display: grid; place-items: center; text-align: center;
               padding-block: 8px 72px; }
.ph-zeichen { container-type: inline-size; position: relative; width: min(82vw, 440px); aspect-ratio: 1;
           margin: 0 auto 8px; display: grid; place-items: center; }
.ph-zeichen .ph-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ph-zeichen .ph-ring path { fill: none; stroke: var(--signal); stroke-width: 28; }
.ph-zeichen .ph-wort { position: relative; margin: 0; font: 800 10.6cqw/1 system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
                 letter-spacing: 1.4cqw; margin-right: -1.4cqw; color: var(--elfenbein); }
.ph-zeichen .ph-zusatz { position: absolute; left: 0; right: 0; top: calc(50% + 7.2cqw); font: 300 4.8cqw/1 var(--breit);
                   letter-spacing: 1cqw; color: var(--staub); }
.ph-platzhalter h1 { color: var(--elfenbein); font: 700 clamp(2.2rem, 6vw, 3.6rem)/1 var(--schmal); margin: 0 0 14px; text-wrap: balance; }
.ph-platzhalter .ph-satz { max-width: 34em; margin: 0 auto 6px; color: var(--elfenbein); }
.ph-platzhalter .ph-bald { margin: 18px auto 0; color: var(--signal); font-weight: 600; }
