/* ============================================================================
   chrome.css — KANONISCHER Header (.nav) + Footer (.footer) für die GESAMTE Site.
   Einzige Quelle der Wahrheit (M5/M6-Header-Konsolidierung, Option B, 2026-06-24).
   Referenz-Optik: /verkaufen/ (nav.nav, 72px, Emblem + Hanken-Wortmarke, Burger,
   Bordeaux-Pill-CTA). Wird von ALLEN Oberflächen geladen (statische Seiten, v3-
   Startseite, immobilien-SPA, einwertung, suchauftraege; React-rechner rendert
   dieselbe Markup-Struktur).

   Modifier `.nav--hero`: transparenter Header über einem Vollbild-Hero
   (Startseite, immobilien-Liste). Wird via JS (chrome.js) bei Scroll solid
   (`.is-scrolled`). Ohne den Modifier = solide Sandbar.
   ============================================================================ */

:root {
  --chrome-bordeaux: #924545;
  --chrome-bordeaux-dark: #7a3939;
  --chrome-ink: #211f1c;
  --chrome-sand: #fbf8f3;
  --chrome-line: #e7e1d6;
  --chrome-dark: #282828;
  --chrome-nav-h: 72px;
}

/* ───────────────────────── HEADER ───────────────────────── */
.nav {
  position: sticky; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--chrome-nav-h);
  background: rgba(251, 248, 243, 0.96);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--chrome-line);
  box-shadow: 0 4px 24px rgba(33, 31, 28, 0.06);
  display: flex; align-items: center;
  transition: background .4s ease, box-shadow .4s ease, border-color .4s ease;
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 0 clamp(20px, 4vw, 52px);
}
.nav__logo { display: flex; align-items: center; gap: 11px; flex-shrink: 0; text-decoration: none; }
.nav__logo img { height: 36px; width: auto; filter: brightness(0); transition: filter .4s ease; }
.nav__wm {
  font-family: 'Hanken Grotesk', sans-serif; font-weight: 700; font-size: 18px;
  letter-spacing: 0.14em; color: var(--chrome-ink); text-transform: uppercase;
  white-space: nowrap; line-height: 1; transition: color .4s ease;
}
.nav__wm span { font-weight: 400; letter-spacing: 0.2em; }

.nav__menu { display: flex; align-items: center; gap: clamp(2px, 0.8vw, 12px); margin-left: auto; list-style: none; margin-top: 0; margin-bottom: 0; padding: 0; }
.nav__menu > li { list-style: none; margin: 0; }
.nav__link {
  display: flex; align-items: center; gap: 5px; padding: 8px 10px;
  font-family: 'Hanken Grotesk', sans-serif; color: var(--chrome-ink);
  font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none;
  transition: color 0.25s ease, opacity .25s ease; white-space: nowrap;
  background: none; border: none; text-decoration: none; cursor: pointer;
}
.nav__link:hover { color: var(--chrome-bordeaux); }
.nav__link.active { box-shadow: none; }
.nav__link svg { width: 14px; height: 14px; transition: transform 0.25s ease; }

.nav__dropdown { position: relative; }
.nav__dropdown:hover .nav__dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__dropdown:hover .nav__link svg { transform: rotate(180deg); }
.nav__dropdown-menu {
  position: absolute; top: 100%; right: 0; left: auto; margin-top: 14px; min-width: 210px;
  background: #fff; border: 1px solid var(--chrome-line); border-radius: 14px; padding: 8px;
  box-shadow: 0 18px 50px rgba(33, 31, 28, 0.18);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: 0.25s ease; list-style: none;
}
.nav__dropdown-menu::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav__dropdown-item { display: block; padding: 10px 14px; color: var(--chrome-ink); font-size: 14px; font-weight: 500; border-radius: 9px; transition: 0.25s ease; text-decoration: none; }
.nav__dropdown-item:hover { background: #f4efe8; }

.nav__cta { margin-left: 16px; }
.nav__cta-btn {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  background: var(--chrome-bordeaux); color: #fff; padding: 0 24px; height: 50px;
  box-sizing: border-box; border-radius: 999px; text-decoration: none;
  font-family: 'Hanken Grotesk', sans-serif;
  box-shadow: 0 8px 22px rgba(146, 69, 69, 0.3);
  transition: background 0.25s ease, transform 0.25s ease;
}
.nav__cta-btn:hover { background: var(--chrome-bordeaux-dark); transform: translateY(-1px); }
.nav__cta-btn > svg { display: none; }
.nav__cta-text { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.nav__cta-main { font-size: 14px; font-weight: 700; white-space: nowrap; color: #fff; }
.nav__cta-sub { display: none; }

.nav__hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; background: none; border: none; }
.nav__hamburger span { display: block; width: 24px; height: 2px; background: var(--chrome-ink); border-radius: 2px; transition: 0.25s ease; }
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────── Modifier: transparenter Header über Hero ─────────────── */
.nav--hero {
  position: fixed; background: transparent; border-bottom-color: transparent;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
}
.nav--hero .nav__logo img { filter: brightness(0) invert(1) drop-shadow(0 1px 4px rgba(0,0,0,.4)); }
.nav--hero .nav__wm { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.nav--hero .nav__link { color: #fff; text-shadow: 0 1px 10px rgba(0,0,0,.45); }
.nav--hero .nav__link:hover { color: #fff; opacity: .7; }
.nav--hero .nav__hamburger span { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
/* gescrollt → solide (wie Default-nav) */
.nav--hero.is-scrolled {
  background: rgba(251, 248, 243, 0.96); border-bottom-color: var(--chrome-line);
  box-shadow: 0 4px 24px rgba(33, 31, 28, 0.06);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.nav--hero.is-scrolled .nav__logo img { filter: brightness(0); }
.nav--hero.is-scrolled .nav__wm { color: var(--chrome-ink); text-shadow: none; }
.nav--hero.is-scrolled .nav__link { color: var(--chrome-ink); text-shadow: none; }
.nav--hero.is-scrolled .nav__hamburger span { background: var(--chrome-ink); box-shadow: none; }

/* ───────────────────────── MOBILE (≤900px) ───────────────────────── */
@media (max-width: 900px) {
  .nav { height: var(--chrome-nav-h); }
  .nav__hamburger { display: flex; }
  .nav__menu {
    position: fixed; top: var(--chrome-nav-h); left: 0; right: 0;
    background: var(--chrome-dark); flex-direction: column; align-items: stretch;
    padding: 16px 24px 24px; gap: 4px; transform: translateX(-100%);
    transition: transform 0.25s ease; max-height: calc(100vh - var(--chrome-nav-h)); overflow-y: auto;
  }
  .nav__menu.open { transform: translateX(0); }
  /* Tap-Targets ≥44px (M19) */
  .nav__link { font-size: 1rem; padding: 12px 16px; min-height: 44px; color: #fff; text-shadow: none; }
  .nav__link:hover { color: rgba(255, 255, 255, 0.7); }
  .nav__dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 4px 0 4px 16px; background: transparent; border: none; display: none; }
  .nav__dropdown.open .nav__dropdown-menu { display: block; }
  .nav__dropdown-item { color: rgba(255, 255, 255, 0.82); padding: 12px 14px; min-height: 44px; }
  .nav__dropdown-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
  .nav__cta { margin-left: 0; margin-top: 8px; }
}

/* ───────────────────────── FOOTER ───────────────────────── */
.footer { background: var(--chrome-dark); padding: 64px 0 32px; }
.footer .chrome-container, .footer__container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer__logo { height: 56px; width: auto; margin-bottom: 20px; }
.footer__address { font-size: 0.88rem; color: rgba(255, 255, 255, 0.6); line-height: 1.8; font-style: normal; }
.footer__address a { color: rgba(255, 255, 255, 0.6); display: inline-block; padding: 7px 0; }
.footer__address a:hover { color: #fff; }
.footer__social { display: flex; gap: 12px; margin-top: 16px; }
.footer__social a { width: 44px; height: 44px; background: rgba(255, 255, 255, 0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.7); transition: background 0.25s ease; }
.footer__social a:hover { background: var(--chrome-bordeaux); color: #fff; }
.footer__social svg { width: 16px; height: 16px; }
.footer__col-title { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); margin-bottom: 16px; }
.footer__links { display: flex; flex-direction: column; gap: 2px; list-style: none; margin: 0; padding: 0; }
.footer__link { font-size: 0.88rem; color: rgba(255, 255, 255, 0.65); transition: color 0.25s ease; text-decoration: none; padding: 9px 0; }
.footer__link:hover { color: #fff; }
.footer__link--box { display: inline-block; align-self: flex-start; margin-top: 6px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.30); border-radius: 8px; color: rgba(255, 255, 255, 0.88); font-weight: 600; }
.footer__link--box:hover { border-color: var(--chrome-bordeaux); background: rgba(146, 69, 69, 0.25); color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer__copyright { font-size: 0.82rem; color: rgba(255, 255, 255, 0.4); margin: 0; }
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
  /* Mobil: kompakter (war zu weit auseinander) + besser lesbar (heller) */
  .footer__link:not(.footer__link--box) { min-height: 36px; display: flex; align-items: center; }
  .footer__link--box { min-height: 36px; display: inline-flex; align-items: center; }
  .footer__link { color: rgba(255, 255, 255, 0.82); }
}
@media (max-width: 500px) { .footer__grid { grid-template-columns: 1fr; } .footer__bottom { flex-direction: column; align-items: flex-start; } }

/* ============================================================================
   Animations (dezent, prefers-reduced-motion-safe) — 2026-06-24
   ============================================================================ */
@media (prefers-reduced-motion: no-preference) {
  /* CTA-Tap-Feedback: kurzer Scale-down beim Antippen/Klicken */
  .nav__cta-btn, .lp-sticky-cta a, .btn, .choice-cta-btn, .header-cta,
  .choice-cta-btn--black, .choice-cta-btn--dark {
    transition: transform .12s ease, background .25s ease, box-shadow .25s ease, color .2s ease;
  }
  .nav__cta-btn:active, .lp-sticky-cta a:active, .btn:active, .choice-cta-btn:active,
  .header-cta:active { transform: scale(.97); }

  /* Sticky-Header: beim Runterscrollen ausblenden, beim Hochscrollen einblenden */
  .nav { transition: transform .32s ease, background .4s ease, box-shadow .4s ease, border-color .4s ease, backdrop-filter .4s ease; }
  .nav.nav--hidden { transform: translateY(-100%); }
}

/* Dezenter, einheitlicher Hover-Lift für die wichtigsten CTAs (nur Hover-Geräte) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn--primary, .nav__cta-btn, .choice-cta-btn, .lp-sticky-cta a {
    transition: transform .18s ease, box-shadow .28s ease, background .25s ease;
  }
  .btn--primary:hover, .nav__cta-btn:hover, .choice-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(146, 69, 69, 0.30);
  }
}
