/* ═══════════════════════════════════════════════════════════════
   SEEBACHER — Single-Screen-App (Prototyp)
   Eine Bühne, Nav-gesteuerter Kameraflug, Pages an den Wänden.
   ═══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-latin-500-italic.woff2') format('woff2');
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-latin-300-normal.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../assets/fonts/manrope-latin-500-normal.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --ivory: #f4f1ea; --paper: #faf8f2;
  --ink: #17130c; --ink-70: rgba(23,19,12,.7); --ink-45: rgba(23,19,12,.45); --ink-14: rgba(23,19,12,.14);
  --accent: #ab8b5c; --accent-dark: #8a6f45;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: #0c0f12; color: var(--ink);
  font-family: var(--sans); font-weight: 300; font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ═══ Bühne ═══ */
#stage { position: fixed; inset: 0; z-index: 1; }
#film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% 42%, transparent 55%, rgba(10, 8, 4, .36) 100%),
    linear-gradient(to bottom, rgba(10, 8, 4, .2), transparent 12%);
}
/* Leichter Blur, wenn eine Page an der Wand liegt */
.stage-blur {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  -webkit-backdrop-filter: blur(4px) saturate(1.04);
  backdrop-filter: blur(4px) saturate(1.04);
  background: rgba(14, 12, 8, .10);
  opacity: 0; transition: opacity .7s var(--ease);
}
body.at-wall .stage-blur { opacity: 1; }

/* ═══ Preloader ═══ */
#pre {
  position: fixed; inset: 0; z-index: 100; background: var(--ivory);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
body.app-ready #pre { opacity: 0; visibility: hidden; }
.pre-inner { text-align: center; width: min(380px, 76vw); }
.pre-word { font-family: var(--serif); font-weight: 600; font-size: 2.6rem; letter-spacing: .12em; }
.pre-word sup { font-size: .45em; }
.pre-sub { margin-top: .3rem; font-size: 9.5px; font-weight: 500; letter-spacing: .32em; color: var(--ink-45); }
.pre-bar { margin-top: 2rem; height: 1px; background: var(--ink-14); overflow: hidden; }
#pre-fill { display: block; width: 0%; height: 100%; background: var(--accent); transition: width .3s; }

/* ═══ Navigation ═══ */
#rail {
  position: fixed; left: clamp(.8rem, 1.6vw, 1.6rem); top: 50%; transform: translateY(-50%);
  z-index: 50;
  width: 62px; padding: 18px 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  background: rgba(244, 241, 234, .78);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, .55);
  outline: 1px solid rgba(23, 19, 12, .1);
  border-radius: 16px;
  box-shadow: 0 24px 48px -20px rgba(10, 8, 4, .45);
  transition: width .45s var(--ease);
  overflow: hidden;
}
/* Hover-Ausklappen nur auf Geräten mit echtem Zeiger (Desktop) —
   auf Touch übernimmt der Hamburger-Drawer (siehe Responsive-Block). */
@media (hover: hover) and (pointer: fine) {
  #rail:hover, #rail:focus-within { width: 218px; }
}
.rail-brand {
  font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: .04em;
  text-align: center; width: 62px; margin-bottom: 4px; color: var(--ink);
}
.rail-brand sup { font-size: .45em; }
.rail-items { display: flex; flex-direction: column; gap: 2px; }
.ri {
  display: flex; align-items: center; gap: 14px;
  height: 46px; padding-left: 17px;
  color: var(--ink-70); position: relative;
  transition: color .3s, background .3s;
  white-space: nowrap;
}
.ri svg {
  width: 21px; height: 21px; flex: 0 0 21px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.ri span {
  font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  opacity: 0; transform: translateX(-6px);
  transition: opacity .35s var(--ease) .06s, transform .35s var(--ease) .06s;
}
@media (hover: hover) and (pointer: fine) {
  #rail:hover .ri span, #rail:focus-within .ri span { opacity: 1; transform: none; }
}
.ri:hover { color: var(--ink); background: rgba(23, 19, 12, .05); }
.ri.is-active { color: var(--accent-dark); }
.ri.is-active::before {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 2px; background: var(--accent); border-radius: 2px;
}
.ri.is-soon { opacity: .45; }
.rail-foot {
  width: 62px; text-align: center; margin-top: 4px;
  font-size: 9px; font-weight: 500; letter-spacing: .2em; color: var(--ink-45);
}
body.flying #rail { pointer-events: none; }
body.flying .ri { color: var(--ink-45); }

/* ═══ Mobile-Nav: Hamburger + Scrim (nur Touch/schmale Screens sichtbar) ═══ */
.nav-toggle {
  position: fixed; z-index: 60;
  top: max(14px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left));
  width: 46px; height: 46px; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0; cursor: pointer;
  background: rgba(244, 241, 234, .82);
  -webkit-backdrop-filter: blur(18px) saturate(1.15); backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, .55); outline: 1px solid rgba(23, 19, 12, .1);
  border-radius: 13px; box-shadow: 0 14px 30px -14px rgba(10, 8, 4, .5);
}
.nav-toggle span {
  display: block; width: 20px; height: 1.6px; border-radius: 2px; background: var(--ink);
  transition: transform .35s var(--ease), opacity .25s var(--ease);
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
.nav-scrim {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(12, 10, 6, .38);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
body.nav-open .nav-scrim { opacity: 1; visibility: visible; }

/* ═══ Pages (gemeinsam) ═══ */
.page {
  position: fixed; inset: 0; z-index: 20;
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity .55s var(--ease), visibility .55s;
}
.page.is-on { opacity: 1; visibility: visible; }
.page.is-on .can-click { pointer-events: auto; }

/* ═══ Startseite ═══ */
.page-home { display: flex; align-items: flex-end; justify-content: space-between; }
.home-title {
  padding: 0 0 clamp(2rem, 7vh, 4.5rem) clamp(6rem, 9vw, 9rem);
  color: var(--ivory); text-shadow: 0 2px 26px rgba(10, 8, 4, .35);
}
.kick {
  font-size: 9.5px; font-weight: 500; letter-spacing: .3em; text-transform: uppercase;
  display: flex; align-items: center; gap: 12px; color: inherit; opacity: .85;
}
.kick::before { content: ''; width: 32px; height: 1px; background: currentColor; }
.home-title h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(3.6rem, 9vw, 8rem); line-height: .9; letter-spacing: -.01em;
  margin-top: 1.1rem;
}
.home-title em { font-style: italic; font-weight: 500; }
.page-home .home-title { transform: translateY(14px); transition: transform .8s var(--ease), opacity .6s; }
.page-home.is-on .home-title { transform: none; }

.home-cards {
  width: min(320px, 26vw);
  margin: 0 clamp(1.4rem, 3vw, 3rem) clamp(2rem, 6vh, 3.6rem) 0;
  display: flex; flex-direction: column; gap: 10px;
  transform: translateY(14px); transition: transform .8s var(--ease) .08s;
}
.page-home.is-on .home-cards { transform: none; }
.hc {
  background: rgba(250, 248, 242, .82);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid rgba(255, 255, 255, .5);
  outline: 1px solid rgba(23, 19, 12, .08);
  border-radius: 10px; padding: 14px 16px;
  pointer-events: auto;
}
.hc-k { font-size: 9px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--accent-dark); margin-bottom: 8px; }
.hc-status-row { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #b6b6ae; }
.dot.open { background: #3f9d68; box-shadow: 0 0 0 4px rgba(63, 157, 104, .16); }
.dot.closed { background: #b3543f; box-shadow: 0 0 0 4px rgba(179, 84, 63, .14); }
.hc-sub { margin-top: 4px; font-size: 11.5px; color: var(--ink-45); }
.hc-obj { display: block; border-radius: 7px; overflow: hidden; background: var(--paper); outline: 1px solid var(--ink-14); }
.hc-obj img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.hc-obj-body { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 1px; }
.hc-obj-body b { font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1.15; }
.hc-obj-body span { font-size: 10.5px; color: var(--ink-45); letter-spacing: .04em; }
.hc-news { display: flex; flex-direction: column; gap: 9px; }
.hc-news .n { font-size: 12px; line-height: 1.5; color: var(--ink-70); }
.hc-news .n b { display: block; font-weight: 500; font-size: 9.5px; letter-spacing: .12em; color: var(--ink-45); }

/* ═══ Wand-Pages ═══ */
.page-wall { display: flex; align-items: center; justify-content: center; }
.wall-panel {
  width: min(880px, 72vw); max-height: 76vh;
  display: flex; flex-direction: column;
  color: var(--ivory);
  transform: translateY(18px) scale(.985);
  transition: transform .8s var(--ease);
  text-shadow: 0 2px 22px rgba(10, 8, 4, .4);
}
.page-wall.is-on .wall-panel { transform: none; }
.wp-head { margin-bottom: 1.4rem; }
.wp-head .kick { color: var(--ivory); }
.wp-head h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.02; margin-top: .8rem;
}
.wp-head em { font-style: italic; font-weight: 500; }
.wp-scroll {
  overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 14px 22px 2px;
  scrollbar-width: thin; scrollbar-color: rgba(244,241,234,.4) transparent;
  pointer-events: auto;
}

/* Angebote: 3 Karten */
#angebote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.prop-card {
  background: rgba(250, 248, 242, .94); color: var(--ink);
  border-radius: 8px; overflow: hidden; text-shadow: none;
  outline: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 18px 40px -18px rgba(10, 8, 4, .55);
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s;
}
.prop-card:hover { transform: translateY(-4px); box-shadow: 0 26px 52px -20px rgba(10, 8, 4, .65); }
.pc-media { position: relative; overflow: hidden; background: #e8e4da; flex: 0 0 auto; }
/* Das Bild dimensioniert die Box selbst — robust in Grid/Flex (aspect-ratio-Quirk) */
.pc-media img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .9s var(--ease); }
.prop-card:hover .pc-media img { transform: scale(1.06); }
.pc-badge {
  position: absolute; top: 9px; left: 9px;
  background: rgba(250, 248, 242, .94); border: 1px solid var(--ink-14);
  font-size: 8px; font-weight: 500; letter-spacing: .18em; padding: 4px 8px 3px; text-transform: uppercase;
}
.pc-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; gap: 3px; }
.pc-titel { font-family: var(--serif); font-weight: 600; font-size: 19px; line-height: 1.08; }
.pc-ort { font-size: 9px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-dark); }
.pc-preis { margin-top: auto; padding-top: 8px; font-family: var(--serif); font-weight: 600; font-size: 17px; }

.pc-facts { font-size: 10.5px; color: var(--ink-45); font-variant-numeric: tabular-nums; }
.pc-preis small { font-family: var(--sans); font-size: 9px; font-weight: 500; letter-spacing: .1em; color: var(--ink-45); }

/* Listings (Wohnungen/Häuser): 2-spaltig, horizontale Karten mit FESTER Höhe —
   deterministisches Layout im Scroll-Panel (keine aspect-ratio-Zyklen). */
.listing { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; grid-auto-rows: 148px; }
.listing .prop-card { display: grid; grid-template-columns: 190px 1fr; height: 148px; }
.listing .pc-media { height: 148px; }
.listing .pc-media img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.listing .pc-body { padding: 12px 14px; min-width: 0; }
.listing .pc-titel { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#angebote-grid { grid-auto-rows: minmax(320px, auto); }
#angebote-grid .prop-card { height: 100%; }
#angebote-grid .pc-media { height: 190px; }
#angebote-grid .pc-media img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }

/* Kontakt */
.wall-panel-narrow { width: min(640px, 60vw); }
.k-form { display: flex; flex-direction: column; gap: 12px; }
.k-form label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(244, 241, 234, .8);
}
.k-form input, .k-form textarea {
  font: inherit; font-size: 14px; color: var(--ink);
  background: rgba(250, 248, 242, .94);
  border: none; outline: 1px solid rgba(255, 255, 255, .35);
  border-radius: 6px; padding: 11px 13px; resize: vertical;
}
.k-form input:focus, .k-form textarea:focus { outline: 2px solid var(--accent); }
.k-form button {
  align-self: flex-start; margin-top: 4px; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  background: var(--ivory); color: var(--ink);
  border: none; border-radius: 99px; padding: 13px 26px;
  transition: background .3s, transform .3s var(--ease);
}
.k-form button:hover { background: #fff; transform: translateY(-2px); }
.k-info { margin-top: 22px; font-size: 12.5px; line-height: 1.7; color: rgba(244, 241, 234, .82); display: flex; flex-direction: column; gap: 8px; }
.k-info b { font-family: var(--serif); font-size: 15px; }

/* Team: Porträt-Raster */
#team-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tm-card { background: rgba(250, 248, 242, .94); color: var(--ink); text-shadow: none; border-radius: 7px; overflow: hidden; box-shadow: 0 14px 32px -16px rgba(10, 8, 4, .55); }
.tm-media { aspect-ratio: 3 / 4; overflow: hidden; background: #e8e4da; }
.tm-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(12%); }
.tm-name { padding: 8px 10px 1px; font-size: 11px; font-weight: 500; line-height: 1.25; }
.tm-rolle { padding: 0 10px 9px; font-size: 8px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-45); }

/* „Bald"-Hinweis */
#soon-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 16px);
  z-index: 60; padding: 11px 20px; border-radius: 99px;
  background: rgba(23, 19, 12, .82); color: var(--ivory);
  font-size: 12px; letter-spacing: .04em;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: all .45s var(--ease);
}
#soon-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ═══════════════ Responsive ═══════════════ */

/* Tablet & darunter: dekorative Info-Cards weg, Raster verdichten,
   Titel raus aus der linken (jetzt Drawer-)Zone. */
@media (max-width: 900px) {
  .home-cards { display: none; }
  .home-title { padding-left: clamp(1.4rem, 6vw, 4rem); }

  .wall-panel { width: min(560px, 90vw); max-height: 82vh; }
  .wall-panel-narrow { width: min(520px, 92vw); }

  #angebote-grid { grid-template-columns: 1fr; }
  #team-grid { grid-template-columns: repeat(3, 1fr); }

  /* Wohnungen/Häuser: horizontale Karten einspaltig — nie mehr Bild-Overflow */
  .listing { grid-template-columns: 1fr; }
}

/* Mobile-Nav-Modus: Rail wird zum Drawer, Hamburger erscheint.
   Greift bei schmalen ODER Touch-Geräten (Hover-Ausklappen wirkt dort nicht). */
@media (max-width: 860px), (pointer: coarse) {
  .nav-toggle { display: flex; }

  #rail {
    top: 0; left: 0; transform: translate(-100%, 0);
    height: 100vh; height: 100dvh; max-height: none;
    width: min(80vw, 288px);
    padding: max(74px, calc(env(safe-area-inset-top) + 64px)) 0 max(20px, env(safe-area-inset-bottom));
    justify-content: flex-start; gap: 2px;
    border: none; outline: none; border-right: 1px solid rgba(23, 19, 12, .1);
    border-radius: 0 18px 18px 0;
    box-shadow: 0 30px 80px -20px rgba(10, 8, 4, .6);
    overflow-y: auto; overscroll-behavior: contain;
    transition: transform .42s var(--ease);
  }
  body.nav-open #rail { transform: translate(0, 0); }

  /* Labels im Drawer immer sichtbar */
  #rail .ri span { opacity: 1; transform: none; font-size: 12px; }
  #rail .ri { height: 52px; padding-left: 22px; gap: 16px; }
  #rail .ri.is-active::before { top: 14px; bottom: 14px; }

  .rail-brand { width: auto; text-align: left; padding-left: 22px; margin-bottom: 10px; }
  .rail-foot  { width: auto; text-align: left; padding-left: 22px; margin-top: 12px; }
}

/* Phone: engere Raster, kompaktere Karten, größerer Titel-Anteil */
@media (max-width: 560px) {
  #team-grid { grid-template-columns: repeat(2, 1fr); }
  .wall-panel { width: 92vw; max-height: 84vh; }
  .wall-panel-narrow { width: 92vw; }
  .home-title h1 { font-size: clamp(3rem, 13vw, 4.6rem); }

  .listing { grid-auto-rows: 132px; }
  .listing .prop-card { grid-template-columns: 132px 1fr; height: 132px; }
  .listing .pc-media { height: 132px; }
  .listing .pc-body { padding: 10px 12px; }
  .listing .pc-titel { font-size: 15px; }

  #angebote-grid .pc-media { height: 168px; }
  .wp-head { margin-bottom: 1rem; }
}

/* Sehr niedrig (Landscape-Phone): Titel zähmen, Panel höher nutzbar */
@media (max-height: 460px) {
  .home-title h1 { font-size: clamp(2.4rem, 11vh, 4rem); }
  .home-title { padding-bottom: clamp(1rem, 4vh, 2rem); }
  .wall-panel { max-height: 92vh; }
}
