/* ==========================================================================
   SM IMMOBILIE ANBIETEN — Design Tokens (basiert auf SM Investorenkreis)
   ========================================================================== */

@font-face {
  font-family: "Staff Wide";
  src: url("assets/fonts/StaffWide-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Staff Wide";
  src: url("assets/fonts/StaffWide-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Staff Wide";
  src: url("assets/fonts/StaffWide-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Staff Wide";
  src: url("assets/fonts/StaffWide-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colors */
  --sm-charcoal: #161B1E;
  --sm-blue: #1F4760;
  --sm-teal: #4D7575;
  --sm-red: #D23745;
  --sm-light-blue: #CAD3DA;
  --sm-grey: #8C8D92;
  --sm-white: #FFFFFF;
  --sm-off-white: #F6F6F4;

  /* Semantic */
  --color-bg: var(--sm-white);
  --color-bg-muted: var(--sm-off-white);
  --color-ink: var(--sm-charcoal);
  --color-ink-soft: #4A4F53;
  --color-line: #DFE2E4;
  --color-line-strong: #C7CBCE;
  --color-accent: var(--sm-red);

  /* Type */
  --font-display: "Staff Wide", "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  /* Layout */
  --shell-max: 1320px;
  --shell-narrow-max: 960px;
  --shell-pad: 1.5rem;
  --radius-sm: 2px;
  --radius-md: 3px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 160ms;
  --dur-med: 320ms;

  --header-h: 74px;
  --header-pad-x: clamp(20px, 1.5vw, 32px);
}

@media (min-width: 768px) {
  :root { --shell-pad: 2.5rem; }
}
@media (min-width: 1280px) {
  :root { --shell-pad: 4rem; }
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, ol, ul, fieldset, legend { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
fieldset { border: 0; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--sm-charcoal);
  color: var(--sm-white);
  padding: 0.75rem 1.25rem;
  z-index: 999;
}
.skip-link:focus {
  left: var(--space-2);
  top: var(--space-2);
}

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

:focus-visible {
  outline: 2px solid var(--sm-red);
  outline-offset: 3px;
}

[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.shell {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}
.shell-narrow { max-width: var(--shell-narrow-max); }

/* ==========================================================================
   Type
   ========================================================================== */

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sm-red);
  margin-bottom: var(--space-2);
}
.eyebrow-on-dark { color: var(--sm-red); }

.section-title {
  font-weight: 600;
  font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 26ch;
}

.section-lead {
  margin-top: var(--space-3);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  color: var(--color-ink-soft);
  max-width: 58ch;
  line-height: 1.65;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  padding: 0.9rem 1.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background-color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--sm-charcoal);
  color: var(--sm-white);
  border-color: var(--sm-charcoal);
}
.btn-primary:hover { background: var(--sm-blue); border-color: var(--sm-blue); }

.btn-primary-inverse {
  background: var(--sm-white);
  color: var(--sm-charcoal);
  border-color: var(--sm-white);
}
.btn-primary-inverse:hover {
  background: transparent;
  color: var(--sm-white);
  border-color: var(--sm-white);
}

.btn-ghost {
  background: transparent;
  color: var(--sm-charcoal);
  border-color: var(--color-line-strong);
}
.btn-ghost:hover { border-color: var(--sm-charcoal); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.4);
}

.header-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--header-pad-x);
}

.header-logo { flex: 0 0 auto; min-width: 0; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-left: auto;
  margin-right: var(--space-2);
}
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 1.25rem;
  border: 1px solid var(--sm-white);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}
.header-cta-primary { background: var(--sm-white); color: var(--sm-charcoal); }
.header-cta-primary:hover { background: transparent; color: var(--sm-white); }

.header-logo img { height: 20px; width: auto; }

/* Narrow screens: one row (logo, CTA, menu icon) with a compact CTA */
@media (max-width: 599px) {
  .header-logo img { height: 16px; }
  .header-actions { margin-right: 0.5rem; }
  .header-cta { height: 38px; padding: 0 1rem; font-size: 0.8125rem; }
}
@media (max-width: 419px) {
  .header-logo img { height: 13px; }
  .header-cta { padding: 0 0.8rem; }
}
@media (max-width: 399px) {
  :root { --header-pad-x: 14px; }
  .header-logo img { height: 12px; }
  .header-actions { margin-right: 0.25rem; }
  .header-cta { height: 36px; padding: 0 0.7rem; font-size: 0.75rem; }
}
/* Very narrow phones: CTA moves to a second row, full width */
@media (max-width: 359px) {
  :root { --header-h: 116px; }
  .header-inner {
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding-block: 15px 12px;
  }
  .header-logo { grid-column: 1; grid-row: 1; }
  .nav-toggle { grid-column: 2; grid-row: 1; }
  .header-actions { grid-column: 1 / -1; grid-row: 2; margin: 6px 0 0; }
  .header-cta { width: 100%; height: 42px; font-size: 0.875rem; }
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-right: -12px;
}
/* Icon: three bars → left-pointing arrow. The middle bar is the shaft; the
   outer bars pivot around a point just inside the shaft's left end (the tip)
   and rotate ±45°, so all three bars keep the same length as in the reference. */
.nav-toggle-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 16px;
}
.nav-toggle-bar {
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--sm-white);
  transform-origin: 23% 50%;
  transition: transform var(--dur-med) var(--ease);
}
.nav-toggle-bar:nth-child(1) { top: 0; }
.nav-toggle-bar:nth-child(2) { top: 7px; }
.nav-toggle-bar:nth-child(3) { top: 14px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(45deg); }

/* Nav overlay panel — triggered by the hamburger at every breakpoint.
   The persistent header (logo + hamburger-turned-X) stays on top via
   z-index and remains the visual "topbar" while this is open. */
.header-nav {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  background: var(--sm-charcoal);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--header-h) + 1rem) var(--header-pad-x) 2.5rem;
  transition: opacity 260ms var(--ease), visibility 0s linear 260ms;
}
.header-nav.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 260ms var(--ease);
}

/* margin: auto zentriert, solange Platz ist, und lässt bei geringer Höhe Scrollen von oben zu */
.header-nav-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(0.875rem, 2.2vh, 1.5rem);
  margin: auto;
}
.header-nav-link {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.375rem);
  font-weight: 500;
  letter-spacing: 0.025em;
  color: var(--sm-white);
  transition: color var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.header-nav-link:hover,
.header-nav-link:focus-visible {
  opacity: 0.75;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(105deg, rgba(22, 27, 30, 0.58) 0%, rgba(22, 27, 30, 0.4) 30%, rgba(22, 27, 30, 0.1) 55%, rgba(22, 27, 30, 0) 100%),
    url("assets/img/hero-2400.jpg");
  background-size: cover;
  background-position: 85% 100%;
  background-repeat: no-repeat;
}

.hero-inner {
  max-width: 490px;
  margin-left: clamp(64px, 13vw, 300px);
  margin-right: auto;
  padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  padding-right: var(--shell-pad);
}

.hero-title {
  font-weight: 600;
  font-size: clamp(2rem, 1.5rem + 2.6vw, 3.25rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--sm-white);
  margin-bottom: var(--space-4);
}

.hero-subline {
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: 48ch;
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.hero-ctas {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.hero-cta-primary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}

@media (max-width: 1400px) {
  .hero-visual { background-image: linear-gradient(105deg, rgba(22, 27, 30, 0.58) 0%, rgba(22, 27, 30, 0.4) 30%, rgba(22, 27, 30, 0.1) 55%, rgba(22, 27, 30, 0) 100%), url("assets/img/hero-1800.jpg"); }
}
@media (max-width: 640px) {
  .hero { min-height: 100vh; min-height: 100dvh; align-items: flex-start; }
  .hero-visual {
    background-position: 62% bottom;
    background-image:
      linear-gradient(180deg, rgba(22, 27, 30, 0.66) 0%, rgba(22, 27, 30, 0.52) 48%, rgba(22, 27, 30, 0.12) 74%, rgba(22, 27, 30, 0) 100%),
      url("assets/img/hero-mobile-1200.jpg");
  }
  .hero-inner {
    max-width: none;
    margin-left: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: calc(var(--header-h) + 1.5rem);
  }
  .hero-title { font-size: clamp(1.75rem, 1.5rem + 2vw, 2.25rem); margin-bottom: var(--space-3); }
  .hero-subline { margin-bottom: var(--space-4); }
}

/* ==========================================================================
   Sections (generic)
   ========================================================================== */

.section {
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 7rem);
}
.section-muted { background: var(--color-bg-muted); }

.section-head { max-width: 720px; }
.section-head-center { max-width: 640px; margin-inline: auto; text-align: center; }
.section-head-center .section-title { margin-inline: auto; text-wrap: balance; }

/* ==========================================================================
   USP grid
   ========================================================================== */

.usp-grid {
  margin-top: var(--space-6);
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-line);
}
.usp-item {
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-line);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--space-3);
  align-items: baseline;
}
.usp-index {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--sm-red);
  letter-spacing: 0.05em;
}
.usp-title {
  grid-column: 2;
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.usp-text {
  grid-column: 2;
  color: var(--color-ink-soft);
  max-width: 44ch;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .usp-grid {
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--color-line);
    border-bottom: 1px solid var(--color-line);
  }
  .usp-item {
    border-bottom: 0;
    border-right: 1px solid var(--color-line);
    padding: var(--space-4) var(--space-4) var(--space-2) 0;
    display: block;
  }
  .usp-item:last-child { border-right: 0; padding-left: var(--space-4); }
  .usp-item:nth-child(2) { padding-inline: var(--space-4); }
  .usp-title, .usp-text { grid-column: auto; }
}

/* ==========================================================================
   Audience image areas (two full-bleed image sections, modelled on the hero)
   ========================================================================== */

.persp {
  scroll-margin-top: 0;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  color: var(--sm-white);
  background: var(--sm-charcoal);
}
.persp-media, .persp-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.persp-media { z-index: -2; display: block; }
.persp-privat .persp-media img { object-position: 47% 20%; }
.persp-makler .persp-media img { object-position: 64% 30%; }
/* Schmale Smartphones: Makler-Bild breiter als der Viewport, damit beide Personen sichtbar bleiben */
@media (max-width: 600px) {
  .persp-makler .persp-media img { inset: 0 auto auto -78%; width: 222%; max-width: none; height: auto; object-fit: fill; -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, #000 72%, transparent 100%); }
}

/* Overlay: strong on the text side, fading out over the motif */
.persp::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(22, 27, 30, 0.92) 0%, rgba(22, 27, 30, 0.78) 38%, rgba(31, 71, 96, 0.2) 70%, rgba(22, 27, 30, 0.12) 100%);
}

.persp-inner {
  width: 100%;
  padding: calc(var(--header-h) + 1.5rem) 1.5rem 2.5rem;
}
.persp-title {
  font-weight: 600;
  font-size: clamp(2rem, 1.5rem + 2.6vw, 3.25rem);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}
.persp-text {
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  max-width: 48ch;
  margin-bottom: var(--space-4);
}
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .persp { align-items: center; }
  .persp-left::before {
    background: linear-gradient(90deg, rgba(22, 27, 30, 0.88) 0%, rgba(22, 27, 30, 0.8) 32%, rgba(31, 71, 96, 0.5) 50%, rgba(22, 27, 30, 0.06) 72%, rgba(22, 27, 30, 0) 100%);
  }
  .persp-right::before {
    background: linear-gradient(270deg, rgba(22, 27, 30, 0.88) 0%, rgba(22, 27, 30, 0.8) 32%, rgba(31, 71, 96, 0.5) 50%, rgba(22, 27, 30, 0.06) 72%, rgba(22, 27, 30, 0) 100%);
  }
  .persp-inner {
    max-width: 490px;
    padding: calc(var(--header-h) + clamp(1rem, 3vh, 3rem)) var(--shell-pad) clamp(2rem, 5vh, 4rem);
  }
  .persp-left .persp-inner { max-width: 420px; margin-left: clamp(40px, 8vw, 240px); margin-right: auto; padding-inline: 0 var(--shell-pad); }
  .persp-right .persp-inner { max-width: 440px; margin-left: auto; margin-right: clamp(32px, 4vw, 150px); padding-inline: var(--shell-pad) 0; }
  .persp-privat .persp-media img { object-position: 0% 40%; }
  .persp-makler .persp-media img { object-position: 40% 30%; }
}

/* ==========================================================================
   Ablauf steps
   ========================================================================== */

.steps-list {
  margin-top: var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: relative;
}
.steps-item {
  position: relative;
  padding: var(--space-4) 0 var(--space-4) var(--space-5);
  border-left: 1px solid var(--color-line-strong);
}
.steps-item::before {
  content: "";
  position: absolute;
  left: -4.5px; top: var(--space-4);
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sm-red);
}
.steps-index {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sm-grey);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.steps-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.steps-text {
  color: var(--color-ink-soft);
  max-width: 46ch;
  line-height: 1.6;
}

@media (min-width: 900px) {
  .steps-list {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }
  .steps-item {
    padding: var(--space-4) var(--space-3) 0 0;
    border-left: 0;
    border-top: 1px solid var(--color-line-strong);
  }
  .steps-item::before { left: 0; top: -4.5px; }
}

/* ==========================================================================
   Form section
   ========================================================================== */

.form-section { background: var(--color-bg-muted); }

.form-card {
  margin-top: var(--space-6);
  background: var(--sm-white);
  border: 1px solid var(--color-line-strong);
  padding: var(--space-4);
}
@media (min-width: 640px) {
  .form-card { padding: var(--space-6); }
}

.form-progress { margin-bottom: var(--space-4); }
.form-progress-text {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sm-charcoal);
  letter-spacing: 0.02em;
  margin-bottom: 0.65rem;
}
.form-progress-text span:first-child { color: var(--sm-red); }
.form-progress-bar {
  height: 2px;
  background: var(--color-line);
}
.form-progress-bar span {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--sm-red);
  transition: width var(--dur-med) var(--ease);
}

.form-step + .form-step { margin-top: var(--space-5); }
.js .form-step { display: none; margin-top: 0; }
.js .form-step.is-active { display: block; animation: step-in var(--dur-med) var(--ease); }
.form-progress { display: none; }
.js .form-progress { display: block; }
:root:not(.js) .js-only { display: none; }

@keyframes step-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step-title {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.form-step-sub {
  color: var(--color-ink-soft);
  margin-bottom: var(--space-4);
}

.form-group { margin-top: var(--space-4); }
.form-group:first-child { margin-top: 0; }
.form-group-label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: var(--space-2);
}
.form-group-highlight {
  background: var(--color-bg-muted);
  border: 1px solid var(--color-line);
  padding: var(--space-3);
  margin-top: var(--space-5);
}

.option-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.6rem;
  margin-top: var(--space-3);
}
.option-grid-compact { gap: 0.5rem; }

@media (min-width: 560px) {
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .option-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.option-card {
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: manual;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.option-card input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.option-card::before {
  content: "";
  flex: none;
  width: 16px; height: 16px;
  border: 1.5px solid var(--color-line-strong);
  border-radius: 50%;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.option-card-check::before { border-radius: 3px; }

.option-card:hover { border-color: var(--sm-grey); }
.option-card:has(input:checked) {
  border-color: var(--sm-charcoal);
  background: var(--color-bg-muted);
}
.option-card:has(input:checked)::before {
  border-color: var(--sm-red);
  background: var(--sm-red);
  box-shadow: inset 0 0 0 3px var(--sm-white);
}
.option-card:has(input:focus-visible) {
  outline: 2px solid var(--sm-red);
  outline-offset: 2px;
}

.option-card-inline { max-width: 260px; margin-bottom: var(--space-2); }

.text-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.text-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-soft);
}
.text-field .optional { font-weight: 400; color: #6b7075; }
.req { color: var(--sm-red); }
.text-field input, .text-field select, .text-field textarea {
  width: 100%;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  background: var(--sm-white);
  font-size: 1rem;
  transition: border-color var(--dur-fast) var(--ease);
}
.text-field textarea { resize: vertical; min-height: 6rem; line-height: 1.5; }
.text-field input[type="file"] { padding: 0.65rem 0.75rem; font-size: 0.9375rem; }
.text-field input:focus-visible, .text-field textarea:focus-visible {
  outline: none;
  border-color: var(--sm-charcoal);
  box-shadow: 0 0 0 3px rgba(31, 71, 96, 0.12);
}
.text-field.has-error input, .text-field.has-error textarea { border-color: var(--sm-red); }
.field-hint { font-size: 0.8125rem; color: #5d6266; }
.text-field[hidden] { display: none; }

.text-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.text-field-full { grid-column: 1 / -1; }

@media (min-width: 640px) {
  .text-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: var(--space-3);
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-ink-soft);
}
.checkbox-field a { color: var(--sm-charcoal); border-bottom: 1px solid var(--color-line-strong); }
.checkbox-field a:hover { border-color: var(--sm-red); }
.checkbox-field input {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--sm-charcoal);
}
.checkbox-field-muted { color: var(--sm-grey); }

.form-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
}
.form-nav-single { justify-content: flex-end; border-top: 0; margin-top: var(--space-4); }
.form-nav-group { display: flex; gap: var(--space-2); margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.btn-text { background: transparent; color: var(--sm-charcoal); border-color: transparent; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--color-line-strong); }
.btn-text:hover { text-decoration-color: var(--sm-red); }

.form-error {
  color: var(--sm-red);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-top: var(--space-2);
  min-height: 1em;
}
.form-error:empty { display: none; }
.form-failure { margin-top: var(--space-3); padding: var(--space-3); border-left: 3px solid var(--sm-red); background: var(--color-bg-muted); font-size: 0.9375rem; line-height: 1.55; }
.form-failure a { border-bottom: 1px solid var(--color-line-strong); }
.form-failure[hidden] { display: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.form-fineprint {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--sm-grey);
  margin-top: var(--space-3);
}

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

.form-success {
  text-align: center;
  padding: var(--space-6) var(--space-3);
}
.form-success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--sm-red);
  margin-bottom: var(--space-3);
}
.form-success-mark::after {
  content: "";
  width: 16px; height: 9px;
  border-left: 2px solid var(--sm-red);
  border-bottom: 2px solid var(--sm-red);
  transform: rotate(-45deg) translate(1px, -1px);
}
.form-success h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.form-success p {
  color: var(--color-ink-soft);
  margin-bottom: var(--space-3);
}
.form-success .header-link-subtle, .form-success .text-link {
  display: inline-block;
  font-size: 0.9375rem;
}

/* ==========================================================================
   Trust section
   ========================================================================== */

.trust-section { border-top: 1px solid var(--color-line); }
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.trust-slogan { height: 40px; width: auto; margin-bottom: var(--space-4); }
.trust-text {
  font-size: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  line-height: 1.55;
  color: var(--color-ink-soft);
  max-width: 52ch;
}
.trust-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line);
}
.trust-contact-photo {
  width: min(100%, 228px);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.trust-contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.trust-contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sm-grey);
  margin-bottom: 0.4rem;
}
.trust-contact-name { font-size: 1.125rem; font-weight: 600; }
.trust-contact-role { color: var(--color-ink-soft); font-size: 0.9375rem; }

@media (min-width: 860px) {
  .trust-grid { grid-template-columns: 1.6fr 1fr; align-items: end; }
  .trust-contact { border-top: 0; padding-top: 0; border-left: 1px solid var(--color-line); padding-left: var(--space-5); }
}

/* ==========================================================================
   Final CTA
   ========================================================================== */

.final-cta {
  background: var(--sm-charcoal);
  color: var(--sm-white);
  text-align: center;
}
.final-cta-inner { max-width: 640px; }
.final-cta-title {
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: var(--space-3);
}
.final-cta-text {
  color: var(--sm-light-blue);
  font-size: 1.0625rem;
  margin-bottom: var(--space-4);
}

/* ==========================================================================
   Footer
   ========================================================================== */

/* Contact strip — light, matches smgruppe.de's location/contact band */
.footer-contact {
  background: var(--sm-light-blue);
  padding-block: var(--space-6);
}
.footer-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.footer-contact-col { color: var(--sm-charcoal); }
.footer-contact-photo {
  width: min(100%, 320px);
  object-fit: cover;
  margin-bottom: var(--space-3);
}
.footer-contact-photo-circle {
  width: min(100%, 240px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}
.footer-contact-heading {
  display: block;
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.footer-contact-text {
  font-size: 0.9375rem;
  color: var(--color-ink-soft);
  line-height: 1.6;
  margin-top: 0.4rem;
}
.footer-contact-text .contact-label { font-weight: 700; }
.footer-contact-text a { font-weight: 400; color: var(--sm-charcoal); border-bottom: 1px solid var(--color-line-strong); }
.footer-contact-text a:hover { border-color: var(--sm-red); }
.footer-contact-col-team .footer-newsletter-btn { margin-top: var(--space-2); }

@media (min-width: 860px) {
  .footer-contact-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Brand / navigation strip — dark grey, matches smgruppe.de's footer band */
.footer-main {
  background: var(--sm-grey);
  color: var(--sm-white);
  padding-block: var(--space-6) var(--space-4);
}
.footer-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
.footer-brand img { height: 20px; margin-bottom: var(--space-4); }
.footer-newsletter-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.footer-newsletter-text {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 40ch;
  line-height: 1.55;
  margin-bottom: var(--space-3);
}
.footer-newsletter-btn {
  display: inline-block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--sm-white);
  background: var(--sm-blue);
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast) var(--ease);
}
.footer-newsletter-btn:hover { background: var(--sm-charcoal); }

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 1.0625rem;
  font-weight: 300;
}
.footer-nav-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.footer-nav a { color: var(--sm-white); border-bottom: 1px solid transparent; width: fit-content; }
.footer-nav a:hover { border-color: var(--sm-red); }

@media (min-width: 860px) {
  .footer-main-grid { grid-template-columns: 1.4fr 1fr; }
}

.footer-credit {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.75);
}
.footer-credit a { color: rgba(255, 255, 255, 0.9); border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
.footer-credit a:hover { border-color: var(--sm-red); }

@media (min-width: 640px) {
  .footer-credit { flex-direction: row; justify-content: space-between; }
}

/* ==========================================================================
   Page-by-page scrolling
   Native CSS scroll-snap on the root scroller. Only enabled where a section
   can reasonably fill one screen (large viewports, fine pointer). Sections
   taller than the viewport are larger than the snapport, so browsers let
   users scroll freely through them. Everywhere else: normal scrolling.
   ========================================================================== */

@media (min-width: 1024px) and (min-height: 700px) and (pointer: fine) {
  html { scroll-snap-type: y mandatory; }

  .snap {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    scroll-margin-top: 0;
  }
  .snap-end { scroll-snap-align: end; }

  .section.snap {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--header-h) + clamp(1.5rem, 3vh, 3rem));
    padding-bottom: clamp(2rem, 5vh, 4rem);
  }
  .section.snap > .shell { width: 100%; }
  .persp.snap { min-height: 100vh; min-height: 100svh; }
  .hero.snap { min-height: 100vh; min-height: 100svh; }
  .hero-inner {
    padding-top: calc(var(--header-h) + clamp(1rem, 3vh, 3rem));
    padding-bottom: clamp(1.5rem, 4vh, 3rem);
  }
  .hero-ctas { margin-bottom: 0; }

  /* Tighter vertical rhythm so content fits one view */
  .snap .usp-grid,
  .snap .steps-list { margin-top: clamp(1.5rem, 5vh, 4rem); }
  .snap .form-card { margin-top: clamp(1.5rem, 4vh, 3rem); }
  .trust-section.snap .trust-grid { align-items: center; }
}

/* Small laptops: compact so one-screen sections stay within one view */
@media (min-width: 1024px) and (min-height: 700px) and (max-height: 820px) and (pointer: fine) {
  .hero-title { font-size: clamp(1.875rem, 1.2rem + 2vw, 2.5rem); margin-bottom: var(--space-3); }
  .hero-subline { margin-bottom: var(--space-3); }
  .snap .form-card { padding: var(--space-3) var(--space-5) var(--space-4); }
  .snap .form-progress { margin-bottom: var(--space-3); }
  .form-section .section-title { font-size: 2rem; }
  .form-section .eyebrow { display: none; }
  .form-section .text-field textarea { min-height: 4.5rem; }
  .form-section .section-lead { display: none; }
  .form-section .form-step-title { font-size: 1.375rem; }
  .form-section .form-step-sub { margin-bottom: var(--space-2); }
  .form-section .option-grid { margin-top: var(--space-2); }
  .form-section .option-card { padding: 0.7rem 0.9rem; }
  .form-section .text-grid { margin-top: var(--space-2); gap: var(--space-2); }
  .form-section .form-nav { margin-top: var(--space-3); padding-top: var(--space-3); }
  .form-section .form-fineprint { margin-top: var(--space-2); }
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 640ms var(--ease), transform 640ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Danke-Seite (Fallback ohne JavaScript) */
.thanks { min-height: 100vh; display: grid; place-items: center; padding: var(--space-5) var(--shell-pad); text-align: center; }

.form-section .section-title { max-width: none; }
.form-section .section-head-center { max-width: 900px; }
.form-step-title:focus { outline: none; }
@media (max-width: 360px) {
  .persp-title { font-size: 1.75rem; }
  .hero-title { font-size: 1.625rem; }
}

/* Formular: Inhalte bleiben innerhalb der Box */
.form-card, #objekt-form, .form-step, .form-card .option-grid, .form-card .text-grid { min-width: 0; max-width: 100%; }
.form-card .text-field, .form-card .option-card { min-width: 0; }
.form-card .option-card span { min-width: 0; overflow-wrap: break-word; }
@media (min-width: 480px) and (max-width: 559px) { .form-card .option-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 479px) { .form-card .option-grid-4 { grid-template-columns: minmax(0, 1fr); } }
.form-nav { flex-wrap: wrap; }
.form-nav > .btn-primary, .form-nav-group { margin-left: auto; }
@media (max-width: 420px) {
  .form-nav .btn { padding-inline: 1.1rem; }
  .form-nav, .form-nav-group { gap: 0.5rem; }
}
@media (max-width: 420px) {
  .form-nav .btn { white-space: normal; text-align: center; }
  .form-nav > .btn[type="submit"] { flex: 1 1 100%; }
}
.checkbox-field span { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .form-card .option-card { padding: 0.8rem 0.7rem; gap: 0.45rem; font-size: 0.875rem; } .form-card .option-card::before { width: 14px; height: 14px; } }

/* Menü: kein roter Strich; Tastaturfokus als weißer Rahmen */
.header-nav-link { text-decoration: none; }
.header-nav-link::before, .header-nav-link::after { content: none; }
.header-nav-link:focus-visible { outline: 2px solid var(--sm-white); outline-offset: 6px; border-radius: 2px; }
