/* ============ SHARED DESIGN SYSTEM ============ */
:root {
  --bg: #0E0F0C;
  --bg-2: #16181420;
  --surface: #1A1C17;
  --surface-2: #22251F;
  --line: #2F332B;
  --line-2: #3D4237;
  --ink: #F5F1E8;
  --ink-dim: #C9C3B4;
  --ink-muted: #8A8676;
  --gold: #C9A961;
  --gold-bright: #E6C888;
  --gold-dim: #8A7540;
  --moss: #2A3A2B;
  --cream: #F5F1E8;
  --cream-2: #EDE7D6;

  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --r-sm: 2px; --r-md: 4px; --r-lg: 8px; --r-xl: 14px;
  --container: 1280px;
  --pad: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--gold); color: var(--bg); }

/* Mobile typography hardening */
h1, h2, h3, h4 { overflow-wrap: break-word; word-wrap: break-word; hyphens: auto; }
@media (max-width: 600px) {
  h1 { hyphens: auto; -webkit-hyphens: auto; }
  p, .lede { text-wrap: pretty; }
  input, select, textarea { font-size: 16px !important; } /* prevent iOS zoom on focus */
  section { padding: 72px 0; }
  .section-head { margin-bottom: 40px !important; }
}

.eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--gold); font-weight: 500;
}
h1, h2, h3, h4 {
  font-family: var(--font-serif); font-weight: 400; line-height: 1.08;
  letter-spacing: -0.015em; font-variation-settings: 'opsz' 144;
}
h1 { font-size: clamp(44px, 6.5vw, 88px); }
h2 { font-size: clamp(34px, 4.5vw, 60px); }
h3 { font-size: clamp(24px, 2.4vw, 32px); }
.italic { font-style: italic; font-family: var(--font-serif); color: var(--gold); }
p { color: var(--ink-dim); font-size: 16px; line-height: 1.7; }
.lede { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink); max-width: 56ch; line-height: 1.6; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }
section { padding: clamp(80px, 10vw, 140px) 0; position: relative; }
section + section { border-top: 1px solid var(--line); }

.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  margin-bottom: 80px; align-items: end;
}
@media (max-width: 860px) {
  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
}

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  transition: background 0.3s, padding 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(14, 15, 12, 0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 14px 0; border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); }
.logo-mark {
  width: 38px; height: 38px; border: 1px solid var(--gold);
  display: grid; place-items: center; color: var(--gold);
  font-size: 18px; font-weight: 500; letter-spacing: 0.05em;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b {
  font-family: var(--font-serif); font-weight: 500; font-size: 17px;
  letter-spacing: 0.04em; color: var(--ink);
}
.logo-text span {
  font-family: var(--font-mono); font-size: 9px; color: var(--gold);
  letter-spacing: 0.25em; text-transform: uppercase; margin-top: 4px;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 13px; color: var(--ink-dim); letter-spacing: 0.02em;
  transition: color 0.2s; position: relative; padding: 6px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width 0.3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta {
  padding: 10px 22px; border: 1px solid var(--gold); color: var(--gold);
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  transition: all 0.25s; font-weight: 500;
}
.nav-cta:hover { background: var(--gold); color: var(--bg); }
.nav-burger { display: none; background: transparent; border: none; padding: 0; cursor: pointer; }
@media (max-width: 980px) {
  .nav-cta { display: none; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px;
    width: 44px; height: 44px; justify-content: center; align-items: center;
    z-index: 110; position: relative;
  }
  .nav-burger span { width: 24px; height: 1.5px; background: var(--ink); transition: transform 0.3s, opacity 0.2s; transform-origin: center; }
  body.menu-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  body.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  body.menu-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Drawer panel */
  .nav-links {
    position: fixed; inset: 0; top: 0;
    display: flex !important; flex-direction: column; gap: 0;
    background: var(--bg); z-index: 105;
    padding: 96px 32px 40px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
  }
  body.menu-open .nav-links { transform: translateX(0); }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a {
    display: block; padding: 22px 0;
    font-family: var(--font-serif); font-size: 22px; letter-spacing: -0.01em;
    color: var(--ink);
  }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--gold); }
  .nav-links::after {
    content: 'Immobilienberatung →'; display: block;
    margin-top: 32px; padding: 16px 28px;
    background: var(--gold); color: var(--bg);
    font-family: var(--font-sans); font-size: 12px; font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase; text-align: center;
    align-self: stretch;
  }
  body.menu-open { overflow: hidden; }
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 32px; font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 500;
  transition: all 0.3s; cursor: pointer; border: 1px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-bright); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-arrow { transition: transform 0.3s; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* PAGE HERO (for subpages) */
.page-hero {
  padding: clamp(140px, 20vh, 200px) 0 clamp(80px, 10vw, 120px);
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.page-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  opacity: 0.25; filter: grayscale(0.3);
}
.page-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,15,12,0.5), rgba(14,15,12,0.92));
}
.page-hero .container { position: relative; z-index: 1; }
.breadcrumbs {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: 32px;
}
.breadcrumbs a { color: var(--ink-dim); transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .sep { color: var(--gold); opacity: 0.6; }
.page-hero h1 { max-width: 20ch; margin-bottom: 24px; }
.page-hero .lede { max-width: 64ch; }

/* FOOTER */
.footer {
  background: #08090A; padding: 80px 0 30px;
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 60px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 20px; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 {
  font-family: var(--font-mono); font-size: 11px; color: var(--gold);
  letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500;
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-dim); font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { font-size: 14px; line-height: 1.7; }
.footer-bottom {
  padding-top: 30px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: 12px; color: var(--ink-muted);
  font-family: var(--font-mono); letter-spacing: 0.1em;
}

/* FLOATERS */
.floaters {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
@media (max-width: 600px) {
  .floaters { right: 14px; bottom: 14px; gap: 8px; }
}
.float-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--ink); transition: all 0.3s;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.float-btn:hover { background: var(--gold); color: var(--bg); border-color: var(--gold); transform: translateY(-2px); }
.float-btn.whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.float-btn.whatsapp:hover { background: #1da851; }
.float-valuation {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; background: var(--gold); color: var(--bg);
  border-radius: 999px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(201,169,97,0.35);
  transition: all 0.3s;
}
.float-valuation:hover { background: var(--gold-bright); transform: translateY(-2px); }
@media (max-width: 700px) {
  .float-valuation span { display: none; }
  .float-valuation { width: 52px; height: 52px; padding: 0; border-radius: 50%; justify-content: center; }
  .float-btn { width: 52px; height: 52px; }
}

/* REVEAL */
[data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  transition-delay: var(--delay, 0ms);
}
[data-reveal].in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* UTILITIES */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
@media (max-width: 860px) { .grid-2 { grid-template-columns: 1fr; gap: 40px; } }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line);
  padding: 32px; display: flex; flex-direction: column; gap: 16px;
  transition: border-color 0.3s, transform 0.3s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card h3 { font-size: 22px; }
.card p { font-size: 15px; }

.prose p { margin-bottom: 18px; max-width: 70ch; }
.prose h2 { margin-top: 48px; margin-bottom: 20px; }
.prose h3 { margin-top: 36px; margin-bottom: 14px; }
.prose ul { margin: 16px 0 24px 20px; color: var(--ink-dim); }
.prose li { margin-bottom: 8px; line-height: 1.7; }
.prose strong { color: var(--ink); font-weight: 500; }
