/* =========================================================
   TSG SALACH - STARTSEITEN-HERO „LIGHT CINEMATIC MAP“
   Wird nur geladen, wenn Template-Einstellung „Startseite“ =
   „Light Cinematic Map“ und die Startseite aktiv ist (index.php).
   Alle Regeln gelten nur unter body.hero-light-map.
   Schriften: Clash Display (Ueberschriften), Switzer (Text), selbst gehostet.
   ========================================================= */

@font-face { font-family: "Clash Display"; src: url("fonts/ClashDisplay-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("fonts/Switzer-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("fonts/Switzer-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

body.tsg-site.hero-light-map {
  --hlm-ink: #0b1d2b;
  --hlm-muted: #4a5b6b;
  --hlm-brand: #0f6bb4;
  --hlm-brand-deep: #0a4a7f;
  --hlm-border: #d3dee8;
  --hlm-border-strong: #6b7f92;
  --hlm-display: "Clash Display", "Archivo", "Segoe UI", sans-serif;
  --hlm-sans: "Switzer", "Work Sans", "Segoe UI", sans-serif;
  --hlm-ease: cubic-bezier(.16, 0, .13, 1);
  background: #fff;
}

/* ---------- Grundgeruest ---------- */
body.hero-light-map .hero-lm {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(560px, calc(100svh - 84px), 860px);
  display: flex;
  align-items: center;
  background: #fff;
  color: var(--hlm-ink);
  font-family: var(--hlm-sans);
}

/* Karte vollflaechig, weicher Uebergang zu Weiss auf der linken Seite */
body.hero-light-map .hero-lm-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
body.hero-light-map .hero-lm-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}
body.hero-light-map .hero-lm-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #fff 0%, #fff 24%, rgba(255, 255, 255, .92) 36%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 66%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 78%, #fff 100%);
}

body.hero-light-map .hero-lm-inner {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 112px) clamp(16px, 4vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
body.hero-light-map .hero-lm-copy { min-width: 0; }

/* ---------- Typografie ---------- */
body.hero-light-map .hero-lm h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--hlm-display);
  font-weight: 600;
  font-size: clamp(2.75rem, 1.2rem + 4.6vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.01em;
  color: var(--hlm-ink);
  text-wrap: balance;
}
body.hero-light-map .hero-lm h1 span { color: var(--hlm-brand); }

body.hero-light-map .hero-lm-lead {
  margin: clamp(20px, 2.4vw, 32px) 0 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem);
  line-height: 1.6;
  color: var(--hlm-muted);
}

/* ---------- Buttons (Pills, eine Hauptaktion) ---------- */
body.hero-light-map .hero-lm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 3vw, 40px);
}
body.hero-light-map .hero-lm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: 9999px;
  font: 500 1rem/1.25 var(--hlm-sans);
  letter-spacing: .01em;
  text-decoration: none;
  transition: background-color .3s cubic-bezier(0, 0, .2, 1), border-color .3s cubic-bezier(0, 0, .2, 1), color .3s cubic-bezier(0, 0, .2, 1), transform .15s cubic-bezier(.4, 0, .2, 1);
}
body.hero-light-map .hero-lm-btn:active { transform: scale(.97); }
body.hero-light-map .hero-lm-btn:focus-visible { outline: 2px solid var(--hlm-brand-deep); outline-offset: 3px; }
body.hero-light-map .hero-lm-btn--primary { background: var(--hlm-brand); color: #fff; }
body.hero-light-map .hero-lm-btn--primary:hover { background: var(--hlm-brand-deep); color: #fff; }
body.hero-light-map .hero-lm-btn--secondary { background: rgba(255, 255, 255, .85); color: var(--hlm-ink); border-color: var(--hlm-border-strong); }
body.hero-light-map .hero-lm-btn--secondary:hover { border-color: var(--hlm-ink); color: var(--hlm-ink); }

/* ---------- Kennzahlen mit dezenten Trennlinien ---------- */
body.hero-light-map .hero-lm-facts {
  display: flex;
  flex-wrap: wrap;
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding: 0;
}
body.hero-light-map .hero-lm-facts > div {
  display: flex;
  flex-direction: column-reverse; /* Zahl oben, Bezeichnung darunter */
  gap: 4px;
  padding: 0 clamp(20px, 2.6vw, 36px);
}
body.hero-light-map .hero-lm-facts > div:first-child { padding-left: 0; }
body.hero-light-map .hero-lm-facts > div + div { border-left: 1px solid var(--hlm-border); }
body.hero-light-map .hero-lm-facts dd {
  margin: 0;
  font-family: var(--hlm-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  line-height: 1.1;
  white-space: nowrap;
  color: var(--hlm-ink);
}
body.hero-light-map .hero-lm-facts dt {
  font-size: .875rem;
  line-height: 1.4;
  color: var(--hlm-muted);
}

/* ---------- Wappen rechts mittig ueber der Karte ---------- */
body.hero-light-map .hero-lm-crest {
  justify-self: center;
  display: block;
  width: clamp(200px, 22vw, 320px);
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(11, 29, 43, .18));
}

body.hero-light-map .hero-lm-credit {
  position: absolute;
  right: clamp(16px, 4vw, 64px);
  bottom: 10px;
  margin: 0;
  font-size: .7rem;
  color: var(--hlm-muted);
}
body.hero-light-map .hero-lm-credit a { color: inherit; }

/* ---------- Einblenden (Design System: 500 ms, 80 ms Versatz) ---------- */
@media (prefers-reduced-motion: no-preference) {
  body.hero-light-map .hero-lm-copy > * { animation: hlm-rise .5s var(--hlm-ease) both; }
  body.hero-light-map .hero-lm-copy > :nth-child(2) { animation-delay: .08s; }
  body.hero-light-map .hero-lm-copy > :nth-child(3) { animation-delay: .16s; }
  body.hero-light-map .hero-lm-copy > :nth-child(4) { animation-delay: .24s; }
  body.hero-light-map .hero-lm-crest { animation: hlm-slide .5s var(--hlm-ease) .16s both; }
}
@keyframes hlm-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes hlm-slide { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  body.hero-light-map .hero-lm { min-height: clamp(520px, 80svh, 760px); }
  body.hero-light-map .hero-lm-media img { object-position: 70% 50%; }
  body.hero-light-map .hero-lm-media::after {
    background:
      linear-gradient(90deg, #fff 0%, #fff 30%, rgba(255, 255, 255, .9) 46%, rgba(255, 255, 255, .4) 62%, rgba(255, 255, 255, 0) 78%),
      linear-gradient(180deg, rgba(255, 255, 255, 0) 78%, #fff 100%);
  }
  body.hero-light-map .hero-lm-inner { grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); }
  body.hero-light-map .hero-lm-crest { width: clamp(150px, 20vw, 220px); }
}

/* ---------- Smartphone: Karte als Band oben, Text darunter auf Weiss ---------- */
@media (max-width: 760px) {
  body.hero-light-map .hero-lm { display: block; min-height: 0; }
  body.hero-light-map .hero-lm-media { position: relative; inset: auto; height: clamp(240px, 62vw, 340px); }
  body.hero-light-map .hero-lm-media img { object-position: 55% 50%; }
  body.hero-light-map .hero-lm-media::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 45%, rgba(255, 255, 255, .7) 75%, #fff 100%);
  }
  body.hero-light-map .hero-lm-inner {
    display: block;
    padding: 8px 16px 48px;
  }
  body.hero-light-map .hero-lm-crest {
    position: absolute;
    left: 50%;
    top: calc(clamp(240px, 62vw, 340px) * -.5);
    width: clamp(110px, 30vw, 150px);
    transform: translate(-50%, -50%);
  }
  /* Ohne Hero-Bild (Einstellung leer): Wappen ueber dem Text statt im Kartenband */
  body.hero-light-map .hero-lm:not(:has(.hero-lm-media)) .hero-lm-inner { display: flex; flex-direction: column; padding-top: 32px; }
  body.hero-light-map .hero-lm:not(:has(.hero-lm-media)) .hero-lm-crest { order: -1; position: static; transform: none; margin: 0 auto 28px; }
  body.hero-light-map .hero-lm h1 { max-width: none; }
  body.hero-light-map .hero-lm-actions { flex-direction: column; }
  body.hero-light-map .hero-lm-btn { width: 100%; }
  body.hero-light-map .hero-lm-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 36px; }
  body.hero-light-map .hero-lm-facts > div { padding: 0 12px; }
  body.hero-light-map .hero-lm-facts dd { font-size: 1.3rem; }
  body.hero-light-map .hero-lm-facts dt { font-size: .75rem; }
  body.hero-light-map .hero-lm-credit { position: static; padding: 0 16px 12px; text-align: right; }
  @media (prefers-reduced-motion: no-preference) {
    body.hero-light-map .hero-lm-crest { animation-name: hlm-fade; }
  }
}
@keyframes hlm-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Helle Menueleiste ----------
   Neue Navigation (v4): index.php setzt auf der Startseite .nav--inner statt .nav--hero,
   dadurch nutzt der Header seine vorhandenen hellen Farben. Keine eigenen Regeln noetig.
   Bisherige Navigation (legacy) bleibt unveraendert. */

/* ---------- Heller Footer (nur Startseite mit Light Cinematic Map) ----------
   template.css setzt den Footer mit !important auf Nachtkarten-Navy (#01141f).
   Hier nur Farben und Linien, Inhalte und Abstaende bleiben wie in template.css.
   Farben aus Design System: canvas, ink, ink-muted, brand, brand-deep, border.
   Das farbige Wappen setzt index.php (images/logo-farbig.svg statt logo.png). */
body.tsg-site.is-home.hero-light-map .site-footer {
  background: #f5f8fb !important;
  color: var(--hlm-muted);
  box-shadow: inset 0 1px 0 var(--hlm-border); /* Linie ohne Hoehenaenderung */
}
body.tsg-site.is-home.hero-light-map .site-footer strong {
  color: var(--hlm-ink);
}
body.tsg-site.is-home.hero-light-map .site-footer a {
  color: var(--hlm-brand);
}
body.tsg-site.is-home.hero-light-map .site-footer a:hover {
  color: var(--hlm-brand-deep);
}
body.tsg-site.is-home.hero-light-map .site-footer .footer-bottom {
  border-top-color: var(--hlm-border);
}
