/* Casa Crap Sogn Gion – Stylesheet
   Farben aus den Visualisierungen: warmes Weiss, Eiche, Markisen-Terrakotta, Waldgrün. */

:root {
  --bg: #f7f3ec;
  --bg-tint: #efe8dc;
  --surface: #ffffff;
  --ink: #23221f;
  --ink-soft: #5a564e;
  --line: #ddd4c5;
  --oak: #b98049;
  --terra: #9c4a2f;          /* Kontrast auf Weiss ≈ 6:1 */
  --terra-dark: #7f3a24;
  --forest: #33492f;
  --forest-ink: #f3efe6;
  --free: #2f6b3a;
  --reserved: #6b6660;
  --radius: 0;
  --shadow: 0 1px 2px rgba(35, 34, 31, .06), 0 8px 24px rgba(35, 34, 31, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra); text-underline-offset: 3px; }
a:hover { color: var(--terra-dark); }
:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0 0 .6em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .container { padding: 0 32px; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; color: #fff; }

.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--oak); font-weight: 600; margin-bottom: .8em; }
.section-lead { max-width: 62ch; color: var(--ink-soft); font-size: 1.1rem; }
.fineprint { font-size: .875rem; color: var(--ink-soft); }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  background: var(--terra); color: #fff; text-decoration: none; font-weight: 600; border: 2px solid var(--terra);
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--terra-dark); border-color: var(--terra-dark); color: #fff; }
.btn-small { min-height: 40px; padding: 8px 18px; }
.btn-ghost { background: transparent; border-color: currentColor; color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .15); border-color: #fff; color: #fff; }
.btn-outline { background: transparent; color: var(--terra); }
.btn-outline:hover { background: var(--terra); color: #fff; }
.btn-call, .section-dark .btn-call { background: #e2b98e; border-color: #e2b98e; color: var(--ink); }
.btn-call:hover, .section-dark .btn-call:hover { background: #f1d9bf; border-color: #f1d9bf; color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 243, 236, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .04); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.1; }
.brand:hover { color: var(--ink); }
.brand-name { font-family: var(--serif); font-size: 1.25rem; }
.brand-place { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: 8px; font-weight: 500; font-size: .98rem; }
.site-nav a:not(.btn):hover { background: var(--bg-tint); }
.nav-toggle { display: none; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; align-items: center; font-size: .82rem; font-weight: 600; letter-spacing: .08em; }
.lang-switch a { color: var(--ink-soft); text-decoration: none; padding: 8px 6px; min-width: 32px; text-align: center; border-radius: 6px; }
.lang-switch a + a { border-left: 1px solid var(--line); border-radius: 0 6px 6px 0; }
.lang-switch a:hover { color: var(--ink); background: var(--bg-tint); }
.lang-switch a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--oak); text-decoration-thickness: 2px; text-underline-offset: 5px; }

@media (max-width: 899px) {
  .header-actions { gap: 4px; }
  .nav-toggle { order: 3; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; border-radius: 10px;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 24px; height: 2px; background: var(--ink); position: relative; transition: transform .2s, background .2s;
  }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -7px; }
  .nav-toggle-bar::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 8px 16px 20px; gap: 2px; }
  .site-nav a:not(.btn) { display: block; padding: 14px 8px; font-size: 1.1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav .btn { margin-top: 14px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(88vh, 820px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-overlay {
  position: relative; width: 100%; padding: 120px 0 56px;
  background: linear-gradient(180deg, rgba(20, 22, 18, 0) 0%, rgba(20, 22, 18, .5) 35%, rgba(20, 22, 18, .78) 100%);
}
.hero .eyebrow { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.hero h1 { font-size: clamp(2.4rem, 1.4rem + 4.5vw, 4.6rem); margin-bottom: .3em; text-shadow: 0 2px 20px rgba(0, 0, 0, .25); }
.hero-lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.3rem); max-width: 40ch; margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Kennzahlen ---------- */
.facts { background: var(--surface); border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: 0; }
.facts-grid > div { padding: 22px 12px; border-bottom: 1px solid var(--line); }
.facts-grid > div:nth-child(odd) { border-right: 1px solid var(--line); }
.facts-grid > div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
.facts-grid dt { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.facts-grid dd { margin: 2px 0 2px; font-family: var(--serif); font-size: 1.75rem; line-height: 1.2; }
.facts-grid p { margin: 0; font-size: .875rem; color: var(--ink-soft); }
@media (min-width: 900px) {
  .facts-grid { grid-template-columns: repeat(5, 1fr); }
  .facts-grid > div, .facts-grid > div:nth-child(odd) { border-bottom: 0; border-right: 1px solid var(--line); padding: 30px 20px; }
  .facts-grid > div:last-child { grid-column: auto; border-right: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }
.section-tint { background: var(--bg-tint); }
.section-dark { background: var(--forest); color: var(--forest-ink); }
.section-dark .eyebrow { color: #e2b98e; }
.section-dark a:not(.btn) { color: #fff; }

.split { display: grid; gap: 32px; align-items: center; }
.split + .container, .container + .split { margin-top: 56px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split-reverse .split-media { order: -1; }
}
.split-text { max-width: 60ch; }
.split-media { margin: 0; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); }
figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: 10px; }

/* ---------- Bildband ---------- */
.image-band { margin: 0; padding-bottom: 24px; }
.image-band img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 700px) { .image-band img { aspect-ratio: 21 / 9; max-height: 80vh; } }

.checklist li::before {
  content: ""; position: absolute; left: 18px; top: 22px; width: 14px; height: 8px;
  border-left: 2px solid var(--oak); border-bottom: 2px solid var(--oak); transform: rotate(-45deg);
}
/* Highlights im Layout des Kennzahlen-Balkens */
.highlights-grid { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.highlights-grid dd { font-size: 1.3rem; line-height: 1.3; }

.checklist { list-style: none; padding: 0; margin: 0 0 1.4em; }
.checklist li { position: relative; padding: 8px 0 8px 34px; border-bottom: 1px solid var(--line); }
.checklist li::before { left: 4px; top: 16px; }

/* ---------- Pläne / Zoom ---------- */
.zoom { display: block; position: relative; width: 100%; padding: 0; border: 0; background: #fff; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.zoom img { border-radius: 0; box-shadow: none; transition: transform .4s; }
.zoom:hover img { transform: scale(1.02); }
.zoom-hint {
  position: absolute; right: 12px; bottom: 12px; background: rgba(35, 34, 31, .78); color: #fff;
  font-size: .8rem; padding: 6px 12px; border-radius: 999px;
}
.map-embed { display: block; width: 100%; height: 380px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--bg); }
@media (min-width: 900px) { .map-embed { height: 520px; } }
.terrain { margin-top: 56px; }
.terrain-grid { display: grid; gap: 20px; }
.terrain-grid figure { margin: 0; }
@media (min-width: 900px) { .terrain-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Filter ---------- */
/* ---------- Hauptkachel: letzte Zweitwohnung ---------- */
.featured {
  display: grid; margin: 32px 0 56px; border-radius: 0; overflow: hidden;
  background: var(--forest); color: var(--forest-ink);
  box-shadow: 0 2px 4px rgba(35, 34, 31, .08), 0 24px 48px rgba(51, 73, 47, .28);
  border: 1px solid #4a6445;
}
@media (min-width: 900px) { .featured { grid-template-columns: 1.15fr 1fr; } }
.featured-media { position: relative; min-height: 260px; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-ribbon {
  position: absolute; top: 20px; left: 20px; padding: 8px 16px; border-radius: 999px;
  background: var(--oak); color: #fff; font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.featured-credit { position: absolute; right: 12px; bottom: 10px; font-size: .75rem; color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.featured-body { padding: 32px 24px; display: flex; flex-direction: column; }
@media (min-width: 900px) { .featured-body { padding: 48px 44px; } }
.featured-eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #e2b98e; font-weight: 600; margin-bottom: .5em; }
.featured h3 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); margin: 0 0 .15em; color: #fff; }
.featured-sub { color: #d6d9cf; font-size: 1.05rem; }
.featured-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 8px 0 24px; border-top: 1px solid rgba(255, 255, 255, .18); }
.featured-facts div { padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.featured-facts dt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #c5cbbd; }
.featured-facts dd { margin: 2px 0 0; font-family: var(--serif); font-size: 1.35rem; color: #fff; }
.featured-price { font-family: var(--serif); font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.4rem); color: #fff; margin: 0 0 24px; line-height: 1.1; }
.featured-price span { display: block; font-family: var(--sans); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: #e2b98e; margin-bottom: 6px; }
.featured-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }
.btn-light { background: #fff; border-color: #fff; color: var(--forest); font: inherit; font-weight: 600; cursor: pointer; }
.btn-light:hover { background: #f1d9bf; border-color: #f1d9bf; color: var(--forest); }
.featured :focus-visible { outline-color: #e2b98e; }

.units-heading { font-size: 1.5rem; margin: 0 0 16px; }
@media (min-width: 900px) { .units.units-3 { grid-template-columns: repeat(3, 1fr); } }
#units + .result-count { margin-top: 20px; }

  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .95rem;
}
.result-count { font-size: .9rem; color: var(--ink-soft); margin: 16px 0 12px; }

/* ---------- Wohnungskarten ---------- */
.units { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.unit-btn {
  display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100%; text-align: left;
  font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .2s;
}
.unit-btn:hover { border-color: var(--oak); box-shadow: var(--shadow); transform: translateY(-2px); }
.unit-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.unit-house { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.unit-title { font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; }
.unit-meta { font-size: .92rem; color: var(--ink-soft); }
.unit-price { font-weight: 700; font-size: 1.1rem; margin-top: 10px; }
.unit-more { color: var(--terra); font-weight: 600; font-size: .92rem; margin-top: auto; padding-top: 10px; }
.unit.is-reserved .unit-btn { background: #faf8f4; }
.unit-price.is-reserved { color: var(--reserved); font-weight: 600; font-size: 1rem; }
.unit-hint {
  align-self: flex-start; display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; background: #f4e3d6; color: var(--terra-dark);
}

/* ---------- Rechtsseiten ---------- */
.legal { padding: 56px 0 88px; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); }
.legal h2 { font-size: 1.35rem; margin-top: 2em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .notice { margin-bottom: 2em; }
.unit-empty { grid-column: 1 / -1; padding: 24px; background: var(--surface); border-radius: var(--radius); border: 1px dashed var(--line); }

.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em; }
.badge-free { background: #e3efe2; color: var(--free); }
.badge-reserved { background: #ebe8e3; color: var(--reserved); }

.included summary { cursor: pointer; font-weight: 600; padding: 14px 0; min-height: 44px; }

.garage-grid { display: grid; gap: 20px; margin-top: 40px; }
.garage-grid figure { margin: 0; }
.garage-grid .zoom img { width: 100%; height: 340px; object-fit: contain; background: #fff; }
@media (min-width: 700px) { .garage-grid { grid-template-columns: 1fr 1fr; } .garage-grid .zoom img { height: 420px; } }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 32px 0 16px; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 900px) { .timeline { grid-template-columns: repeat(3, 1fr); } }
.timeline li { counter-increment: step; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px 24px; }
.timeline li::before {
  content: counter(step); position: absolute; top: -16px; left: 24px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--forest); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.timeline-when { display: block; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--oak); font-weight: 600; margin-bottom: 4px; }
.timeline p { color: var(--ink-soft); }
.timeline li { display: flex; flex-direction: column; }
.timeline .timeline-amount { font-family: var(--serif); font-size: 1.5rem; color: var(--ink); margin: auto 0 0; }

/* ---------- Kontakt ---------- */
.contact-cards { display: grid; gap: 16px; }
.contact-card { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); padding: 24px; }
.contact-card h3 { font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: #e2b98e; font-weight: 600; }
.contact-card p:last-child { margin: 0; }
.section-dark .btn-ghost { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #1d2a1b; color: #c9c4b8; padding: 32px 0; font-size: .875rem; }
.site-footer p { margin: 0 0 .4em; }
.site-footer a { color: #fff; }

/* ---------- Dialoge ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--surface); }
dialog::backdrop { background: rgba(20, 22, 18, .7); }
.unit-dialog { width: min(1100px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border-radius: 0; overflow: auto; }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.5rem; margin: 0; }
.dialog-close {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink);
}
.dialog-close:hover { background: var(--bg-tint); }
.dialog-body { padding: 20px; }
.dialog-grid { display: grid; gap: 24px; }
@media (min-width: 860px) { .dialog-grid { grid-template-columns: 1.25fr 1fr; align-items: start; } }
.dialog-plan { margin: 0; }
.dialog-plan img { width: 100%; max-height: 70vh; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 0; }
.facts-list { margin: 0 0 12px; }
.facts-list div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.facts-list dt { color: var(--ink-soft); }
.facts-list dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.dialog-loc { margin: 16px 0; }
.dialog-loc img { border: 1px solid var(--line); border-radius: 0; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.zoom-dialog { width: calc(100vw - 24px); max-width: 1600px; max-height: calc(100dvh - 24px); border-radius: 0; padding: 16px; overflow: auto; }
.zoom-dialog figure { margin: 0; }
.zoom-dialog img { width: 100%; height: auto; }
.zoom-dialog .dialog-close { position: sticky; top: 0; float: right; z-index: 2; }

.notice { padding: 16px; background: var(--surface); border-left: 4px solid var(--terra); border-radius: 0; }

@media print {
  .site-header, .hero-actions, .filters, dialog, .zoom-hint { display: none !important; }
  .hero { min-height: 0; color: var(--ink); }
  .hero-img { position: static; }
  .section { padding: 24px 0; }
}
