/* =========================================================================
   Kaufmann Immobilien - Design System (v2, nach design-taste-frontend)
   Sans-Display (Bricolage Grotesque) + Inter Tight, ein Grün-Brand + Messing-
   Akzent, echte Fotos brand-getoent, Light + Dark via prefers-color-scheme.
   ========================================================================= */

:root {
  color-scheme: light dark;

  /* --- semantische Tokens: LIGHT --- */
  --bg:            #EEF0EA;
  --surface:       #FAFBF7;
  --surface-2:     #E4E8DE;
  --text:          #15180F;
  --text-muted:    #59604F;
  --line:          rgba(21, 24, 15, .14);
  --line-strong:   rgba(21, 24, 15, .24);

  --brand:         #1F3D2B;
  --brand-2:       #2A4E38;
  --on-brand:      #EEF0EA;
  --on-brand-muted: rgba(238, 240, 234, .76);

  --accent:        #C6A15B;   /* Messing-Akzent, Deko / auf Dunkel */
  --accent-ink:    #6E5A26;   /* Akzent-Text auf Hell, WCAG AA */

  --btn-bg:        var(--brand);
  --btn-text:      var(--on-brand);

  --panel-bg:      var(--brand);
  --panel-text:    var(--on-brand);
  --panel-line:    rgba(238, 240, 234, .20);

  --input-bg:      #FFFFFF;
  --photo-tint:    linear-gradient(180deg, rgba(20,42,28,.05), rgba(20,42,28,.30));

  /* --- Typografie --- */
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Inter Tight", system-ui, -apple-system, sans-serif;

  /* --- Rhythmus --- */
  --wrap: 1180px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4rem, 9vw, 8rem);
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 2px 4px rgba(20,30,18,.04), 0 22px 48px -30px rgba(20,30,18,.40);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:            #0E1A12;
    --surface:       #15251B;
    --surface-2:     #1B2E22;
    --text:          #ECEFE6;
    --text-muted:    #9DA694;
    --line:          rgba(236, 239, 230, .13);
    --line-strong:   rgba(236, 239, 230, .24);

    --brand:         #2A4E38;
    --brand-2:       #356045;
    --on-brand:      #ECEFE6;
    --on-brand-muted: rgba(236, 239, 230, .74);

    --accent:        #D0AC6A;
    --accent-ink:    #D9B978;

    --btn-bg:        #CDA968;   /* Primaerbutton pop-t auf Dunkel */
    --btn-text:      #14231A;

    --panel-bg:      #14231A;
    --panel-text:    #ECEFE6;
    --panel-line:    rgba(236, 239, 230, .16);

    --input-bg:      #0E1A12;
    --photo-tint:    linear-gradient(180deg, rgba(8,16,11,.20), rgba(8,16,11,.52));
  }
}

/* ------------------------------ Reset ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: clamp(1rem, .96rem + .2vw, 1.07rem);
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2.5px solid var(--accent-ink); outline-offset: 3px; border-radius: 3px; }

.ph { font-size: 1.2em; line-height: 1; display: inline-block; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--brand); color: var(--on-brand);
  padding: .6rem 1rem; border-radius: 8px; transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* ------------------------------ Eyebrow -------------------------------- */
.eyebrow {
  font-size: .78rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.25rem;
}
.eyebrow-onbrand { color: var(--accent); }

/* ------------------------------ Buttons -------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 500; letter-spacing: -.01em; white-space: nowrap;
  padding: .9rem 1.6rem; border-radius: 999px; min-height: 50px;
  transition: transform .16s ease, background-color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--brand); transform: translateY(-2px); }
.btn-ghost:active { transform: translateY(0) scale(.985); }
.btn-block { width: 100%; }

/* ------------------------------ Header --------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.site-header[data-scrolled] {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--brand); }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text {
  font-family: var(--font-display); font-weight: 600; font-size: 1.14rem;
  letter-spacing: -.02em; line-height: 1; color: var(--text);
  display: flex; flex-direction: column; gap: 3px;
}
.brand-sub {
  font-family: var(--font-body); font-weight: 500; font-size: .58rem;
  letter-spacing: .26em; text-transform: uppercase; color: var(--text-muted);
}

.nav { display: none; gap: 2rem; }
.nav a { font-size: .95rem; color: var(--text); position: relative; padding: .35rem 0; transition: color .2s ease; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 1.5px;
  background: var(--accent-ink); transition: right .28s cubic-bezier(.2,.7,.3,1);
}
.nav a:hover { color: var(--brand); }
.nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: .85rem; }
.header-phone { display: none; align-items: center; gap: .45rem; font-size: .9rem; color: var(--text); }
.header-phone .ph { color: var(--brand); font-size: 1.15rem; }
.header-phone:hover { color: var(--brand); }
.header-cta { display: none; padding: .6rem 1.2rem; min-height: 44px; font-size: .92rem; }

.nav-toggle {
  width: 46px; height: 46px; display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; border-radius: 10px;
}
.nav-toggle-bar { width: 22px; height: 2px; background: var(--text); transition: transform .28s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.mobile-nav {
  display: flex; flex-direction: column; gap: .25rem;
  padding: 1rem var(--gutter) 1.75rem;
  border-top: 1px solid var(--line); background: var(--bg);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding: .85rem .25rem; font-family: var(--font-display); font-size: 1.35rem; border-bottom: 1px solid var(--line); }
.mobile-nav a.btn { border: none; margin-top: 1rem; font-family: var(--font-body); font-size: 1rem; }

/* ------------------------------ Section base --------------------------- */
.section { padding-block: var(--section-y); }
.section-head { max-width: 44ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem);
  line-height: 1.06; letter-spacing: -.025em; color: var(--text); text-wrap: balance;
}
.section-title.onbrand { color: var(--panel-text); }
.section-note { margin-top: 1rem; max-width: 46ch; color: var(--text-muted); }

/* ------------------------------ Hero ----------------------------------- */
.hero { padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: var(--section-y); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero-title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.4rem, 1.4rem + 3.4vw, 3.85rem);
  line-height: 1.04; letter-spacing: -.03em; color: var(--text); text-wrap: balance;
}
.hero-title em { font-style: normal; color: var(--brand); }
@media (prefers-color-scheme: dark) { .hero-title em { color: var(--accent-ink); } }
.hero-lead {
  margin-top: 1.5rem; max-width: 42ch;
  font-size: clamp(1.05rem, 1rem + .35vw, 1.22rem); color: var(--text-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.hero-media {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 4 / 5; background: var(--surface-2);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media-tint { position: absolute; inset: 0; background: var(--photo-tint); mix-blend-mode: multiply; pointer-events: none; }

/* ------------------------------ Intro ---------------------------------- */
.intro { border-top: 1px solid var(--line); }
.intro-grid { display: grid; gap: clamp(1.75rem, 4vw, 3rem); }
.intro-lead {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.35rem);
  line-height: 1.16; letter-spacing: -.02em; color: var(--text); text-wrap: balance;
}
.intro-text { max-width: 60ch; color: var(--text-muted); }
.place-list { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.place-list li {
  font-size: .85rem; padding: .5rem .9rem; border: 1px solid var(--line-strong);
  border-radius: 999px; color: var(--brand);
}
@media (prefers-color-scheme: dark) { .place-list li { color: var(--text); } }

/* ---------------------------- Leistungen ------------------------------- */
.leistungen { background: var(--surface); border-block: 1px solid var(--line); }
.service-grid { display: grid; gap: 1.25rem; }
.service-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem); display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 34%, var(--line)); }
.service-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand);
  margin-bottom: 1.5rem;
}
.service-icon .ph { font-size: 1.7rem; }
.service-name { font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: .85rem; }
.service-text { color: var(--text-muted); }
.service-points { margin-top: 1.5rem; display: grid; gap: .7rem; }
.service-points li { position: relative; padding-left: 1.5rem; font-size: .95rem; }
.service-points li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 8px; height: 8px;
  border: 1.5px solid var(--accent-ink); border-radius: 50%;
}
.service-link { margin-top: 1.75rem; display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--brand); align-self: flex-start; }
@media (prefers-color-scheme: dark) { .service-link { color: var(--accent-ink); } }
.service-link .ph { transition: transform .2s ease; }
.service-link:hover .ph { transform: translateX(4px); }

/* ---------------------------- Bewertung -------------------------------- */
.bewertung { background: var(--panel-bg); color: var(--panel-text); }
.bewertung-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.bewertung-lead { margin-top: 1.25rem; max-width: 40ch; color: var(--on-brand-muted); }
@media (prefers-color-scheme: dark) { .bewertung-lead { color: var(--text-muted); } }
.assurances { margin-top: 2rem; display: grid; gap: 1rem; }
.assurances li { display: flex; gap: .75rem; align-items: flex-start; font-size: .98rem; }
.assurances .ph { color: var(--accent); font-size: 1.3rem; flex: none; margin-top: 1px; }

/* ------------------------------ Forms ---------------------------------- */
.lead-form {
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow); display: grid; gap: 1.1rem;
}
.field { display: grid; gap: .4rem; }
.field-row { display: grid; gap: 1.1rem; }
.field-grow { min-width: 0; }
.field label { font-size: .84rem; font-weight: 500; color: var(--text); }
.field label .opt { color: var(--text-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; width: 100%; padding: .8rem .9rem;
  background: var(--input-bg); border: 1.5px solid var(--line-strong);
  border-radius: var(--radius); color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); opacity: .8; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: #C0492F; box-shadow: 0 0 0 3px rgba(192,73,47,.16);
}
.form-divider { border: none; border-top: 1px dashed var(--line-strong); margin: .3rem 0; }
.check { display: flex; gap: .65rem; align-items: flex-start; font-size: .86rem; color: var(--text-muted); line-height: 1.45; }
.check input { margin-top: .2rem; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.check a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) { .check a { color: var(--accent-ink); } }
.form-status { font-size: .9rem; min-height: 1.2em; }
.form-status[data-state="error"] { color: #D06A4A; }
.form-status[data-state="success"] { color: var(--brand); font-weight: 500; }
@media (prefers-color-scheme: dark) { .form-status[data-state="success"] { color: var(--accent-ink); } }

/* ---------------------------- Über mich -------------------------------- */
.ueber-mich { border-bottom: 1px solid var(--line); }
.ueber-grid { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.portrait { position: relative; }
.portrait img {
  width: 100%; border-radius: var(--radius-lg); aspect-ratio: 4 / 5;
  object-fit: cover; object-position: 50% 20%; background: var(--surface-2);
}
.portrait::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.portrait figcaption {
  position: absolute; left: 1rem; bottom: 1rem; background: var(--brand); color: var(--on-brand);
  padding: .7rem 1rem; border-radius: 12px; display: flex; flex-direction: column; gap: 2px;
}
.portrait-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.portrait-role { font-size: .74rem; letter-spacing: .06em; color: var(--accent); }
.ueber-text { margin-top: 1.25rem; max-width: 52ch; color: var(--text-muted); }
.ueber-facts { margin-top: 2rem; border-top: 1px solid var(--line); }
.ueber-facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.ueber-facts dt { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-ink); }
.ueber-facts dd { font-family: var(--font-display); font-size: 1.05rem; color: var(--text); }

/* ------------------------------ Ablauf --------------------------------- */
.ablauf { background: var(--surface); }
.steps { display: grid; gap: 0; }
.step { padding: 1.75rem 0; border-top: 1px solid var(--line-strong); display: grid; gap: .5rem; }
.step-num { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--accent-ink); }
.step-title { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; letter-spacing: -.02em; }
.step-text { max-width: 60ch; color: var(--text-muted); }

/* ------------------------------ Objekte -------------------------------- */
.objekt-grid { display: grid; gap: 1.25rem; }
.objekt-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .25s ease, box-shadow .25s ease;
}
.objekt-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.objekt-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); }
.objekt-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.3,1); }
.objekt-card:hover .objekt-media img { transform: scale(1.04); }
.objekt-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20,42,28,.30)); pointer-events: none; }
.objekt-tag {
  position: absolute; top: .9rem; left: .9rem; z-index: 1;
  font-size: .72rem; letter-spacing: .06em;
  background: var(--brand); color: var(--on-brand); padding: .4rem .7rem; border-radius: 8px;
}
.objekt-body { padding: 1.4rem; }
.objekt-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -.02em; }
.objekt-loc { display: flex; align-items: center; gap: .35rem; color: var(--text-muted); margin-top: .25rem; }
.objekt-loc .ph { color: var(--accent-ink); }
.objekt-specs { display: flex; gap: 1.5rem; margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.objekt-specs div { display: flex; flex-direction: column; gap: .15rem; }
.objekt-specs dt { font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.objekt-specs dd { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; color: var(--text); }

/* ------------------------------ Kontakt -------------------------------- */
.kontakt { border-top: 1px solid var(--line); }
.kontakt-grid { display: grid; gap: clamp(2rem, 5vw, 3rem); }
.kontakt-lead { margin-top: 1.25rem; max-width: 52ch; color: var(--text-muted); }
.contact-details { margin-top: 2rem; display: grid; gap: 1rem; }
.contact-details li { display: flex; align-items: center; gap: .8rem; }
.contact-details .ph { color: var(--brand); font-size: 1.35rem; flex: none; }
@media (prefers-color-scheme: dark) { .contact-details .ph { color: var(--accent-ink); } }
.contact-details a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.kontakt-form { max-width: 640px; }

/* ------------------------------ Footer --------------------------------- */
.site-footer { background: var(--brand); color: var(--on-brand); padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: 2rem; }
.site-footer .brand { color: var(--accent); }
.site-footer .brand-text { color: var(--on-brand); }
.site-footer .brand-sub { color: var(--on-brand-muted); }
.footer-grid { display: grid; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid var(--panel-line); }
.footer-tag { margin-top: 1rem; max-width: 34ch; color: var(--on-brand-muted); font-size: .95rem; }
.footer-nav, .footer-legal { display: flex; flex-wrap: wrap; gap: 1.25rem 1.75rem; align-content: start; }
.footer-nav a, .footer-legal a { color: var(--on-brand-muted); font-size: .95rem; }
.footer-nav a:hover, .footer-legal a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-top: 1.5rem; font-size: .82rem; color: var(--on-brand-muted); }

/* ------------------------------ Reveal --------------------------------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .service-card, .objekt-card, .objekt-media img, .nav a::after, .service-link .ph { transition: none !important; }
}

/* =========================================================================
   Breakpoints
   ========================================================================= */
@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .objekt-specs { gap: 2rem; }
}

@media (min-width: 768px) {
  .service-grid { grid-template-columns: 1fr 1fr; }
  .objekt-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .step { border-top: 1px solid var(--line-strong); }
}

@media (min-width: 900px) {
  .nav { display: flex; }
  .header-phone { display: inline-flex; }
  .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }

  .hero-grid { grid-template-columns: 1.15fr .85fr; }
  .intro-grid { grid-template-columns: 1.1fr .9fr; column-gap: clamp(2rem, 6vw, 5rem); align-items: start; }
  .bewertung-grid { grid-template-columns: .9fr 1.1fr; }
  .ueber-grid { grid-template-columns: .82fr 1.18fr; }
  .kontakt-grid { grid-template-columns: 1fr; justify-items: start; }
  .kontakt-info { max-width: 620px; }
}

@media (min-width: 1100px) {
  .portrait { max-width: 420px; }
}
