/* ─────────────────────────────────────────────────────────────────────────
   Holiday Club — Immobilien Verein Landing
   Seitenspezifische Styles auf Basis des Modernist Design Systems.
   Alle Grössen sind fluid (clamp/vw), damit das Layout von 320px bis 4K
   ohne Sprünge und ohne horizontales Scrollen funktioniert.
   ───────────────────────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; text-wrap: pretty; background: var(--color-bg); color: var(--color-text); }
input, textarea, select { max-width: 100%; box-sizing: border-box; }
.btn, .input { min-height: 44px; }
a.btn { display: inline-flex; align-items: center; }
img { max-width: 100%; }
a { color: var(--color-accent-700); }
a:hover { color: var(--color-accent); }

.tl-rail::-webkit-scrollbar { height: 6px; }
.tl-rail::-webkit-scrollbar-thumb { background: var(--color-divider); }

@keyframes heroIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

[hidden] { display: none !important; }

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

/* — Grundraster ————————————————————————————————————————————————— */
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 48px); }
.rule { height: 2px; border: 0; margin: 0; background: var(--color-divider); }
.kicker {
  display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-accent-700); margin-bottom: 20px;
}

/* — Navigation ————————————————————————————————————————————————— */
.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-divider);
  padding-inline: clamp(16px, 5vw, 48px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.site-nav .btn-primary { text-decoration: none; white-space: nowrap; color: #ffffff; }

/* — Hero ——————————————————————————————————————————————————————— */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(36px, 6vw, 72px); }
.hero-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(36px, 10vw, 92px); line-height: 1.04; letter-spacing: -0.02em;
  margin: 0; overflow-wrap: break-word;
  animation: heroIn 0.9s ease both;
}
.hero-lead {
  font-size: clamp(16px, 2.4vw, 19px); line-height: 1.65; max-width: 56ch; margin: 24px 0 0;
  animation: heroIn 0.9s ease 0.15s both;
}
.hero-actions {
  display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: 28px;
  animation: heroIn 0.9s ease 0.3s both;
}
.hero-actions .btn { text-decoration: none; white-space: nowrap; }

.hero-figure { margin: 0 0 clamp(40px, 7vw, 80px); animation: heroIn 1s ease 0.4s both; }
.hero-figure img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.hero-figure figcaption {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-accent-700); margin-top: 10px;
}

/* — Vorteile (nummerierte Liste) ——————————————————————————————— */
.vorteile { padding: clamp(36px, 6vw, 72px) 0; }
.vorteil {
  display: grid;
  grid-template-columns: clamp(32px, 8vw, 48px) minmax(0, 1fr);
  gap: 12px clamp(12px, 4vw, 48px);
  align-items: baseline;
  padding: 22px 0;
  border-top: 2px solid var(--color-divider);
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.8s ease 0s, transform 0.8s ease 0s;
}
.vorteil-num {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 15px; margin: 0; font-feature-settings: 'tnum' 1;
}
.vorteil h2 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(20px, 3.4vw, 26px); line-height: 1.2; letter-spacing: -0.01em; margin: 0;
}
.vorteil p {
  font-size: 15.5px; line-height: 1.7; margin: 8px 0 0; max-width: 58ch;
  color: var(--color-neutral-700);
}

/* — Vollflächiges Banner mit Schreibmaschinen-Effekt ————————————— */
.banner { position: relative; overflow: hidden; }
.banner-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(1) contrast(1.05);
}
.banner-veil { position: absolute; inset: 0; background: rgba(24, 21, 20, 0.62); }
.banner-inner {
  position: relative; max-width: 1100px; margin: 0 auto;
  padding: clamp(72px, 14vw, 160px) clamp(16px, 5vw, 48px);
}
.banner-text {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(26px, 5.4vw, 52px); line-height: 1.15; letter-spacing: -0.015em;
  max-width: 24ch; margin: 0;
}
.banner-sizer { visibility: hidden; }
.banner-typed {
  position: absolute;
  inset: clamp(72px, 14vw, 160px) clamp(16px, 5vw, 48px);
  color: #ffffff;
}
.caret {
  display: inline-block; width: 0.55ch; margin-left: 2px;
  background: #ffffff; opacity: 0; animation: blink 1s step-end infinite;
}

/* — Immobilie / Rundgang ————————————————————————————————————————— */
.immo { padding: clamp(44px, 7vw, 88px) 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.h-lg {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(28px, 5.4vw, 44px); line-height: 1.1; letter-spacing: -0.015em; margin: 0;
  /* greift nur, wenn ein einzelnes Wort breiter als die Spalte ist —
     lange deutsche Komposita wie „Geschäftsbedingungen" auf 320px */
  overflow-wrap: break-word;
}
.h-lg.is-narrow { max-width: 22ch; }
.body-copy {
  font-size: 15.5px; line-height: 1.7; margin: 16px 0 0; max-width: 58ch;
  color: var(--color-neutral-700);
}

.tl-rail {
  display: flex; gap: clamp(10px, 2vw, 20px);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 10px; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tl-rail.is-spaced { margin-top: 28px; }
.tl-card { margin: 0; flex: 0 0 auto; scroll-snap-align: start; }
.tl-card .shot {
  display: block; width: 100%; height: auto;
  object-fit: cover; object-position: center;
  /* bleibt sichtbar, solange das Bild noch lädt oder fehlt */
  background-color: var(--color-neutral-200);
}
.tl-card .shot.is-missing { background-color: var(--color-neutral-200); }
.rail-rundgang .tl-card { width: clamp(240px, 74vw, 400px); }
.rail-rundgang .shot { aspect-ratio: 4 / 5; }
.rail-rundgang figcaption { display: flex; gap: 12px; align-items: baseline; margin-top: 10px; }
.rail-rundgang .tl-num {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 13px; color: var(--color-accent); font-feature-settings: 'tnum' 1;
}
.rail-rundgang .tl-label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

.rail-sights .tl-card { width: clamp(180px, 46vw, 240px); }
.rail-sights .shot { aspect-ratio: 3 / 4; }
.rail-sights figcaption {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 15px; margin-top: 10px; color: var(--color-text);
}

.rail-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-top: 14px;
}
.rail-hint {
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-neutral-700); margin: 0;
}
.rail-btns { display: flex; gap: 8px; }

.immo-address { font-size: 15px; line-height: 1.6; color: var(--color-neutral-700); margin: 10px 0 0; }
.map {
  width: 100%; height: clamp(260px, 50vw, 420px); margin-top: 20px;
  border: 2px solid var(--color-divider); z-index: 0;
}

/* — Vorteile kurz ——————————————————————————————————————————————— */
.perks { padding: clamp(44px, 7vw, 88px) 0; border-top: 2px solid var(--color-divider); }
.perks-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 3vw, 32px);
}
.perk { border-top: 2px solid var(--color-text); padding-top: 16px; min-width: 0; }
.perk-num {
  display: block; font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 15px; color: var(--color-accent); font-feature-settings: 'tnum' 1; margin-bottom: 10px;
}
.perk p {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(18px, 2.6vw, 22px); line-height: 1.3; margin: 0;
}

.sights { padding: 0 0 clamp(44px, 7vw, 88px); }

/* — Beitritt ——————————————————————————————————————————————————— */
.join { padding: clamp(44px, 7vw, 88px) 0 clamp(56px, 8vw, 110px); }
/* Zwei Felder nebeneinander, zwei Reihen — auf jeder Bildschirmbreite. */
.steps {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  margin: 28px 0 0; padding: 0; list-style: none;
  border: 2px solid var(--color-divider); overflow: hidden;
}
.steps > li::marker { content: ''; }
.step {
  min-width: 0;
  /* nowrap: die Ziffer bleibt neben der Beschriftung stehen, statt bei
     langen Wörtern verwaist auf eine eigene Zeile zu rutschen. Umbrochen
     wird nur innerhalb der Beschriftung. */
  display: flex; flex-wrap: nowrap; gap: 10px;
  align-items: baseline;
  padding: 12px clamp(10px, 3vw, 16px);
  margin: -1px; border: 1px solid var(--color-divider);
  background: transparent; color: var(--color-text);
  transition: background 0.3s ease, color 0.3s ease;
}
.step.is-active { background: var(--color-accent); color: var(--color-bg); }
.step-num {
  flex: 0 0 auto;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; font-feature-settings: 'tnum' 1;
}
.step-label {
  flex: 1 1 auto; min-width: 0;
  font-size: clamp(11px, 2.8vw, 13px); letter-spacing: 0.08em; text-transform: uppercase;
  line-height: 1.35; hyphens: auto; overflow-wrap: break-word;
}

.form-pane { max-width: 560px; margin-top: 32px; display: grid; gap: 20px; }
.row-plz { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr; gap: 12px; }
.row-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.row-auto-sm { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.check {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  font-size: 14.5px; line-height: 1.6;
}
.check input {
  width: 20px; height: 20px; margin: 2px 0 0;
  accent-color: var(--color-accent); flex: 0 0 auto;
}
.form-err { font-size: 14px; margin: 0; color: var(--color-accent-700); }
.form-note { display: block; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); }
.form-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.form-actions .btn { white-space: nowrap; }

/* — Stripe Payment Gateway ——————————————————————————————————————— */
.pay-box { border: 2px solid var(--color-divider); padding: clamp(14px, 4vw, 20px); display: grid; gap: 16px; }
.pay-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pay-brand { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 15px; color: #635bff; }
.pay-summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--color-divider); padding-top: 12px;
}
.pay-summary dt { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700); margin: 0; }
.pay-summary dd {
  margin: 0; font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(18px, 3.4vw, 22px); font-feature-settings: 'tnum' 1;
}
/* Container für das Stripe Payment Element (Iframe) */
#payment-element { min-height: 44px; }
#payment-element.is-loading { min-height: 180px; }
.pay-loading {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-neutral-700);
}
.spinner {
  width: 14px; height: 14px; flex: 0 0 auto;
  border: 2px solid var(--color-divider); border-top-color: var(--color-accent);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
.pay-methods { margin: 0; font-size: 13px; color: var(--color-neutral-700); line-height: 1.5; }
.pay-secure { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--color-neutral-700); line-height: 1.5; }
.pay-secure svg { flex: 0 0 auto; }
.pay-mode {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--color-divider); padding: 3px 8px; align-self: center;
}
.pay-mode.is-test { color: var(--color-accent-700); border-color: var(--color-accent-700); }

.notice {
  border-left: 3px solid var(--color-accent); background: var(--color-surface);
  padding: 14px 16px; font-size: 14px; line-height: 1.6;
}
.notice p { margin: 0; }
.notice p + p { margin-top: 8px; }
.notice code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; background: color-mix(in srgb, var(--color-text) 8%, transparent); padding: 1px 5px;
  overflow-wrap: anywhere;
}

.done { max-width: 560px; margin-top: 32px; border: 2px solid var(--color-accent); padding: clamp(18px, 5vw, 28px); }
.done-dot { width: 14px; height: 14px; background: var(--color-accent); margin-bottom: 16px; }
.done h3 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: clamp(20px, 4.4vw, 24px); margin: 0; }
.done p { font-size: 15.5px; line-height: 1.7; margin: 12px 0 0; color: var(--color-neutral-700); }
.done .ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; overflow-wrap: anywhere;
}

/* — Schluss-CTA & Footer ————————————————————————————————————————— */
.cta { background: var(--color-accent); color: var(--color-bg); }
.cta-inner {
  max-width: 1100px; margin: 0 auto;
  padding: clamp(56px, 9vw, 100px) clamp(16px, 5vw, 48px);
}
.cta h3 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: clamp(30px, 6vw, 56px); line-height: 1.06; letter-spacing: -0.015em;
  margin: 0; max-width: 20ch;
}
.cta-actions { margin-top: 28px; }
.cta .btn-ghost {
  color: var(--color-bg); border-color: var(--color-bg);
  text-decoration: none; white-space: nowrap;
}
.cta .btn-ghost:hover { background: color-mix(in srgb, #ffffff 16%, transparent); color: var(--color-bg); }

.site-footer {
  max-width: 1100px; margin: 0 auto;
  padding: 32px clamp(16px, 5vw, 48px);
  font-size: 13px; color: var(--color-neutral-700);
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 16px clamp(16px, 4vw, 40px);
  border-top: 2px solid var(--color-divider);
}
.footer-brand { margin: 0; flex: 1 1 260px; }

/* Rechtliche Tabs — gleiche Sprache wie die Beitritts-Chips */
.footer-tabs { display: flex; flex-wrap: wrap; gap: 0; order: 3; }
.footer-tabs a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 0 clamp(12px, 3vw, 18px);
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-text); text-decoration: none;
  border: 2px solid var(--color-divider);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.footer-tabs a + a { margin-left: -2px; }
.footer-tabs a:hover,
.footer-tabs a:focus-visible { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-bg); }
.footer-tabs a[aria-current='page'] { background: var(--color-text); border-color: var(--color-text); color: var(--color-bg); }

/* Anschrift: reiner Text, ausdrücklich nicht anklickbar */
.footer-address {
  margin: 0; order: 4; flex: 1 1 100%;
  display: flex; flex-wrap: wrap; gap: 4px clamp(12px, 3vw, 24px);
  line-height: 1.6;
}
.footer-address span { white-space: nowrap; }

@media (min-width: 780px) {
  .footer-address { flex: 0 1 auto; order: 2; }
  .footer-tabs { order: 3; margin-left: auto; }
}

/* — Rechtliche Unterseiten ——————————————————————————————————————— */
/* nur hier: Footer an den unteren Rand, damit kurze Seiten nicht in der
   Luft hängen. Die Startseite bleibt unberührt. */
.page-legal { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
/* Flex-Kinder haben min-width: auto und wachsen sonst auf die Breite des
   längsten unteilbaren Wortes — die Spalte würde breiter als der Bildschirm. */
.page-legal > * { min-width: 0; }
.page-legal .site-footer { margin-top: auto; width: 100%; }

/* padding-block statt der Kurzform: sonst überschreibt sie den seitlichen
   Innenabstand, den .wrap auf demselben Element setzt. */
.legal { padding-block: clamp(44px, 8vw, 96px) clamp(56px, 9vw, 120px); }
.legal .h-lg { margin-bottom: clamp(24px, 4vw, 40px); hyphens: auto; }
.legal-empty {
  border-top: 2px solid var(--color-divider);
  padding-top: 20px; margin: 0 0 clamp(28px, 5vw, 48px);
  font-size: 15.5px; line-height: 1.7; max-width: 58ch;
  color: var(--color-neutral-700);
}
.legal-back {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size: 14px; text-decoration: none;
}
a.nav-brand { color: inherit; text-decoration: none; }

/* — Scroll-Reveal ——————————————————————————————————————————————— */
[data-reveal].is-hidden { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-reveal="slow"].is-hidden { transition: opacity 1.2s ease, transform 1.2s ease; }

/* — Leaflet in der Systemtypografie —————————————————————————————— */
.leaflet-container { font-family: var(--font-body); }

/* — Feinschliff für sehr schmale Geräte —————————————————————————— */
@media (max-width: 400px) {
  .row-plz { grid-template-columns: minmax(80px, 1fr) 1.6fr; }
  .rail-controls { gap: 10px; }
  /* „Reservierungs­bestätigung" braucht bei 320px genau 7px mehr, sonst
     bricht es mitten im Wort statt am weichen Trennstrich. Geholt aus
     Innenabstand, Spalt und Laufweite — die Schriftgrösse bleibt bei 12px. */
  .step { padding: 12px 6px; gap: 6px; }
  .step-label { letter-spacing: 0.01em; }
}
@media (max-width: 340px) {
  .row-plz { grid-template-columns: 1fr; }
}

/* Untergrenze der Schrittbeschriftung auf 12px anheben — darunter wird
   sie auf kleinen Displays unleserlich. */
.step-label { font-size: clamp(12px, 2.8vw, 13px); }

/* — Smartphone-Härtung ——————————————————————————————————————————
   iOS Safari zoomt die Seite beim Fokussieren eines Eingabefelds, sobald
   dessen Schrift kleiner als 16px ist. Auf Touch-Geräten deshalb 16px —
   am Desktop bleibt die 14px-Typografie des Design Systems unverändert. */
@media (pointer: coarse) {
  .input,
  input.input,
  textarea.input,
  select.input { font-size: 16px; }

  /* Grösseres Antippziel für die AGB-Checkbox */
  .check input { width: 24px; height: 24px; margin-top: 0; }
  .check { padding: 4px 0; }

  /* Leaflet-Zoombuttons auf Touch-Grösse bringen */
  .leaflet-touch .leaflet-bar a,
  .leaflet-bar a {
    width: 44px; height: 44px; line-height: 44px; font-size: 20px;
  }
}

/* — Bewegungsreduktion ——————————————————————————————————————————— */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-title, .hero-lead, .hero-actions, .hero-figure { animation: none; }
  .caret { animation: none; }
  .spinner { animation-duration: 2s; }
  .vorteil, [data-reveal].is-hidden, .step { transition-duration: 0.01ms; }
}

@media print {
  .site-nav, .rail-btns, .map { display: none; }
}
