/* ==========================================================================
   Komponenten: Buttons, Header, Icons, Chips, FAQ, Galerie, Dialoge,
   Formular, Sticky-Leiste, Consent
   ========================================================================== */

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  --btn-border: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 52px;
  padding: .8em 1.5em;
  border: 2px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn .icon { width: 1.2em; height: 1.2em; }

/* Orange Primäraktion – dunkle Schrift für ausreichenden Kontrast */
.btn--primary {
  --btn-bg: var(--orange);
  --btn-fg: var(--ink);
  --btn-border: var(--orange);
  box-shadow: 0 10px 28px -12px rgba(242, 129, 0, .75);
}
.btn--primary:hover { --btn-bg: var(--orange-hover); --btn-border: var(--orange-hover); }

.btn--ghost { --btn-border: color-mix(in srgb, currentColor 35%, transparent); }
.btn--ghost:hover { --btn-border: currentColor; }

.btn--navy { --btn-bg: var(--navy); --btn-fg: var(--white); --btn-border: var(--navy); }
.btn--navy:hover { --btn-bg: var(--navy-deep); --btn-border: var(--navy-deep); }

.btn--whatsapp { --btn-bg: var(--whatsapp); --btn-fg: var(--white); --btn-border: var(--whatsapp); }
.btn--whatsapp:hover { --btn-bg: #187a42; --btn-border: #187a42; }

.btn--small { min-height: 44px; padding: .55em 1.1em; font-size: .9375rem; }
.btn--block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 44px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .3em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
.text-link:hover { text-decoration-color: var(--orange); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.site-header__logo {
  display: block;
  flex: none;
  margin-right: auto;
}
.site-header__logo img { width: auto; height: 40px; }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--navy);
  background: var(--paper);
  text-decoration: none;
  transition: background-color .2s, color .2s;
}
.icon-btn:hover { background: var(--navy); color: var(--white); }
.icon-btn--whatsapp { color: var(--whatsapp); }
.icon-btn--whatsapp:hover { background: var(--whatsapp); }

.header-phone {
  display: none;
  align-items: center;
  gap: .5em;
  min-height: 44px;
  padding-inline: 6px;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone:hover { color: var(--ink); }
.header-phone small { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); line-height: 1.1; }

.site-header__cta { display: none; }

/* Kapitelreiter: mobil eigene Zeile, horizontal scrollbar */
.chapter-nav {
  border-top: 1px solid var(--line);
}
.chapter-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  height: 44px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-inline: var(--gutter);
  margin-inline: calc(-1 * var(--gutter));
}
.chapter-nav ul::-webkit-scrollbar { display: none; }
.chapter-nav li { scroll-snap-align: start; flex: none; }
.chapter-nav a {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  height: 34px;
  padding-inline: 12px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.chapter-nav a:hover { color: var(--ink); background: var(--paper); }
.chapter-nav a[aria-current="true"] { color: var(--white); background: var(--navy); }

@media (min-width: 720px) {
  .header-phone { display: inline-flex; }
  .site-header__actions .icon-btn--phone { display: none; }
  .site-header__cta { display: inline-flex; }
}

@media (min-width: 1100px) {
  .site-header .container {
    display: flex;
    align-items: center;
    gap: 24px;
  }
  .site-header__bar { display: contents; }
  .site-header__logo { order: 1; margin-right: 0; }
  .site-header__logo img { height: 46px; }
  .chapter-nav {
    order: 2;
    border: 0;
    margin-right: auto;
  }
  .chapter-nav ul { height: 78px; overflow: visible; padding: 0; margin: 0; gap: 2px; }
  .site-header__actions { order: 3; }
}

@media (min-width: 1100px) and (max-width: 1439px) {
  .header-phone small { display: none; }
  .chapter-nav a { padding-inline: 9px; font-size: .8125rem; }
}

/* ---------- Chips / Fakten ---------- */
.fact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}
.fact-list li {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .45em .9em .45em .7em;
  border: 1px solid var(--c-line, var(--line));
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--c-surface, #fff) 70%, transparent);
}
.fact-list .icon { color: var(--orange); width: 1.1em; height: 1.1em; }

.check-list {
  display: grid;
  gap: 14px;
  list-style: none;
}
.check-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}
.check-list .icon {
  width: 28px; height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--ink);
  stroke-width: 2.6;
}
.check-list .is-neutral .icon { background: transparent; color: var(--c-muted, var(--muted)); border: 2px solid currentColor; padding: 3px; }
.check-list strong { display: block; }

/* ---------- Preisanzeige ---------- */
.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .2em .5em;
  font-family: var(--font-display);
  line-height: 1;
}
.price__from { font-size: clamp(1rem, .9rem + .4vw, 1.3rem); color: var(--c-muted, var(--muted)); }
.price__value {
  font-size: clamp(2.5rem, 1.8rem + 3vw, 4.4rem);
  letter-spacing: -.02em;
  color: var(--c-price, var(--navy));
}
.price__note {
  font-family: var(--font-text);
  font-size: .875rem;
  font-weight: 600;
  color: var(--c-muted, var(--muted));
}

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--c-line, var(--line)); }
.faq-item { border-bottom: 1px solid var(--c-line, var(--line)); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 18px 0;
  font-weight: 700;
  font-size: clamp(1.02rem, .98rem + .25vw, 1.15rem);
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--c-line, var(--line));
  background:
    linear-gradient(var(--orange), var(--orange)) center / 12px 2px no-repeat,
    linear-gradient(var(--orange), var(--orange)) center / 2px 12px no-repeat;
  transition: transform .3s var(--ease), background-size .3s;
}
.faq-item[open] summary::after { transform: rotate(180deg); background-size: 12px 2px, 2px 0; }
.faq-item summary:hover { color: var(--c-accent-text, var(--navy)); }
.faq-item__body {
  padding: 0 52px 24px 0;
  color: var(--c-muted, var(--muted));
}
.faq-item__body p + p { margin-top: .75em; }

/* ---------- Galerie ---------- */
.gallery {
  display: grid;
  list-style: none;
  gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 900px) {
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.gallery__item { margin: 0; }
.gallery__item--wide { grid-column: span 2; }

.gallery__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-surface, #fff);
  border: 1px solid var(--c-line, var(--line));
  text-decoration: none;
  color: inherit;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.gallery__link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.gallery__media {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #fff;
}
.gallery__media img {
  width: 100%;
  height: 100%;
  transition: transform .8s var(--ease);
}
.gallery__link:hover .gallery__media img { transform: scale(1.035); }

/* Freisteller vollständig zeigen, Milieubilder füllen */
.gallery__media--door { aspect-ratio: 3 / 4.6; padding: 6% 12%; }
.gallery__media--door img { object-fit: contain; }
.gallery__media--door-wide { aspect-ratio: 1 / 1; padding: 4%; }
.gallery__media--door-wide img { object-fit: contain; }
.gallery__media--scene { aspect-ratio: 4 / 3; }
.gallery__item--wide .gallery__media--scene { aspect-ratio: 16 / 9; }
@media (min-width: 900px) { .gallery__item--wide .gallery__media--scene { aspect-ratio: auto; min-height: 240px; } }
.gallery__media--scene img { object-fit: cover; position: absolute; inset: 0; }

.gallery__zoom {
  position: absolute;
  right: 12px; bottom: 12px;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
  opacity: 0;
  transform: scale(.85);
  transition: opacity .25s, transform .25s var(--ease);
}
.gallery__link:hover .gallery__zoom,
.gallery__link:focus-visible .gallery__zoom { opacity: 1; transform: none; }
@media (hover: none) { .gallery__zoom { opacity: 1; transform: none; } }

.gallery__caption {
  padding: 14px 16px 16px;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.35;
}
.gallery__caption small {
  display: block;
  margin-top: 2px;
  font-weight: 400;
  font-size: .8125rem;
  color: var(--c-muted, var(--muted));
}

/* Platzhalter für nachzuliefernde Bilder */
.placeholder {
  position: relative;
  height: 100%;
  display: grid;
  place-content: center;
  gap: 12px;
  min-height: 260px;
  padding: 28px;
  border: 2px dashed color-mix(in srgb, var(--c-text, var(--ink)) 28%, transparent);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--c-text, var(--ink)) 4%, transparent) 14px 28px),
    var(--c-surface, var(--paper));
  color: var(--c-muted, var(--muted));
  text-align: center;
  font-size: .9375rem;
}
.placeholder .icon { width: 56px; height: 56px; margin-inline: auto; color: var(--orange); stroke-width: 1.4; }
.placeholder strong {
  font-family: var(--font-display);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-text, var(--ink));
}

/* ---------- Dialoge ---------- */
.modal {
  width: min(100% - 24px, 980px);
  max-height: min(100dvh - 24px, 920px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(8, 20, 35, .72);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal[open] { display: flex; flex-direction: column; }

@media (prefers-reduced-motion: no-preference) {
  .modal[open] { animation: modal-in .35s var(--ease); }
  .modal[open]::backdrop { animation: fade-in .3s ease; }
}
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.98); } }
@keyframes fade-in { from { opacity: 0; } }

.modal__inner {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal__close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: var(--ink);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .14);
}
.modal__close:hover { background: var(--orange); }

@media (max-width: 640px) {
  .modal {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 16px);
    margin: auto 0 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* Bild-Dialog */
.lightbox .modal__inner { display: grid; }
.lightbox__media {
  display: grid;
  place-items: center;
  background: var(--paper);
  min-height: 240px;
}
.lightbox__media img {
  width: 100%;
  height: auto;
  max-height: min(68dvh, 720px);
  object-fit: contain;
}
.lightbox__media.is-door img { padding: 24px; }
.lightbox__body {
  display: grid;
  gap: 14px;
  padding: clamp(22px, 3vw, 36px);
}
.lightbox__body .h3 { padding-right: 40px; }
@media (min-width: 900px) {
  .lightbox .modal__inner { grid-template-columns: 1.35fr 1fr; }
  .lightbox__media { min-height: 520px; }
  .lightbox__media img { max-height: min(84dvh, 860px); }
  .lightbox__body { align-content: center; }
}

/* Anfrage-Dialog */
.inquiry { width: min(100% - 24px, 760px); }
.inquiry__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 26px clamp(20px, 4vw, 40px) 0;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
}
.inquiry__head picture { flex: none; width: 92px; align-self: flex-end; }
.inquiry__head img {
  flex: none;
  width: 92px;
  margin-bottom: -2px;
  align-self: flex-end;
}
.inquiry__head div { padding-bottom: 22px; padding-right: 40px; }
.inquiry__head .eyebrow { --eyebrow-color: var(--orange); }
.inquiry__head h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); margin-top: 6px; }
.inquiry__head p { margin-top: 6px; font-size: .9375rem; color: #c9d5e3; }
.inquiry__body { padding: clamp(20px, 4vw, 40px); }

/* ---------- Formular ---------- */
.form { display: grid; gap: 22px; }
.form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form legend, .form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: .9375rem;
}
.form .optional { font-weight: 400; color: var(--muted); }
.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-2 { grid-column: span 2; }
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  font-size: 1rem; /* verhindert iOS-Zoom */
  transition: border-color .2s, box-shadow .2s;
}
.input:hover { border-color: #b9c4d0; }
.input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(21, 55, 95, .15); }
.input[aria-invalid="true"] { border-color: #c0392b; }
textarea.input { min-height: 120px; resize: vertical; }

.field-hint { margin-top: 6px; font-size: .8125rem; color: var(--muted); }
.field-error {
  margin-top: 6px;
  font-size: .875rem;
  font-weight: 600;
  color: #b3261e;
}

.choice-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
}
.choice { position: relative; }
.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.choice span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  height: 100%;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1.3;
  transition: border-color .2s, background-color .2s;
}
.choice span::before {
  content: "";
  flex: none;
  width: 18px; height: 18px;
  border: 2px solid #9aa7b5;
  border-radius: 50%;
  transition: border .15s, background-color .15s;
}
.choice input:hover + span { border-color: #b9c4d0; }
.choice input:checked + span { border-color: var(--navy); background: #eef3f9; }
.choice input:checked + span::before { border: 5px solid var(--navy); }
.choice input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }

.form-summary {
  padding: 12px 16px;
  border-radius: 10px;
  background: #fdecea;
  color: #8c1d18;
  font-weight: 600;
}

.privacy-note {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--paper);
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--muted);
}
.privacy-note .icon { color: var(--navy); margin-top: 2px; }

.inquiry-output { display: grid; gap: 16px; }
.inquiry-output h3:focus { outline: none; }
.inquiry-output textarea {
  min-height: 220px;
  font-size: .875rem;
  line-height: 1.5;
  background: var(--paper);
}
.inquiry-output .btn-row .btn { flex: 1 1 200px; }
.copy-status { min-height: 1.5em; font-size: .875rem; font-weight: 600; color: var(--navy); }

/* ---------- Mobile Sticky-Leiste ---------- */
.sticky-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 52px 52px 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -20px rgba(0, 0, 0, .4);
  transform: translateY(110%);
  transition: transform .35s var(--ease);
}
.sticky-cta.is-visible { transform: none; }
.sticky-cta .icon-btn { width: 52px; height: 52px; border-radius: 14px; }
.sticky-cta .btn { min-height: 52px; border-radius: 14px; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

/* ---------- Consent (nur aktiv, wenn Tracking freigeschaltet) ---------- */
.consent {
  position: fixed;
  left: 12px; right: 12px; bottom: 12px;
  z-index: 60;
  max-width: 560px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45);
  border: 1px solid var(--line);
}
.consent h2 { font-size: 1.125rem; }
.consent p { margin-top: 8px; font-size: .875rem; color: var(--muted); }
.consent .btn-row { margin-top: 16px; }
.consent .btn { flex: 1 1 160px; }

body.is-locked .sticky-cta { transform: translateY(110%); }
