/* =====================================================================
   U.B-Immobilien – Warmes, persönliches Design-System
   Eigenständig, keine externen Abhängigkeiten (außer optionale Webfonts).
   ===================================================================== */

/* ---- Fonts (optional, mit System-Fallback) ------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600&display=swap');

/* ---- Design-Tokens ------------------------------------------------- */
:root {
  /* Warme, natürliche Palette */
  --sand-50:  #faf7f1;
  --sand-100: #f3ede1;
  --sand-200: #e8ddc9;
  --sand-300: #d9c9ab;

  --ink:      #2b2822;   /* warmes Dunkelbraun statt Schwarz */
  --ink-soft: #5c554a;
  --muted:    #857c6d;

  --green:      #4f6a4d;  /* Salbei/Wald – Vertrauen, Natur */
  --green-deep: #3a4f39;
  --green-soft: #eaf0e5;

  --terra:      #c06a3d;  /* Terrakotta – Wärme, Akzent */
  --terra-deep: #a5542c;

  --white: #ffffff;
  --line:  #e6ddcd;

  --shadow-sm: 0 1px 3px rgba(43, 40, 34, .06), 0 2px 8px rgba(43, 40, 34, .05);
  --shadow-md: 0 6px 20px rgba(43, 40, 34, .09);
  --shadow-lg: 0 18px 48px rgba(43, 40, 34, .14);

  --radius:    14px;
  --radius-lg: 24px;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1120px;
}

/* ---- Reset / Basis ------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--sand-50);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-deep); text-decoration: none; }
a:hover { color: var(--terra-deep); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1rem; }

.wrap { width: min(var(--wrap), 100% - 3rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 3rem); margin-inline: auto; }

section { padding: clamp(3.5rem, 8vw, 6rem) 0; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--terra-deep);
  margin: 0 0 1rem;
}
.lead { font-size: 1.2rem; color: var(--ink-soft); }

/* ---- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn svg { width: 1.1em; height: 1.1em; }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-deep); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--green-deep); border-color: var(--sand-300); }
.btn-ghost:hover { background: var(--white); border-color: var(--green); color: var(--green-deep); transform: translateY(-2px); }
.btn-terra { background: var(--terra); color:#fff; box-shadow: var(--shadow-sm); }
.btn-terra:hover { background: var(--terra-deep); color:#fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---- Header -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, .85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--serif); font-size: 1.35rem; color: var(--ink); font-weight: 600; }
.brand:hover { color: var(--ink); }
.brand .mark {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-deep) 100%);
  color: #fff; font-family: var(--serif); font-weight: 600; font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}
.brand small { display:block; font-family: var(--sans); font-size:.62rem; letter-spacing:.16em; text-transform:uppercase; color: var(--muted); font-weight:600; }

.nav { display: flex; align-items: center; gap: .3rem; }
.nav a {
  font-family: var(--sans); font-weight: 500; font-size: .98rem;
  color: var(--ink-soft); padding: .5rem .85rem; border-radius: 8px;
}
.nav a:hover, .nav a.active { color: var(--green-deep); background: var(--green-soft); }
.nav .btn { margin-left: .5rem; padding: .6rem 1.15rem; }
/* Textfarbe der Buttons in der Navigation explizit setzen –
   sonst überschreibt die höher spezifische Regel ".nav a" die Button-Farbe. */
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; background: var(--green-deep); }
.nav a.btn-ghost { color: var(--green-deep); }
.nav a.btn-ghost:hover { color: var(--green-deep); background: var(--white); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--sand-50); border-bottom: 1px solid var(--line);
    padding: 1rem 1.5rem 1.5rem; box-shadow: var(--shadow-md);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem .6rem; }
  .nav .btn { margin: .4rem 0 0; justify-content: center; }
}

/* ---- Hero ---------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(192,106,61,.14), transparent 60%),
    linear-gradient(180deg, var(--sand-100) 0%, var(--sand-50) 100%);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero h1 { margin-bottom: .35em; }
.hero .lead { max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-trust { display:flex; flex-wrap:wrap; gap:1.4rem; margin-top:2.4rem; color:var(--ink-soft); font-size:.95rem; }
.hero-trust span { display:flex; align-items:center; gap:.5rem; }
.hero-trust svg { width:1.15rem; height:1.15rem; color: var(--green); flex:none; }

/* Bild-Platzhalter im Hero */
.hero-media {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(79,106,77,.9), rgba(58,79,57,.92)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.05) 0 12px, transparent 12px 24px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: grid; place-items: center; color: #fff; text-align: center;
}
.hero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media .ph-inner { padding: 2rem; }
.hero-media svg { width: 64px; height: 64px; opacity: .9; margin: 0 auto 1rem; }
.hero-media p { font-family: var(--sans); font-size: .85rem; opacity: .85; margin: 0; }
.hero-badge {
  position: absolute; left: -14px; bottom: 28px;
  background: var(--white); color: var(--ink);
  border-radius: 14px; padding: .9rem 1.15rem; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: .7rem; font-size: .9rem;
}
.hero-badge b { font-family: var(--serif); font-size: 1.35rem; color: var(--green-deep); }
.hero-badge .ico { width:38px;height:38px;border-radius:10px;background:var(--terra);color:#fff;display:grid;place-items:center;flex:none; }
.hero-badge .ico svg { width:20px;height:20px; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16/11; max-height: 340px; order: -1; }
}

/* ---- Sektions-Kopf ------------------------------------------------- */
.sec-head { max-width: 640px; margin-bottom: 2.8rem; }
.sec-head.center { margin-inline: auto; text-align: center; }

/* ---- Story / Über mich -------------------------------------------- */
.about { background: var(--white); }
.about .wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem,5vw,4rem); align-items: center; }
.about-media {
  position: relative; overflow: hidden;
  aspect-ratio: 3/4; border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  background: linear-gradient(160deg, var(--sand-200), var(--sand-300));
  display: grid; place-items: center; color: var(--green-deep); text-align:center;
}
.about-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-media .about-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 1.4rem 1.2rem .9rem; font-family: var(--sans); font-size: .8rem; color: #fff;
  background: linear-gradient(to top, rgba(20,18,14,.72), transparent);
}
.about-media svg { width: 54px; height: 54px; margin: 0 auto .8rem; opacity:.65; }
.about-media p { font-family: var(--sans); font-size:.8rem; color: var(--ink-soft); margin:0; padding:0 1.5rem; }
.signature { font-family: var(--serif); font-size: 1.5rem; color: var(--green-deep); margin-top: 1.2rem; }
.signature small { display:block; font-family:var(--sans); font-size:.85rem; color:var(--muted); letter-spacing:.02em; margin-top:.15rem; }
@media (max-width: 820px){ .about .wrap { grid-template-columns:1fr; } .about-media{ aspect-ratio:16/12; max-height:360px; } }

/* ---- Werte-Karten -------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.8rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card .ico {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-deep); margin-bottom: 1.1rem;
}
.card .ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: 1rem; }
@media (max-width: 820px){ .cards { grid-template-columns:1fr; } }

/* ---- Leistungen (Liste) ------------------------------------------- */
.services { background: linear-gradient(180deg, var(--sand-100), var(--sand-50)); }
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.svc {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
}
.svc .tick {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  background: var(--terra); color:#fff; display: grid; place-items: center; margin-top: 2px;
}
.svc .tick svg { width: 18px; height: 18px; }
.svc h3 { font-family: var(--sans); font-weight: 600; font-size: 1.05rem; margin: 0 0 .25rem; }
.svc p { margin: 0; color: var(--ink-soft); font-size: .97rem; }
@media (max-width: 720px){ .svc-grid { grid-template-columns:1fr; } }

/* ---- Ablauf / Schritte -------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: step; }
.step { position: relative; padding-top: .5rem; }
.step .num {
  font-family: var(--serif); font-size: 2.2rem; color: var(--terra);
  display:flex; align-items:center; gap:.7rem; margin-bottom:.4rem;
}
.step .num::after { content:""; height:1px; flex:1; background: var(--line); }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--ink-soft); font-size: .98rem; margin:0; }
@media (max-width: 820px){ .steps { grid-template-columns:1fr; gap:1.8rem; } }

/* ---- CTA-Band ------------------------------------------------------ */
.cta-band { background: linear-gradient(135deg, var(--green-deep), var(--green)); color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: center; }
.cta-band p { color: rgba(255,255,255,.9); margin-bottom: 0; }
.cta-band .actions { display:flex; flex-wrap:wrap; gap:.9rem; justify-content:flex-end; }
.cta-band .btn-ghost { color:#fff; border-color: rgba(255,255,255,.5); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.12); color:#fff; border-color:#fff; }
.cta-band .btn-primary { background:#fff; color: var(--green-deep); }
.cta-band .btn-primary:hover { background: var(--sand-100); color: var(--green-deep); }
@media (max-width: 820px){ .cta-band .wrap { grid-template-columns:1fr; } .cta-band .actions{ justify-content:flex-start; } }

/* ---- Kontakt-Bereich ---------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,3.5rem); align-items:start; }
@media (max-width: 820px){ .contact-grid { grid-template-columns:1fr; } }

.info-list { list-style:none; padding:0; margin: 1.5rem 0 0; display:grid; gap:1.1rem; }
.info-list li { display:flex; gap:1rem; align-items:flex-start; }
.info-list .ico {
  flex:none; width:46px; height:46px; border-radius:12px; display:grid; place-items:center;
  background: var(--green-soft); color: var(--green-deep);
}
.info-list .ico svg { width:22px; height:22px; }
.info-list b { display:block; font-family:var(--sans); font-weight:600; }
.info-list a { color: var(--ink); }
.info-list a:hover { color: var(--terra-deep); }
.info-list small { color: var(--muted); }

/* Formular */
.form-card {
  background: var(--white); border:1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 4vw, 2.4rem); box-shadow: var(--shadow-md);
}
.field { margin-bottom: 1.1rem; }
.field label { display:block; font-weight:600; font-size:.92rem; margin-bottom:.4rem; color: var(--ink); }
.field input, .field textarea {
  width:100%; font-family: var(--sans); font-size:1rem; color: var(--ink);
  background: var(--sand-50); border:1.5px solid var(--line); border-radius: 11px;
  padding: .8rem 1rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--green); background:#fff;
  box-shadow: 0 0 0 4px var(--green-soft);
}
.field textarea { resize: vertical; min-height: 130px; }
.req { color: var(--terra-deep); }
.form-note { font-size:.85rem; color: var(--muted); margin-top: 1rem; }

/* ---- Objekte-Seite ------------------------------------------------- */
.empty-state {
  text-align:center; background: var(--white); border:1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(2.5rem,6vw,4rem); box-shadow: var(--shadow-sm);
}
.empty-state .ico {
  width:76px;height:76px;border-radius:20px;margin:0 auto 1.5rem;display:grid;place-items:center;
  background: var(--green-soft); color: var(--green-deep);
}
.empty-state .ico svg { width:38px;height:38px; }
.search-cats { display:flex; flex-wrap:wrap; gap:.6rem; justify-content:center; margin:1.8rem 0 2rem; }
.pill { background: var(--sand-100); border:1px solid var(--line); border-radius:999px; padding:.45rem 1rem; font-size:.9rem; color:var(--ink-soft); }

/* ---- ImmoScout-Einbettung ----------------------------------------- */
.iso-embed {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); overflow: hidden; margin-top: 2rem;
}
.iso-embed .iso-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  justify-content: space-between; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line);
  background: var(--sand-100);
}
.iso-embed .iso-bar b { font-family: var(--sans); font-weight: 600; color: var(--ink); }
.iso-embed .iso-bar small { color: var(--muted); }
.iso-embed iframe { display: block; width: 100%; height: 640px; border: 0; background: #fff; }
.iso-fallback { padding: .9rem 1.4rem; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--sand-50); }
@media (max-width: 600px){ .iso-embed iframe { height: 560px; } }

/* ---- Rechtstext-Seiten (Impressum/Datenschutz) -------------------- */
.legal { background:#fff; }
.legal .narrow { }
.legal h2 { margin-top: 2.5rem; font-size: 1.5rem; }
.legal h3 { margin-top: 1.8rem; font-size: 1.15rem; font-family: var(--sans); font-weight:600; }
.legal p, .legal li { color: var(--ink-soft); }
.legal address { font-style: normal; line-height: 1.9; }
.page-hero {
  background: linear-gradient(180deg, var(--sand-100), var(--sand-50));
  padding: clamp(2.5rem,6vw,4rem) 0 clamp(2rem,4vw,3rem);
  border-bottom: 1px solid var(--line);
}
.page-hero .eyebrow { margin-bottom:.6rem; }
.page-hero p { color: var(--ink-soft); max-width: 60ch; margin:.5rem 0 0; }

/* ---- Footer -------------------------------------------------------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); padding: 3.5rem 0 1.5rem; }
.site-footer a { color: rgba(255,255,255,.8); }
.site-footer a:hover { color: #fff; }
.footer-grid { display:grid; grid-template-columns: 1.5fr 1fr 1fr; gap:2.5rem; margin-bottom:2.5rem; }
.footer-brand .brand { color:#fff; margin-bottom:1rem; }
.footer-brand .brand small { color: rgba(255,255,255,.55); }
.footer-brand p { max-width: 34ch; font-size:.95rem; }
.footer-col h4 { color:#fff; font-family:var(--sans); font-weight:600; font-size:.95rem; text-transform:uppercase; letter-spacing:.1em; margin-bottom:1rem; }
.footer-col ul { list-style:none; padding:0; margin:0; display:grid; gap:.6rem; font-size:.95rem; }
.footer-bottom {
  border-top:1px solid rgba(255,255,255,.12); padding-top:1.5rem;
  display:flex; flex-wrap:wrap; gap:.8rem 1.5rem; justify-content:space-between; align-items:center;
  font-size:.85rem; color: rgba(255,255,255,.55);
}
.footer-bottom nav { display:flex; gap:1.2rem; flex-wrap:wrap; }
@media (max-width: 820px){ .footer-grid { grid-template-columns:1fr; gap:2rem; } }

/* ---- Reveal-Animation (dezent) ------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.in { opacity: 1; transform: none; }
}
