﻿/* ============================================
   H&O IMMO — Site Chrome (Header / Footer / Nav)
   ============================================ */

/* ── Header ─────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem var(--pad-x);
  background: rgba(250, 248, 245, 0.85);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  transition: padding 0.4s var(--ease-out), background 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header[data-scrolled="true"] {
  padding-block: 0.75rem;
  background: rgba(250, 248, 245, 0.95);
  background: color-mix(in oklab, var(--bg) 95%, transparent);
  border-bottom-color: var(--line);
}

/* ── Liquid-Header über dunklem Hero (about / kontakt / etc.) ─────
   .dark-hero-page wird per JS dynamisch entfernt, sobald aus dem Hero
   herausgescrollt wurde — danach greift wieder der Default-Style. */
body.dark-hero-page .site-header {
  background: rgba(12, 10, 8, 0.32);
  background: color-mix(in oklab, #0c0a08 32%, transparent);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
body.dark-hero-page .site-header .brand {
  color: rgba(255, 255, 255, 0.96);
}
body.dark-hero-page .site-header .site-nav a {
  color: rgba(255, 255, 255, 0.78);
}
body.dark-hero-page .site-header .site-nav a:hover,
body.dark-hero-page .site-header .site-nav a[aria-current="page"] {
  color: rgba(255, 255, 255, 1);
}
body.dark-hero-page .site-header .header-cta {
  background: rgba(255, 255, 255, 0.96);
  color: #0c0a08;
}
body.dark-hero-page .site-header .header-cta:hover {
  background: var(--accent);
  color: #0c0a08;
}
body.dark-hero-page .site-header .menu-toggle {
  border-color: rgba(255, 255, 255, 0.4);
  color: rgba(255, 255, 255, 0.96);
  background: transparent;
}
body.dark-hero-page[data-menu-open="true"] .site-header .menu-toggle {
  border-color: rgba(180, 139, 116, 0.32);
  color: var(--ink);
  background: rgba(180, 139, 116, 0.12);
}
/* Smooth fade beim Wechsel von liquid zu solid */
.site-header,
.site-header .brand,
.site-header .site-nav a,
.site-header .header-cta,
.site-header .menu-toggle span {
  transition-property: background, color, border-color, padding;
  transition-duration: 0.4s;
  transition-timing-function: var(--ease-out);
}

.brand {
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand__amp { color: var(--accent); font-style: italic; font-weight: 400; }

/* Logo-Variante (z. B. Über-uns-Seite) — ersetzt den Textbrand */
.brand--logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  padding-block: 0.125rem;
}
.brand--logo img {
  display: block;
  height: 3.6rem;
  width: auto;
}
/* Auf dunklem Hero-Backdrop: helle Logo-Variante einblenden. */
body.dark-hero-page .brand--logo img {
  content: url('../imgs/HO-Immo-Logo-light.png');
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  font-size: var(--fs-sm);
}
.site-nav a {
  color: var(--ink-muted);
  padding-block: 0.5rem;
  position: relative;
  transition: color 0.25s ease;
}
.site-nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 0.25rem 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.header-cta {
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: background 0.25s ease, transform 0.25s ease;
}
.header-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  font-size: 1.5rem;
  line-height: 1;
  background: transparent;
  transition: background 300ms var(--ease-out),
              border-color 500ms var(--ease-out),
              color 500ms var(--ease-out);
}
.menu-toggle::before {
  content: "\2261";
  font-weight: 400;
  line-height: 1;
}
.menu-toggle span { display: none; }
body[data-menu-open="true"] .menu-toggle {
  border-color: rgba(180, 139, 116, 0.32);
  background: rgba(180, 139, 116, 0.12);
  color: var(--ink);
}
body[data-menu-open="true"] .menu-toggle::before {
  content: "\00D7";
  font-size: 1.65rem;
}

/* ── Mobile menu overlay ─────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  min-height: 100svh;
  overflow-y: auto;
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: clamp(5.2rem, 13vh, 7rem) var(--pad-x) 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-menu::before {
  content: "";
  position: absolute;
  right: -4rem;
  bottom: -5rem;
  width: clamp(12rem, 46vw, 22rem);
  aspect-ratio: 1536 / 1237;
  background: url("../imgs/HO-Immo-Logo.png") center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}
.mobile-menu::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.035) 1px, transparent 1px) 0 0 / 4.5rem 4.5rem,
    radial-gradient(circle at 20% 0%, rgba(180, 139, 116, 0.13), transparent 34rem);
  opacity: 0.75;
}
body[data-menu-open="true"] .mobile-menu {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu > * {
  position: relative;
  z-index: 1;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-menu a {
  font-size: clamp(1.95rem, 6.4vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-weight: 600;
  padding-block: clamp(0.62rem, 1.8vh, 0.95rem);
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  color: var(--ink);
  opacity: 0;
  transform: translateY(18px);
  transition: color 200ms var(--ease-out);
}
.mobile-menu a:hover { color: var(--accent); }
body[data-menu-open="true"] .mobile-menu a {
  animation: ho-mobile-link-in 500ms var(--ease-out) both;
}
body[data-menu-open="true"] .mobile-menu a:nth-child(1) { animation-delay: 45ms; }
body[data-menu-open="true"] .mobile-menu a:nth-child(2) { animation-delay: 90ms; }
body[data-menu-open="true"] .mobile-menu a:nth-child(3) { animation-delay: 135ms; }
body[data-menu-open="true"] .mobile-menu a:nth-child(4) { animation-delay: 180ms; }
body[data-menu-open="true"] .mobile-menu a:nth-child(5) { animation-delay: 225ms; }
body[data-menu-open="true"] .mobile-menu a:nth-child(6) { animation-delay: 270ms; }
body[data-menu-open="true"] .mobile-menu a:nth-child(7) { animation-delay: 315ms; }
.mobile-menu a span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  font-weight: 600;
}
.mobile-menu__foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--ink-muted);
  font-size: 0.875rem;
}
@keyframes ho-mobile-link-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Footer (Dark, identisch zur Startseite) ─ */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
}
.footer-grid {
  padding: 4rem var(--pad-x);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}
.footer-col-brand { grid-column: span 2; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.footer-brand img {
  display: block;
  height: 5rem;
  width: auto;
  max-width: 12rem;
  filter: invert(1) hue-rotate(180deg);
}
.footer-lead {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.7);
  max-width: 24rem;
  line-height: 1.65;
}
.footer-contact {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.footer-contact a { transition: color 0.2s ease; }
.footer-contact a:hover { color: #fff; }
.footer-hours { color: rgba(255, 255, 255, 0.6); }
.footer-head {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 1rem;
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}
.footer-list a { transition: color 0.2s ease; }
.footer-list a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.footer-bottom-inner {
  padding: 1.5rem var(--pad-x);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-legal { display: flex; gap: 1.25rem; }
.footer-legal a { transition: color 0.2s ease; }
.footer-legal a:hover { color: #fff; }

/* ── Responsive ───────────────────────────── */
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1366px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
    gap: 1rem;
    padding-inline: clamp(2.25rem, 8vw, 3.5rem);
  }
  .site-nav, .header-cta { display: none; }
  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }
}
@media (max-width: 768px) {
  .brand--logo img { height: 3.05rem; }
}
@media (max-width: 720px) {
  .footer-grid { padding-block: 3rem; gap: 2rem; }
  .footer-bottom-inner {
    padding-block: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }
}
