/* Volvo PV544 – Stylesheet „Horizontblau & Rallye“
   Farben und Chrom des Autos (Horizontblau, Farbcode 89), dazu Rallye-Akzente:
   Zielflagge, Startnummer 44, Gelb der Zusatzscheinwerfer.
   Mobile first: Die meisten Besucher kommen per QR-Code vom Smartphone. */

:root {
  --blau: #a3c0ca;          /* Horizontblau, aus dem Titelfoto abgenommen */
  --blau-dunkel: #2f4856;
  --blau-tief: #22343f;
  --gelb: #f2c230;          /* Zusatzscheinwerfer */

  --bg: #f5f1e6;            /* helle Abschnitte */
  --bg-alt: var(--blau-dunkel); /* dunkle Abschnitte */
  --on-alt: #e8eff2;
  --on-alt-muted: #b9ccd3;
  --card: #fbf8f0;
  --card-creme: #efe6cf;    /* Innenraum / Bakelit */
  --text: #1e2d36;
  --muted: #566a74;
  --accent: var(--blau-dunkel);
  --line: rgba(30, 45, 54, .15);
  --ring: #e2e6e8;          /* Chromrahmen innen */
  --ring-dark: #8e979c;     /* Chromrahmen außen */
  --shadow: 0 4px 10px rgba(20, 35, 45, .18);
  --radius: 10px;

  --head: "Oswald", "Arial Narrow", sans-serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --chrom: linear-gradient(180deg, #fdfdfd 0%, #c9ced1 38%, #8e979c 52%, #e9eced 70%, #b7bec2 100%);
  --zielflagge: repeating-conic-gradient(#1e2d36 0 25%, #fff 0 50%) 0 0 / 14px 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #172129;
    --bg-alt: var(--blau-tief);
    --card: #22313a;
    --card-creme: #2a3a44;
    --text: #e8eff2;
    --muted: #a9bcc4;
    --accent: var(--blau);
    --line: rgba(232, 239, 242, .14);
    --ring: #44535b;
    --ring-dark: #6c787e;
    --shadow: 0 4px 12px rgba(0, 0, 0, .4);
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); }

h1, h2, h3 { font-family: var(--head); font-weight: 600; text-transform: uppercase; line-height: 1.2; margin: 0 0 .5em; }
h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: .05em; }

/* Überschriften mit Startnummer „44“ */
h2 {
  font-size: 1.6rem; letter-spacing: .05em;
  display: flex; align-items: center; gap: 12px;
}
h2::before {
  content: "44"; flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.15rem; line-height: 1; letter-spacing: 0;
  background: #fff; color: #1e2d36;
  box-shadow: 0 0 0 3px var(--blau), 0 0 0 5px var(--ring-dark);
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

/* Platzhalter: deutlich sichtbar, damit beim Ausfüllen nichts vergessen wird.
   Wenn alle ersetzt sind, kann diese Regel bleiben – sie greift dann nicht mehr. */
.platzhalter {
  background: #fff3b0;
  color: #5a4a00;
  border-radius: 4px;
  padding: 0 .25em;
  outline: 1px dashed #c9a800;
}

/* ---------- Navigation: Chromleiste ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--chrom);
  border-bottom: 1px solid #7d868b;
}
.nav ul {
  list-style: none; margin: 0 auto; padding: 0 8px;
  display: flex; gap: 4px; overflow-x: auto;
  max-width: 860px; scrollbar-width: none;
}
.nav ul::-webkit-scrollbar { display: none; }
.nav a {
  display: block; padding: 14px 12px; white-space: nowrap; text-decoration: none;
  color: var(--blau-tief); font-family: var(--head); font-weight: 500;
  text-transform: uppercase; letter-spacing: .12em; font-size: .85rem;
}
.nav a:hover, .nav a:focus-visible { color: #000; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex; align-items: flex-end;
  color: #fff;
  background:
    linear-gradient(to top, rgba(34, 52, 63, .94) 0%, rgba(34, 52, 63, .25) 60%, transparent 100%),
    url("../bilder/titelbild.jpg") 62% center / cover no-repeat,
    var(--blau-tief);
}
/* Chromleiste + Zielflagge als unterer Abschluss */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 20px;
  background: var(--zielflagge); border-top: 6px solid #c9ced1;
}
.hero .wrap { padding-bottom: 54px; padding-top: 80px; width: 100%; }
/* Rallyeschild */
.hero .kicker {
  display: inline-block; margin: 0;
  background: #efe6cf; color: #1e2d36; border: 3px solid var(--gelb); border-radius: 8px;
  padding: 2px 12px; font-family: var(--head); font-weight: 500;
  text-transform: uppercase; letter-spacing: .1em; font-size: .72rem;
}
.hero h1 { font-size: clamp(2.8rem, 13vw, 5rem); letter-spacing: .03em; line-height: 1; margin: .25em 0 .2em; }
.hero .sub {
  font-family: var(--head); text-transform: uppercase; letter-spacing: .08em;
  color: var(--blau); font-size: 1.05rem; margin: 0 0 1.2em;
}
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; list-style: none; }
.hero .facts li {
  background: #efe6cf; color: #1e2d36; padding: 4px 12px; border-radius: 999px;
  font-family: var(--head); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem;
  box-shadow: 0 0 0 2px #c9ced1;
}
.hero .facts li:first-child { background: var(--gelb); }
.hero .platzhalter { color: #5a4a00; }

/* Schmale Bildschirme: Panoramafoto komplett zeigen statt stark zuzuschneiden. */
@media (max-width: 700px) {
  .hero {
    min-height: 0;
    background:
      linear-gradient(to bottom, transparent calc(35vw - 48px), var(--blau-tief) 35vw) top / 100% auto no-repeat,
      url("../bilder/titelbild.jpg") top center / 100% auto no-repeat,
      var(--blau-tief);
  }
  .hero .wrap { padding-top: calc(35vw + 8px); }
}

/* ---------- Sektionen: hell und Horizontblau-dunkel im Wechsel ---------- */
section { padding: 56px 0; }
section:nth-of-type(even) { background: var(--bg-alt); color: var(--on-alt); }
section:nth-of-type(even) h2::before { box-shadow: 0 0 0 3px var(--gelb), 0 0 0 5px var(--ring-dark); }
.lead { font-size: 1.05rem; color: var(--muted); margin-top: -.25em; }
section:nth-of-type(even) .lead { color: var(--on-alt-muted); }

/* Karten mit Chromrahmen */
.card {
  background: var(--card); color: var(--text);
  border-radius: var(--radius); padding: 20px;
  box-shadow: 0 0 0 3px var(--ring), 0 0 0 4px var(--ring-dark), var(--shadow);
}

/* Steckbrief wie das Armaturenbrett: cremefarben, schmale Beschriftung */
#steckbrief .card { background: var(--card-creme); }
.specs { display: grid; gap: 0; margin: 0; }
.specs div {
  display: grid; grid-template-columns: minmax(120px, 40%) 1fr; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.specs div:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; padding-top: .2em; }
.specs dd { margin: 0; font-weight: 600; }

/* Zeitleiste wie eine Rallye-Etappe */
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 4px dashed var(--blau); }
.timeline li { position: relative; padding: 0 0 24px 16px; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gelb); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--ring-dark);
}
.timeline .jahr { font-family: var(--head); font-weight: 600; color: var(--accent); font-size: 1.15rem; letter-spacing: .04em; }
.timeline p { margin: .2em 0 0; }

/* Kachel-Raster */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.highlight h3 { display: flex; align-items: center; gap: 10px; }
.highlight .icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gelb); color: #1e2d36; font-size: 1.1rem;
  box-shadow: 0 0 0 3px var(--ring), 0 0 0 4px var(--ring-dark);
}
.highlight p { margin: 0; }

/* Umbauten */
.umbau h3 { color: var(--accent); font-size: 1.05rem; border-bottom: 3px solid var(--gelb); padding-bottom: 6px; }
.umbau ul { margin: 0; padding-left: 1.2em; }
.umbau li { margin: .2em 0; }
.umbau li::marker { color: var(--accent); }

/* Galerie */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { margin: 0; }
.gallery button {
  all: unset; cursor: zoom-in; display: block; width: 100%;
  aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden;
  background: #b9c3c7;
  box-shadow: 0 0 0 3px var(--ring), 0 0 0 4px var(--ring-dark);
}
.gallery button:focus-visible { outline: 3px solid var(--gelb); outline-offset: 4px; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.04); }
.gallery figcaption { font-size: .85rem; color: var(--muted); padding: 6px 2px 0; }
section:nth-of-type(even) .gallery figcaption { color: var(--on-alt-muted); }
.gallery .fehlt button {
  display: grid; place-items: center; cursor: default;
  background: repeating-linear-gradient(45deg, #c9d6db, #c9d6db 10px, #dfe8eb 10px, #dfe8eb 20px);
  color: #3f5560; font-size: .85rem; text-align: center; padding: 8px;
}

/* Lightbox */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .9); }
.lightbox img { max-width: 96vw; max-height: 82vh; margin: 0 auto; border-radius: 8px; }
.lightbox p { color: #eee; text-align: center; margin: 10px 16px 0; }
.lightbox .close {
  position: fixed; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .15); color: #fff; font-size: 1.6rem; cursor: pointer;
}

/* Fußzeile mit Zielflagge */
footer {
  position: relative;
  padding: 42px 0 40px; text-align: center; font-size: .85rem;
  background: var(--blau-tief); color: #b9ccd3;
}
footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 14px; background: var(--zielflagge); }
footer a { color: var(--gelb); }

/* Rechtliches (Impressum / Datenschutz) */
.legal { padding: 40px 0; }
.legal h1 { font-size: 2rem; letter-spacing: .04em; }
.legal h2 { font-size: 1.3rem; margin-top: 1.5em; }
.legal h2::before { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery img { transition: none; }
}
