/* ==========================================================================
   Mentrup Immobilien
   Apple-inspirierte Designsprache: Systemschrift (SF Pro auf Apple-Geräten),
   eine Akzentfarbe, viel Weißraum, durchscheinende Navigation.
   Radius-Regel: Karten 22px, Medien 22px, Eingabefelder 12px, Buttons Pille.
   ========================================================================== */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-2: #5e5e63;
  --line: rgba(0, 0, 0, 0.09);
  --line-strong: rgba(0, 0, 0, 0.18);
  --accent: #0066cc;          /* Links und Akzente */
  --accent-fill: #0071e3;     /* Button-Fläche, weißer Text: 4.7:1 */
  --accent-fill-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.08);
  --nav-bg: rgba(251, 251, 253, 0.72);
  --shadow: 0 1px 2px rgba(20, 20, 40, 0.04), 0 12px 32px -12px rgba(20, 20, 40, 0.12);
  --danger: #c4302b;
  --success: #1f7a3a;
  --star: #1d1d1f;

  --radius: 22px;
  --radius-sm: 12px;
  --container: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --nav-h: 52px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0d;
    --bg-alt: #161617;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.22);
    --accent: #2997ff;
    --accent-soft: rgba(41, 151, 255, 0.12);
    --nav-bg: rgba(22, 22, 23, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    --danger: #ff6961;
    --success: #4cd07d;
    --star: #f5f5f7;
  }
}

/* ---------- Basis ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 24px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Typografie ---------- */

h1, h2, h3, h4 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0;
  color: var(--text);
  font-weight: 600;
  text-wrap: balance;
}

.display {
  font-size: clamp(2.5rem, 5.6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.h3 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lead {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  letter-spacing: -0.018em;
  color: var(--text-2);
  max-width: 38ch;
  margin: 0;
  text-wrap: pretty;
}

.body { color: var(--text-2); max-width: 62ch; margin: 0; text-wrap: pretty; }
.body + .body { margin-top: 1em; }

.eyebrow {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.muted { color: var(--text-2); }

/* Markiert Inhalte, die noch mit echten Daten ersetzt werden müssen */
.ph {
  background: var(--accent-soft);
  border-bottom: 1px dashed var(--accent);
  border-radius: 4px;
  padding: 0 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- Buttons ---------- */

.btn {
  --pad-y: 12px;
  --pad-x: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--pad-y) var(--pad-x);
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 200ms var(--ease), transform 120ms ease-out, border-color 200ms var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent-fill); color: #fff; }
.btn-primary:hover { background: var(--accent-fill-hover); }

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-soft); }

.btn-sm { --pad-y: 7px; --pad-x: 15px; font-size: 0.9rem; }

.link-arrow {
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.link-arrow::after {
  content: "›";
  font-size: 1.25em;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 200ms var(--ease);
}
.link-arrow:hover::after { transform: translate(3px, -1px); }

.actions { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; }

/* ---------- Navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

@media (prefers-reduced-transparency: reduce) {
  .site-header { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:not(.btn) {
  color: var(--text);
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 200ms var(--ease);
}
.nav-links a:not(.btn):hover { opacity: 1; text-decoration: none; }
.nav-links a[aria-current="page"] { opacity: 1; font-weight: 600; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-right: -8px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 10px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 300ms var(--ease), opacity 200ms;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    transform-origin: top;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 250ms var(--ease), transform 350ms var(--ease), visibility 0s linear 350ms;
  }
  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 250ms var(--ease), transform 350ms var(--ease), visibility 0s;
  }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 20px; }
  .nav-links a:not(.btn) { display: block; padding: 16px 0; font-size: 1.25rem; font-weight: 600; opacity: 1; }
  .nav-links .btn { width: 100%; --pad-y: 14px; }
}

/* ---------- Sektionen ---------- */

main { display: block; }

.section { padding-block: clamp(80px, 11vw, 140px); }
.section-alt { background: var(--bg-alt); }
.section-tight { padding-block: clamp(56px, 7vw, 88px); }

.section-head { margin-bottom: clamp(40px, 5vw, 64px); max-width: 720px; }
.section-head .h2 + .lead,
.section-head .h2 + .body { margin-top: 18px; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(48px, 7vw, 88px) clamp(72px, 9vw, 120px); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}
.hero .display { font-size: clamp(2.5rem, 4.6vw, 3.9rem); }

.hero-copy .lead { margin-top: 24px; }
.hero-copy .actions { margin-top: 36px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.page-hero { padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 80px); }
.page-hero .lead { margin-top: 22px; max-width: 46ch; }
.page-hero .actions { margin-top: 32px; }

/* ---------- Medien / Bild-Platzhalter ---------- */

.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
  isolation: isolate;
}
.media img { width: 100%; height: 100%; object-fit: cover; }

.media-portrait { aspect-ratio: 4 / 5; }
.media-wide { aspect-ratio: 16 / 10; }

/* Platzhalter bis echte Fotos vorliegen */
.media-placeholder {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: var(--text-2);
  font-size: 0.88rem;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(0, 113, 227, 0.14), transparent 60%),
    radial-gradient(90% 80% at 0% 100%, rgba(29, 29, 31, 0.07), transparent 65%),
    var(--bg-alt);
}
.media-placeholder strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
@media (prefers-color-scheme: dark) {
  .media-placeholder {
    background:
      radial-gradient(120% 90% at 85% 0%, rgba(41, 151, 255, 0.18), transparent 60%),
      radial-gradient(90% 80% at 0% 100%, rgba(255, 255, 255, 0.05), transparent 65%),
      var(--surface);
  }
}

/* ---------- Schwerpunkte (Bento) ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.tile {
  position: relative;
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 380px;
}
.tile .h3 { margin-bottom: 14px; }
.tile .body { font-size: 1.02rem; }
.tile .tile-foot { margin-top: auto; padding-top: 32px; }

.tile-feature {
  grid-column: span 7;
  color: #f5f5f7;
  background:
    radial-gradient(110% 80% at 100% 0%, rgba(0, 113, 227, 0.55), transparent 55%),
    radial-gradient(80% 70% at 0% 100%, rgba(0, 113, 227, 0.18), transparent 60%),
    #111114;
}
.tile-feature .h3, .tile-feature .display-num { color: #fff; }
.tile-feature .body { color: rgba(245, 245, 247, 0.78); }
.tile-feature a { color: #6cb6ff; }

.tile-side { grid-column: span 5; }

.tile-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 0.98rem;
}
.tile-list li { display: flex; gap: 10px; align-items: baseline; }
.tile-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  transform: translateY(-2px);
}

/* Breite Kachel mit Tönung in der Akzentfarbe */
.tile-wide {
  grid-column: 1 / -1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px 64px;
  align-items: end;
  background:
    radial-gradient(90% 140% at 100% 100%, rgba(0, 113, 227, 0.12), transparent 60%),
    var(--surface);
}
.tile-wide .tile-list { margin-top: 0; }
.tile-wide .tile-foot { padding-top: 24px; }

@media (max-width: 900px) {
  .tile-feature, .tile-side { grid-column: 1 / -1; }
  .tile { min-height: 0; }
  .tile-wide { grid-template-columns: 1fr; }
}

/* ---------- Über mich ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 7vw, 104px);
  align-items: center;
}
.about-copy .h2 { margin-bottom: 24px; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 16px 48px;
  margin: 40px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.facts dt { font-size: 0.85rem; color: var(--text-2); order: 2; max-width: 16ch; }
.facts dd { margin: 0; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.025em; order: 1; }
.facts div { display: flex; flex-direction: column; gap: 2px; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .media { max-width: 420px; }
}
@media (max-width: 480px) {
  .facts { grid-template-columns: 1fr 1fr; }
}

/* ---------- Haltung / Warum ---------- */

.manifesto {
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  font-weight: 600;
  max-width: 24ch;
  margin: 0;
  text-wrap: balance;
}
.manifesto .muted { color: var(--text-2); }

.principles {
  margin: clamp(56px, 7vw, 88px) 0 0;
  padding: 0;
  list-style: none;
}
.principles li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 16px 48px;
  padding-block: 32px;
  border-top: 1px solid var(--line);
}
.principles h3 { font-size: 1.3rem; letter-spacing: -0.02em; }

@media (max-width: 760px) {
  .principles li { grid-template-columns: 1fr; }
}

/* ---------- Mietobjekte ---------- */

.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.listing {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 400ms var(--ease), box-shadow 400ms var(--ease);
}
@media (hover: hover) {
  .listing:hover { transform: translateY(-4px); }
}

.listing .media { border-radius: 0; aspect-ratio: 4 / 3; }

/* Nur ein Objekt: breite Karte, Foto links, Text rechts */
@media (min-width: 861px) {
  .listing-grid.is-single { grid-template-columns: 1fr; }
  .listing-grid.is-single .listing { display: grid; grid-template-columns: 1.25fr 1fr; }
  .listing-grid.is-single .listing-body { padding: clamp(28px, 3.5vw, 44px); }
  .listing-grid.is-single .listing-title { font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.025em; }
  .listing-grid.is-single .listing-desc { font-size: 1.02rem; }
  .listing-grid.is-single .listing:hover { transform: none; }
}

/* Bildergalerie in der Objektkarte */
.gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.gallery-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}

.gallery-btn {
  position: absolute;
  top: 50%;
  width: 36px;
  height: 36px;
  margin-top: -18px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  opacity: 0;
  transition: opacity 250ms var(--ease), transform 120ms ease-out;
}
.gallery-btn:active { transform: scale(0.94); }
.gallery-btn.is-prev { left: 12px; }
.gallery-btn.is-next { right: 12px; }
.gallery:hover .gallery-btn,
.gallery-btn:focus-visible { opacity: 1; }
@media (hover: none) {
  .gallery-btn { display: none; } /* auf Touch-Geräten wird gewischt */
}

.gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
}
.gallery-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.2);
  transition: background-color 250ms var(--ease), transform 250ms var(--ease);
}
.gallery-dots span.is-active { background: #fff; transform: scale(1.25); }

.listing-body { padding: 24px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.listing-meta { font-size: 0.85rem; color: var(--text-2); margin-bottom: 6px; }
.listing-title { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.02em; }
.listing-desc { font-size: 0.95rem; color: var(--text-2); margin: 10px 0 0; }

.listing-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.listing-specs div { display: flex; flex-direction: column; }
.listing-specs dt { font-size: 0.78rem; color: var(--text-2); order: 2; }
.listing-specs dd { margin: 0; font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; order: 1; }

.listing-foot {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
}
.listing-note { color: var(--text-2); }

.status {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
}
.status.is-rented { color: var(--text-2); }

/* ---------- Leerer Zustand ---------- */

.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(40px, 6vw, 72px) 24px;
  text-align: center;
}
.empty h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.empty p { color: var(--text-2); margin: 10px auto 22px; max-width: 46ch; }

/* ---------- Kontakt / CTA ---------- */

.cta-panel {
  border-radius: calc(var(--radius) + 6px);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(36px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: end;
}
.cta-panel .h2 { margin-bottom: 16px; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact-list span { display: block; font-size: 0.82rem; color: var(--text-2); }
.contact-list a, .contact-list strong { font-size: 1.1rem; font-weight: 500; }
.contact-list strong { font-weight: 500; }

@media (max-width: 860px) {
  .cta-panel { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- Ankaufsprofil ---------- */

.criteria {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.criteria .tile { min-height: 0; }
.crit-a { grid-column: span 4; }
.crit-b { grid-column: span 2; }
.crit-c, .crit-d, .crit-e { grid-column: span 2; }

.crit-label { font-size: 0.9rem; color: var(--text-2); margin-bottom: 12px; }
.tile-feature .crit-label { color: rgba(245, 245, 247, 0.7); }

.display-num {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  margin: 0 0 10px;
}
.display-num.is-text { font-size: clamp(1.6rem, 2.4vw, 2rem); letter-spacing: -0.03em; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.chips li {
  font-size: 0.92rem;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

/* Investitionsstrategie: breite, getönte Kachel */
.crit-f {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px 64px;
  align-items: center;
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(0, 113, 227, 0.12), transparent 60%),
    var(--surface);
}
.crit-f .chips { margin-top: 0; }

.chips-light li {
  background: var(--bg-alt);
  border-color: var(--line);
  color: var(--text);
}

@media (max-width: 960px) {
  .crit-a { grid-column: 1 / -1; }
  .crit-b { grid-column: 1 / -1; }
  .crit-c, .crit-d, .crit-e { grid-column: span 3; }
  .crit-e { grid-column: 1 / -1; }
  .crit-f { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .criteria { grid-template-columns: 1fr; }
  .crit-a, .crit-b, .crit-c, .crit-d, .crit-e { grid-column: 1 / -1; }
}

/* ---------- Zusammenarbeit (Reiter) ---------- */

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  margin-bottom: clamp(32px, 4vw, 48px);
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 250ms var(--ease), color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 8px -2px rgba(0, 0, 0, 0.12);
}
.no-js-tabs .segmented { display: none; }

@media (max-width: 560px) {
  .segmented { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
  .segmented button { padding: 9px 8px; }
}

.offer {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px clamp(40px, 6vw, 88px);
  align-items: start;
}
.offer[hidden] { display: none; }
.offer + .offer { margin-top: 72px; }
.js .offer + .offer { margin-top: 0; }
.offer .h3 { margin-bottom: 16px; }
.offer .closing {
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-weight: 500;
  color: var(--text);
  max-width: 44ch;
}
.offer .actions { margin-top: 28px; }

@media (prefers-reduced-motion: no-preference) {
  .offer.is-entering { animation: rise 600ms var(--ease) both; }
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
}
.checklist li {
  position: relative;
  padding-left: 32px;
  font-size: 1rem;
  line-height: 1.45;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
}
.checklist li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

@media (max-width: 860px) {
  .offer { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .checklist { grid-template-columns: 1fr; }
}

/* ---------- Ablauf ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}
.steps li { position: relative; padding-top: 36px; }
.steps li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--bg);
  z-index: 1;
}
.steps li::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 13px;
  right: -32px;
  height: 1px;
  background: var(--line-strong);
}
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.15rem; letter-spacing: -0.02em; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--text-2); font-size: 0.98rem; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps li { padding: 0 0 32px 36px; }
  .steps li::before { top: 5px; }
  .steps li::after { top: 20px; left: 6px; right: auto; bottom: 0; width: 1px; height: auto; }
}

/* ---------- Formulare ---------- */

.form-shell {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
.form-shell .section-head { position: sticky; top: calc(var(--nav-h) + 40px); margin-bottom: 0; }

@media (max-width: 900px) {
  .form-shell { grid-template-columns: 1fr; }
  .form-shell .section-head { position: static; }
}

.form {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 44px);
}

.form fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.form legend {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  padding: 0;
}
.form fieldset + fieldset { padding-top: 28px; border-top: 1px solid var(--line); margin-top: 16px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field-grid .span-2 { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
}

.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .field .label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
}
.field .optional { font-weight: 400; color: var(--text-2); }

.input, .select, .textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 150ms, box-shadow 150ms;
  -webkit-appearance: none;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-2); opacity: 0.85; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.textarea { min-height: 140px; resize: vertical; }

.select {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 52%, calc(100% - 15px) 52%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.field .hint { font-size: 0.8rem; color: var(--text-2); }
.field .error { font-size: 0.82rem; color: var(--danger); min-height: 0; }
.field .error:empty { display: none; }
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea { border-color: var(--danger); }

.check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 0.9rem;
  color: var(--text-2);
}
.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--accent-fill);
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.form-status:empty { display: none; }
.form-status.is-success { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--text); }
.form-status.is-error { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--text); }

.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Sterne-Bewertung ---------- */

.stars-input {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 4px;
}
.stars-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars-input label {
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  color: var(--line-strong);
  transition: color 150ms, transform 150ms var(--ease);
  padding: 2px;
}
.stars-input label:active { transform: scale(0.9); }
.stars-input input:checked ~ label,
.stars-input label:hover,
.stars-input label:hover ~ label { color: var(--star); }
.stars-input input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.stars { color: var(--star); letter-spacing: 2px; font-size: 1rem; }
.stars .off { color: var(--line-strong); }

/* ---------- Bewertungen ---------- */

.rating-summary {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-top: 28px;
}
.rating-summary .display-num { margin: 0; }

/* Laufband ("Filmrolle"): läuft endlos von rechts nach links */
.reel {
  --reel-gap: 24px;
  overflow: hidden;
  /* Platz für den Kartenschatten, sonst würde er abgeschnitten */
  padding-block: 16px 40px;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.reel:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.reel-track {
  display: flex;
  gap: var(--reel-gap);
  width: max-content;
}
.reel-group {
  display: flex;
  gap: var(--reel-gap);
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reel.is-running .reel-track {
    animation: reel var(--reel-duration, 40s) linear infinite;
    will-change: transform;
  }
  .reel:hover .reel-track,
  .reel:focus-within .reel-track,
  .reel.is-paused .reel-track { animation-play-state: paused; }
}
@keyframes reel {
  to { transform: translateX(var(--reel-distance, -50%)); }
}

/* Ohne Animation: wischbare Reihe */
@media (prefers-reduced-motion: reduce) {
  .reel { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-mask-image: none; mask-image: none; }
  .reel .review { scroll-snap-align: start; }
}

.reel-controls { display: flex; justify-content: flex-end; margin-top: -16px; }
.reel-toggle {
  font: inherit;
  font-size: 0.85rem;
  color: var(--text-2);
  background: none;
  border: 0;
  padding: 6px 2px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reel-toggle:hover { color: var(--text); }

.review {
  flex: none;
  width: min(360px, 78vw);
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.review blockquote {
  margin: 14px 0 18px;
  font-size: 1.05rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review figcaption { margin-top: auto; font-size: 0.88rem; color: var(--text-2); }
.review figcaption strong { color: var(--text); font-weight: 600; display: block; }

/* ---------- Rechtstexte ---------- */

.legal { max-width: 760px; }
.legal h1 { margin-bottom: 12px; }
.legal h2 { font-size: 1.35rem; letter-spacing: -0.02em; margin: 48px 0 12px; }
.legal h3 { font-size: 1.05rem; margin: 28px 0 8px; }
.legal p, .legal li { color: var(--text-2); }
.legal ul { padding-left: 1.2em; }
.legal address { font-style: normal; color: var(--text-2); }
.legal .notice {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.92rem;
  color: var(--text);
  margin: 24px 0 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding-block: 48px 40px;
  font-size: 0.85rem;
  color: var(--text-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}
.footer-grid h2 { font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--text-2); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* ---------- Einblenden beim Scrollen ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 900ms var(--ease), transform 900ms var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  .hero-copy > * { animation: rise 900ms var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .hero-copy > :nth-child(4) { animation-delay: 240ms; }
  .hero .media { animation: settle 1200ms var(--ease) 120ms both; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes settle {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: none; }
}

/* ---------- Logo (Dach-M mit Rundbogenfenster) ---------- */
img.brand-mark { width: 40px; height: 38px; border-radius: 0; background: none; box-shadow: none; object-fit: contain; display: block; }
.site-footer img.brand-mark { background: none; width: 46px; height: 44px; }
