/* ============================================================
   Components: layout, nav, buttons, cards, badges, forms, footer
   ============================================================ */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }
section { position: relative; }
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section-tight { padding: clamp(48px, 6vw, 80px) 0; }

/* Swiss flag chip — brand-mandated Swiss anchor */
.swiss {
  display: inline-flex; align-items: center; gap: 8px;
}
/* Schweizer Flagge, in CSS gezeichnet. Das Kreuz sitzt in zwei Pseudo-Elementen
   und ist am Quadrat ausgerichtet — wer die Kantenlaenge aendert, muss beide
   Balken im selben Verhaeltnis mitfuehren, sonst sitzt das Kreuz aussermittig. */
.swiss-flag {
  width: 36px; height: 36px; border-radius: 8px; background: var(--red);
  position: relative; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.swiss-flag::before, .swiss-flag::after { content: ''; position: absolute; background: #fff; border-radius: 2px; }
.swiss-flag::before { width: 18px; height: 6px; top: 15px; left: 9px; }
.swiss-flag::after { width: 6px; height: 18px; top: 9px; left: 15px; }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(246,244,240,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.scrolled { border-color: var(--line); background: rgba(246,244,240,.9); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 640; letter-spacing: -0.02em; font-size: 1.02rem; }
.brand img { height: 34px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.95rem; color: var(--ink-2); font-weight: 480; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
@media (max-width: 860px) { .nav-links { display: none; } }
/* Mobile: the wordmark span is hidden, so only the stacked logo lockup (house +
   "OHNE MAKLER VERKAUFEN") remains — at 30px it was barely legible. Enlarge it. */
@media (max-width: 640px) {
  .nav .brand > span { display: none; }
  .nav .brand img { height: 44px; }
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-weight: 560; font-size: 1.02rem; letter-spacing: -0.01em;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease), background .2s, color .2s;
  white-space: nowrap; will-change: transform;
}
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn-primary:hover { background: var(--red-deep); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(204,41,36,.34); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: rgba(20,27,38,.04); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: rgba(20,27,38,.07); }
.btn-lg { padding: 17px 34px; font-size: 1.08rem; }
.btn-arrow svg { transition: transform .25s var(--ease-out); }
.btn-arrow:hover svg { transform: translateX(4px); }
.btn-block { width: 100%; }
/* Mobil: lange CTA-Labels duerfen umbrechen. Sonst erzwingt white-space:nowrap eine
   intrinsische Button-Breite groesser als der Viewport ("Jetzt Immobilienbewertung
   sichern CHF 189" = 427px bei 390px Viewport, gemessen 24.08.2026) — die Sektion
   waechst auf min-content mit und die ganze Seite scrollt horizontal
   (body.scrollWidth 451 statt 390). white-space:normal bricht nur, wenn es muss. */
@media (max-width: 640px) {
  .btn { white-space: normal; max-width: 100%; text-align: center; }
  .btn-lg { padding: 15px 22px; font-size: 1rem; }
}

/* ---------------- Cards ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}
.card-pad { padding: clamp(24px, 3vw, 40px); }

/* Badge / pill */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 0.84rem; font-weight: 520; color: var(--ink-2);
}
.pill-red { background: var(--red-wash); border-color: #F3D6D4; color: var(--red-deep); }
.tag {
  font-size: 0.72rem; font-weight: 640; letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-pill); background: var(--red); color: #fff;
}

/* Rating stars */
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.avatars { display: inline-flex; }
.avatars span {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--paper);
  margin-left: -10px; background-size: cover; background-position: center;
}
.avatars span:first-child { margin-left: 0; }

/* Divider */
.hr { height: 1px; background: var(--line); border: 0; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.9rem; font-weight: 560; color: var(--ink-2); margin-bottom: 7px; }
.input, .select, .textarea {
  width: 100%; padding: 14px 16px; font: inherit; font-size: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 4px var(--red-wash);
}
.textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.hint { font-size: 0.82rem; color: var(--ink-3); margin-top: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* Choice grid (wizard) */
.choices { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 20px; border: 1.5px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); text-align: left; transition: all .2s var(--ease);
}
.choice:hover { border-color: var(--ink-3); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.choice.sel { border-color: var(--red); background: var(--red-wash); box-shadow: 0 0 0 3px var(--red-wash); }
.choice .ico { font-size: 1.5rem; }
.choice .t { font-weight: 580; letter-spacing: -0.01em; overflow-wrap: anywhere; hyphens: auto; }

/* ---------------- Footer ---------------- */
.footer { background: var(--ink); color: #C9D0DA; padding: 72px 0 40px; }
.footer a { color: #C9D0DA; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer h5 { color: #fff; font-size: 0.82rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 0.94rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); font-size: 0.85rem; color: #8A93A0; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
/* Grid-Kinder haben min-width:auto — lange Einzelwoerter ("Grundstueckgewinnsteuer")
   erzwingen sonst eine Spalten-Mindestbreite ueber den Viewport hinaus (gemessen
   24.08.2026 auf /grundstueckgewinnsteuer.html: bodyScrollW 401 bei 320px). */
.footer-grid > * { min-width: 0; }
.footer ul a { overflow-wrap: break-word; }

