/* H.Meyer Smarthome – Website-Styles. Farben und Schrift laut Brand Guidelines. */

@font-face { font-family: "Crimson Text"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/CrimsonText-Roman.woff2") format("woff2"), url("../fonts/CrimsonText-Roman.ttf") format("truetype"); }
@font-face { font-family: "Crimson Text"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("../fonts/CrimsonText-Italic.woff2") format("woff2"), url("../fonts/CrimsonText-Italic.ttf") format("truetype"); }
@font-face { font-family: "Crimson Text"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/CrimsonText-Semibold.woff2") format("woff2"), url("../fonts/CrimsonText-Semibold.ttf") format("truetype"); }
@font-face { font-family: "Crimson Text"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/CrimsonText-Bold.woff2") format("woff2"), url("../fonts/CrimsonText-Bold.ttf") format("truetype"); }

:root {
  --navy: #020e28;
  --navy-2: #0a1d40;
  --navy-3: #13305c;
  --blue: #0fc5f1;
  --blue-ink: #0679a1;      /* Blau für Text auf Weiß (ausreichender Kontrast) */
  --white: #ffffff;
  --ink: #16161c;
  --muted: #535d6e;
  --line: #dde5ec;
  --tint: #f2f6f9;
  --serif: "Crimson Text", Georgia, "Times New Roman", serif;
  --sans: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(2, 14, 40, .12);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.6;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue-ink); text-underline-offset: .18em; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.15; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only, .sprite { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--blue); color: var(--navy); padding: 8px 14px; border-radius: 8px; font-family: var(--sans); }
.skip-link:focus { top: 12px; }
.icon { width: 1.4em; height: 1.4em; flex: none; }

.eyebrow {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--blue); margin: 0 0 .9rem; display: flex; align-items: center; gap: .8rem;
}
.eyebrow::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.eyebrow--dark { color: var(--blue-ink); }
.lead { font-size: clamp(1.25rem, 2.2vw, 1.5rem); color: var(--muted); max-width: 46rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--sans); font-size: .95rem; font-weight: 500; letter-spacing: .02em;
  padding: .8em 1.4em; border-radius: 999px; border: 1.5px solid var(--blue);
  background: var(--blue); color: var(--navy); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: #3fd3f6; color: var(--navy); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--blue-ink); border-color: currentColor; }
.btn--ghost:hover { background: var(--tint); color: var(--navy); }
.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn--ghost-light:hover { background: rgba(255,255,255,.08); color: var(--white); }
.btn--small { padding: .5em 1.1em; font-size: .9rem; }
.btn--block { width: 100%; }

/* Header */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(15,197,241,.18); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand img { display: block; width: 200px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; font-family: var(--sans); font-size: .95rem; }
.site-nav a:not(.btn) { color: rgba(255,255,255,.82); text-decoration: none; padding: .3em 0; border-bottom: 1.5px solid transparent; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--blue); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 24px; height: 2px; background: var(--white); position: relative; transition: transform .2s; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; } .nav-toggle__bars::after { top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
  .brand img { width: 160px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--navy); padding: .5rem var(--gutter) 1.25rem; border-bottom: 1px solid rgba(15,197,241,.18);
  }
  .nav-open .site-nav { display: flex; }
  .site-nav a:not(.btn) { padding: .85em 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-nav .btn { margin-top: 1rem; }
}

/* Hero + 3D-Haus */
.hero { background: radial-gradient(120% 90% at 50% 70%, #0d2b55 0%, var(--navy) 62%); color: var(--white); overflow: hidden; }
.hero__text { padding-top: clamp(2.2rem, 5vw, 4rem); position: relative; z-index: 2; }
.hero h1 { color: var(--white); max-width: 22ch; margin-bottom: .3em; }
.hero .lead { color: rgba(255,255,255,.78); margin-bottom: 0; }

.house { position: relative; height: clamp(440px, 74vh, 800px); margin-top: -1rem; user-select: none; -webkit-user-select: none; }
.house__stage { position: absolute; inset: 0; }
.house__stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.house__stage canvas:active { cursor: grabbing; }
.house__markers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.house__loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity .4s; }
.house__loading span { width: 42px; height: 42px; border-radius: 50%; border: 2px solid rgba(15,197,241,.25); border-top-color: var(--blue); animation: spin 1s linear infinite; }
.house.is-ready .house__loading, .house.is-fallback .house__loading { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.house__fallback { display: none; }
.house.is-fallback { height: auto; }
.house.is-fallback .house__fallback { display: block; margin: 2rem auto 0; padding: 1.25rem var(--gutter) 3rem; max-width: var(--container); color: rgba(255,255,255,.8); }
.house.is-fallback .house__toolbar, .house.is-fallback .house__hint { display: none; }

.marker {
  position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; padding: 0; background: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px; transform: translate3d(-100px, -100px, 0); will-change: transform;
  font-family: var(--sans); transition: opacity .25s;
}
.marker__dot {
  width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--blue); border: 2px solid var(--blue);
  box-shadow: 0 4px 14px rgba(2,14,40,.45), 0 0 0 4px rgba(15,197,241,.18);
  transition: transform .2s, background .2s, color .2s;
}
.marker__dot .icon { width: 21px; height: 21px; }
.marker__pulse { position: absolute; left: -20px; top: -20px; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--blue); opacity: 0; animation: pulse 2.8s ease-out infinite; pointer-events: none; }
@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
.marker__label {
  margin-top: -20px; white-space: nowrap; font-size: .82rem; font-weight: 500; letter-spacing: .02em;
  color: var(--white); background: rgba(2,14,40,.88); border: 1px solid rgba(15,197,241,.35); padding: 4px 10px; border-radius: 999px;
  opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.marker:hover .marker__dot, .marker:focus-visible .marker__dot, .marker.is-hover .marker__dot, .marker.is-active .marker__dot { transform: scale(1.14); background: var(--blue); color: var(--navy); }
.marker:hover .marker__label, .marker:focus-visible .marker__label, .marker.is-hover .marker__label, .marker.is-active .marker__label { opacity: 1; transform: none; }
.marker:focus-visible { outline: none; }
.marker:focus-visible .marker__dot { outline: 3px solid var(--white); outline-offset: 2px; }
.marker.is-behind:not(.is-hover):not(.is-active) { opacity: .55; }
.marker.is-behind .marker__pulse { display: none; }

.house__tooltip {
  position: absolute; z-index: 1100; width: min(300px, calc(100% - 24px)); pointer-events: none;
  background: var(--white); color: var(--ink); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow);
  display: grid; gap: 4px; font-size: 1.02rem; line-height: 1.4;
}
.house__tooltip[hidden] { display: none; }
.house__tooltip strong { font-size: 1.15rem; color: var(--navy); }
.house__tooltip em { font-family: var(--sans); font-style: normal; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-ink); margin-top: 4px; }

.house__panel {
  position: absolute; z-index: 1200; right: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(380px, calc(100% - 2 * var(--gutter))); background: var(--white); color: var(--ink);
  border-radius: var(--radius); padding: 24px 24px 18px; box-shadow: 0 20px 50px rgba(0,0,0,.35);
  animation: panel-in .25s ease-out;
}
.house__panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(calc(-50% + 12px)); } }
.house__panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: .6rem; padding-right: 28px; }
.house__panel-head h2 { font-size: 1.7rem; margin: 0; }
.house__panel-icon { width: 48px; height: 48px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--blue); }
.house__panel-icon .icon { width: 26px; height: 26px; }
.house__panel p { color: var(--muted); font-size: 1.12rem; }
.house__panel-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.house__panel-actions .btn { flex: 1 1 auto; }
.house__close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--tint); color: var(--navy); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.house__close:hover { background: var(--line); }
.house__panel-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.house__panel-nav button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--navy); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.house__panel-nav button:hover { border-color: var(--blue); }

.house__toolbar { position: absolute; left: var(--gutter); right: var(--gutter); bottom: 18px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; pointer-events: none; z-index: 1150; }
.house__toolbar > * { pointer-events: auto; }
.house__zoom { display: flex; gap: 6px; margin-left: auto; }
.house__zoom button, .house__areas button {
  font-family: var(--sans); border: 1px solid rgba(15,197,241,.4); background: rgba(2,14,40,.75); color: var(--white);
  border-radius: 999px; cursor: pointer; backdrop-filter: blur(6px);
}
.house__zoom button { width: 42px; height: 42px; font-size: 1.25rem; line-height: 1; }
.house__zoom button:hover, .house__areas button:hover, .house__areas button[aria-pressed="true"] { background: var(--blue); color: var(--navy); }
.house__areas { display: flex; flex-wrap: wrap; gap: 6px; }
.house__areas[hidden] { display: none; }
.house__areas button { padding: 9px 16px; font-size: .88rem; }
.house__hint { position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); margin: 0; font-family: var(--sans); font-size: .82rem; letter-spacing: .03em; color: rgba(255,255,255,.62); white-space: nowrap; pointer-events: none; z-index: 1140; padding: 6px 14px; border-radius: 999px; transition: background .2s, color .2s; }
.house__hint.is-notice { background: rgba(2,14,40,.85); color: var(--white); border: 1px solid rgba(15,197,241,.4); }

@media (max-width: 720px) {
  .house { height: clamp(440px, 72svh, 600px); margin-top: 0; }
  .house__hint { white-space: normal; text-align: center; width: calc(100% - 2 * var(--gutter)); top: 8px; bottom: auto; }
  .marker__dot { width: 32px; height: 32px; margin: -16px 0 0 -16px; border-width: 1.5px; }
  .marker__dot .icon { width: 18px; height: 18px; }
  .marker__pulse { left: -16px; top: -16px; width: 32px; height: 32px; }
  .marker__label { display: none; }
  .house__panel { top: auto; bottom: 10px; right: 10px; left: 10px; width: auto; transform: none; max-height: 62%; overflow: auto; padding: 14px 14px 10px; animation-name: sheet-in; }
  .house__panel-head { gap: 10px; margin-bottom: .3rem; }
  .house__panel-head h2 { font-size: 1.35rem; }
  .house__panel-icon { width: 38px; height: 38px; }
  .house__panel-icon .icon { width: 21px; height: 21px; }
  .house__panel p { font-size: 1rem; line-height: 1.45; margin-bottom: .7em; }
  .house__panel-actions { flex-wrap: nowrap; gap: 8px; }
  .house__panel-actions .btn { flex: 1 1 0; padding: .65em .6em; font-size: .85rem; }
  .house__close { top: 8px; right: 8px; width: 32px; height: 32px; }
  .house__panel-nav { margin-top: 8px; padding-top: 6px; }
  .house__panel-nav button { width: 32px; height: 32px; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(20px); } }
  .house.has-panel .house__toolbar { display: none; }
}

/* Abschnitte */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.container { padding-left: var(--gutter); padding-right: var(--gutter); }
.section--tint { background: var(--tint); }
.section__head { margin-bottom: 2rem; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card a {
  display: flex; flex-direction: column; height: 100%; padding: 24px; border-radius: var(--radius); text-decoration: none;
  color: var(--ink); background: var(--white); border: 1px solid var(--line); transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card a:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--navy); color: var(--blue); margin-bottom: 16px; }
.card__icon .icon { width: 27px; height: 27px; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); font-size: 1.08rem; flex: 1; }
.card__more { font-family: var(--sans); font-size: .88rem; font-weight: 500; color: var(--blue-ink); }

.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.split--content { grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); }
@media (max-width: 900px) { .split, .split--content { grid-template-columns: 1fr; } }

.factbox { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.section--tint .factbox { border-color: transparent; box-shadow: var(--shadow); }
.factbox h3 { font-size: 1.2rem; margin-top: 1.2em; }
.factbox h3:first-child { margin-top: 0; }
.factbox--sticky { position: sticky; top: 96px; }
.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { padding-left: 1.6em; position: relative; margin: .3em 0; }
.checklist li::before { content: ""; position: absolute; left: .2em; top: .55em; width: .7em; height: .38em; border-left: 2px solid var(--blue-ink); border-bottom: 2px solid var(--blue-ink); transform: rotate(-45deg); }
.linklist { list-style: none; margin: 0; padding: 0; }
.linklist li { border-bottom: 1px solid var(--line); }
.linklist a { display: flex; align-items: center; gap: .6em; padding: .55em 0; text-decoration: none; color: var(--ink); }
.linklist a:hover { color: var(--blue-ink); }
.linklist .icon { color: var(--blue-ink); width: 1.2em; height: 1.2em; }
.linklist--inline { display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
.linklist--inline li { border: 0; }

.prose { max-width: 46rem; }
.prose--narrow { max-width: 44rem; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--blue-ink); }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose blockquote { margin: 1.5em 0; padding: .5em 1.2em; border-left: 3px solid var(--blue); color: var(--muted); font-style: italic; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.back-link { margin-top: 2.5em; font-family: var(--sans); font-size: .95rem; }

.page-head { background: radial-gradient(100% 140% at 85% 0%, #0d2b55 0%, var(--navy) 60%); color: var(--white); padding: clamp(2.2rem, 6vw, 4.5rem) 0; }
.page-head h1 { color: var(--white); margin: 0; }
.page-head .lead { color: rgba(255,255,255,.78); margin: .8em 0 0; }
.page-head--compact { padding: clamp(2rem, 5vw, 3.2rem) 0; }
.page-head__title { display: flex; align-items: center; gap: 18px; }
.page-head__icon { width: 64px; height: 64px; flex: none; border-radius: 18px; display: grid; place-items: center; border: 2px solid var(--blue); color: var(--blue); }
.page-head__icon .icon { width: 34px; height: 34px; }
.breadcrumbs { font-family: var(--sans); font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 1.2rem; }
.breadcrumbs a { color: rgba(255,255,255,.8); }
.breadcrumbs a:hover { color: var(--blue); }

.cta { background: var(--navy); color: var(--white); padding: clamp(2.8rem, 6vw, 4.5rem) 0; }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta h2 { color: var(--white); margin-bottom: .3em; }
.cta p { color: rgba(255,255,255,.75); margin: 0; max-width: 40rem; }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Formulare */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .35rem; align-content: start; }
.field label { font-family: var(--sans); font-size: .9rem; font-weight: 500; color: var(--navy); }
.field--check label { display: flex; gap: .7em; align-items: flex-start; font-family: var(--serif); font-size: 1.05rem; font-weight: 400; color: var(--ink); }
.field--check input { margin-top: .35em; width: 18px; height: 18px; accent-color: var(--blue-ink); flex: none; }
.optional { font-weight: 400; color: var(--muted); }
/* :where() hält die Spezifität bei 0, damit Fokus-/Fehlerzustände greifen; deckt auch number, url, password ab */
:where(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="file"], [type="submit"], [type="button"]), select, textarea) {
  width: 100%; font: inherit; font-size: 1.1rem; color: var(--ink); background: var(--white);
  border: 1.5px solid var(--line); border-radius: 10px; padding: .65em .8em; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-ink); box-shadow: 0 0 0 3px rgba(15,197,241,.25); }
[aria-invalid="true"] { border-color: #c0392b !important; }
.form-error { color: #b03024; font-family: var(--sans); font-size: .85rem; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: var(--radius); padding: 1.4rem 1.6rem; margin-bottom: 1.5rem; }
.notice--ok { background: #e8f8fd; border: 1px solid #9fe3f6; }
.notice--error { background: #fdecea; border: 1px solid #f3b5ae; color: #8e2a1f; }

/* Footer */
.site-footer { background: #010a1e; color: rgba(255,255,255,.72); font-size: 1.05rem; padding: 3.2rem 0 0; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer address strong { color: var(--white); }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }
.site-footer__claim { margin-top: 1rem; max-width: 26rem; }
.site-footer__links { display: flex; flex-direction: column; gap: .5rem; font-family: var(--sans); font-size: .95rem; }
.site-footer__bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 2.5rem; padding-top: 1.2rem; padding-bottom: 1.6rem; font-family: var(--sans); font-size: .82rem; color: rgba(255,255,255,.5); }
