/* EstateView · Grundlagen, Typografie, Komponenten, Header, Menü, Footer */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: default;
}

/* Wunsch: Beim Klick auf Text soll kein Text-Cursor / Eingabe-Caret erscheinen.
   Nur echte Eingabefelder zeigen den Schreib-Cursor. */
body :where(h1, h2, h3, h4, p, li, span, small, strong, em, figcaption, blockquote, legend, dt, dd) { cursor: default; }
:where(body *:not(input):not(textarea):not(select):not([contenteditable="true"])) { caret-color: transparent; }
a, button, summary, label, [role="button"] { cursor: pointer; }
a *, button *, summary *, label * { cursor: inherit; }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.2; }
::selection { background: rgb(var(--glow-rgb) / .35); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px; background: var(--surface); color: var(--text);
}
.skip-link:focus { top: 12px; }

[data-theme="dark"] .on-light, [data-theme="creative"] .on-light { display: none !important; }
[data-theme="light"] .on-dark { display: none !important; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; position: relative; z-index: 1; }
/* Nur seitlich abschneiden: Glows duerfen nach oben/unten weich in den Nachbarabschnitt auslaufen,
   statt an der Abschnittskante hart zu enden */
.section { position: relative; padding-block: var(--space-section); overflow-x: clip; }
.center { text-align: center; }

.h-display {
  font: 400 clamp(27px, 3.7vw, 52px)/1.12 var(--font-display);
  text-transform: uppercase; letter-spacing: .02em; color: var(--heading); margin: 0;
}
.section-lead { max-width: 840px; margin: 22px auto 0; color: var(--text-2); font-size: clamp(15px, 1.15vw, 17px); }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0;
  font: 600 13px/1 var(--font-body); text-transform: uppercase; letter-spacing: .18em; color: var(--accent);
}
.kicker::before, .kicker::after { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6; }

.glow {
  position: absolute; width: 1100px; height: 1100px; border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgb(var(--glow-rgb) / var(--glow-a, .2)), rgb(var(--glow-rgb) / calc(var(--glow-a, .2) * .35)) 45%, transparent);
}
.glow--left { left: -640px; top: 14%; }
.glow--right { right: -640px; top: 4%; }

/* Platzhalter-Markierung (Daten kommen von Max) */
.ph {
  display: inline-block; padding: 0 7px; border-radius: 6px; white-space: nowrap; font-size: .92em; line-height: 1.5;
  background: rgba(255, 196, 0, .13); color: #ffd25e; border: 1px dashed rgba(255, 196, 0, .5);
}
[data-theme="light"] .ph { background: #fff5d1; color: #7d5900; border-color: #dcae3c; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: var(--h); padding: 0 22px; border-radius: 12px;
  border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-text);
  font: 600 16px/1 var(--font-body); letter-spacing: .005em; text-decoration: none; white-space: nowrap;
  box-shadow: var(--btn-shadow);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn::after {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  background: linear-gradient(110deg, transparent 32%, rgba(255, 255, 255, .85) 50%, transparent 68%);
  transform: translateX(-130%); transition: transform .8s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--btn-shadow-hover); }
.btn:hover::after { transform: translateX(130%); }
.btn:active { transform: translateY(0); }
.btn .i { width: 1.1em; height: 1.1em; stroke-width: 2; }
.btn-sm { --h: 42px; padding: 0 17px; font-size: 15px; }
.btn-lg { --h: 56px; padding: 0 26px; font-size: 16.5px; }
.btn-ghost {
  background: transparent; color: var(--text); border-color: var(--line-strong); box-shadow: none;
}
.btn-ghost::after { background: linear-gradient(110deg, transparent 32%, rgb(var(--glow-rgb) / .18) 50%, transparent 68%); }
.btn-ghost:hover { box-shadow: 0 0 0 1px rgb(var(--glow-rgb) / .3), 0 10px 30px -14px rgb(var(--glow-rgb) / .6); }

.icon-btn {
  all: unset; box-sizing: border-box; cursor: pointer; flex: none;
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--text); transition: background .25s;
}
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.badge {
  justify-self: start; display: inline-block; padding: 6px 10px; border-radius: 7px;
  font: 600 11.5px/1 var(--font-body); text-transform: uppercase; letter-spacing: .08em;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line-strong);
}

/* ---------- Karten & Icon-Kacheln ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg); padding: 30px;
}
.card-title { font: 600 clamp(20px, 1.75vw, 25px)/1.2 var(--font-head); margin: 0; color: var(--heading); letter-spacing: .005em; }
.icon-tile {
  flex: none; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 16px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 12px 30px -16px rgb(var(--glow-rgb) / .6);
}
.icon-tile .i { width: 30px; height: 30px; stroke-width: 1.5; filter: drop-shadow(0 0 8px rgb(var(--glow-rgb) / .55)); }

/* Tastatur-/Maus-Grafik (WASD) */
.key {
  display: grid; place-items: center; border-radius: 12px;
  font: 600 18px/1 var(--font-head); color: var(--text);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong);
  box-shadow: 0 4px 0 rgb(var(--glow-rgb) / .2), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.k-w { grid-column: 2; grid-row: 1; } .k-a { grid-column: 1; grid-row: 2; }
.k-s { grid-column: 2; grid-row: 2; } .k-d { grid-column: 3; grid-row: 2; }
.mouse { position: relative; display: block; width: 46px; height: 72px; border-radius: 24px; border: 1.5px solid var(--line-strong); }
.mouse::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 58%; width: 1px; background: var(--line-strong); }
.mouse-wheel { position: absolute; left: 50%; top: 12px; width: 4px; height: 12px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); z-index: 1; }

/* ---------- Reveal beim Scrollen (einmalig, dezent) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .35s, box-shadow .35s, backdrop-filter .35s; }
.header-inner {
  width: min(100% - 2 * var(--gutter), var(--max-wide)); margin-inline: auto; height: 84px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
}
.header-inner > :first-child { justify-self: start; }
.header-inner > :last-child { justify-self: end; }
.brand { display: block; line-height: 0; }
.brand-logo { height: 36px; width: auto; }
.site-header.is-scrolled {
  background: var(--header-bg); box-shadow: 0 1px 0 var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
}

/* ---------- Menü (Overlay) ---------- */
.menu { position: fixed; inset: 0; z-index: 80; }
.menu[hidden] { display: none; }
.menu-backdrop {
  position: absolute; inset: 0; background: rgba(4, 8, 14, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s;
}
.menu-panel {
  position: absolute; top: 12px; left: 12px; width: min(900px, calc(100% - 24px)); max-height: calc(100% - 24px);
  display: flex; flex-direction: column; overflow: auto; padding: 22px 30px 26px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 24px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6), 0 0 70px rgb(var(--glow-rgb) / .14);
  transform: translateX(-28px); opacity: 0; transition: transform .5s var(--ease), opacity .4s;
}
.menu.is-open .menu-backdrop { opacity: 1; }
.menu.is-open .menu-panel { transform: none; opacity: 1; }
.menu-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.menu-logo { height: 30px; width: auto; }
.menu-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 44px; padding: 28px 0 24px; }
.menu-label { margin: 0 0 12px; font: 500 13.5px/1 var(--font-body); color: var(--text-3); }
/* Leistungen: gross, mit kurzer Beschreibung, Haarlinien */
.menu-services { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.menu-services li { border-bottom: 1px solid var(--line); }
.menu-services a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 14px 17px 6px;
  border-radius: 12px; color: var(--text); text-decoration: none; transition: padding .45s var(--ease), background .3s;
}
.menu-services strong { display: block; font: 600 clamp(20px, 2vw, 25px)/1.2 var(--font-head); color: var(--heading); transition: color .3s; }
.menu-services small { display: block; margin-top: 4px; font-size: 14px; color: var(--text-3); }
.menu-services .i { width: 22px; height: 22px; color: var(--text-3); transition: transform .45s var(--ease), color .3s; }
.menu-services a:hover, .menu-services a:focus-visible, .menu-services a[aria-current] { padding-left: 16px; background: var(--accent-soft); }
.menu-services a:hover .i, .menu-services a:focus-visible .i, .menu-services a[aria-current] .i { color: var(--accent); transform: translateX(4px); }
.menu-services a[aria-current] strong { color: var(--accent); }
/* Seitenlinks: schlichte Liste statt Pillen */
.menu-links { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 2px; }
.menu-links a { display: inline-block; padding: 7px 0; font: 500 19px/1.3 var(--font-head); color: var(--text-2); text-decoration: none; transition: color .25s, transform .35s var(--ease); }
.menu-links a:hover, .menu-links a:focus-visible, .menu-links a[aria-current] { color: var(--heading); transform: translateX(4px); }
.menu-contact { list-style: none; margin: 0; padding: 18px 0 0; display: grid; gap: 11px; border-top: 1px solid var(--line); }
.menu-contact li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14.5px; }
.menu-contact .i { color: var(--accent); }
.menu-contact a { text-decoration: none; }
.menu-foot { padding-top: 20px; border-top: 1px solid var(--line); }
.menu-foot .btn { width: 100%; }
body.menu-open { overflow: hidden; }

/* ---------- Schnellkontakt: runder Button unten rechts (Standardplatz fuer Chat-Buttons) ---------- */
.float-chat {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; text-decoration: none;
  box-shadow: 0 14px 32px -12px rgba(37, 211, 102, .8), 0 3px 10px rgba(0, 0, 0, .28);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.float-chat .i { width: 30px; height: 30px; }
.float-chat:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -12px rgba(37, 211, 102, .95), 0 3px 10px rgba(0, 0, 0, .28); }
.float-chat-label {
  position: absolute; right: calc(100% + 12px); top: 50%; padding: 9px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  font: 600 14px/1 var(--font-body); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .55);
  opacity: 0; transform: translate(8px, -50%); pointer-events: none; transition: opacity .3s, transform .4s var(--ease);
}
.float-chat:hover .float-chat-label, .float-chat:focus-visible .float-chat-label { opacity: 1; transform: translate(0, -50%); }
@media (max-width: 1600px) { .footer-bottom { padding-right: 72px; } } /* "nach oben" nicht unter dem Button */

/* ---------- Footer ---------- */
.site-footer { position: relative; padding: 76px 0 28px; background: var(--bg-alt); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.35fr .8fr 1fr 1fr; gap: 40px; }
.footer-logo { height: 38px; width: auto; }
.footer-brand p { color: var(--text-2); font-size: 14.5px; max-width: 320px; margin: 18px 0 22px; }
.footer-title { font: 600 17px/1.2 var(--font-head); margin: 4px 0 18px; color: var(--text); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { color: var(--text-2); text-decoration: none; font-size: 14.5px; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-contact li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14.5px; }
.footer-contact .i { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--text-2);
}
.footer-bottom p { margin: 0; }
.footer-bottom a { color: inherit; text-decoration: none; }
.footer-bottom a:hover { color: var(--accent); }
.to-top { display: inline-flex; align-items: center; gap: 12px; }
.to-top-ring {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--accent); transition: transform .35s var(--ease), background .3s;
}
.to-top:hover .to-top-ring { transform: translateY(-3px); background: var(--accent-soft); }

/* ---------- Responsiv ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .menu-body { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .header-inner { height: 70px; }
  .brand-logo { height: 26px; }
  .site-header .btn-sm { --h: 38px; padding: 0 12px; font-size: 14px; }
  .site-header .btn-sm span { display: none; }
  .site-header .btn-sm .i { width: 20px; height: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .float-chat { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .float-chat-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .js .reveal { opacity: 1; transform: none; }
}
