/* ==========================================================================
   Lage-Seite "Hinauf auf 2.150 m" / "Up to 2,150 m"
   Scroll-Geschichte: Foto-Bühne (sticky) mit Kapiteln auf Papier-Tafeln.
   Hell und eckig — dunkel ist nur das Foto selbst. Basis: zimmer.css.
   ========================================================================== */

/* ---------- Bühne ---------- */
.story { position: relative; background: var(--papier-2); }
.story-buehne { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--papier-2); }
/* Bilder liegen übereinander; nur "da" ist im Layout (sonst lädt der Browser alle sofort) */
.story-bild { position: absolute; inset: 0; margin: 0; display: none; opacity: 0; transition: opacity 1.2s var(--ease); }
.story-bild.da { display: block; }
.story-bild.aktiv { opacity: 1; }
.story-bild img, .story-bild video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--fx, 50%) var(--fy, 50%);
}
/* Langsamer Zoom (Ken Burns), nur Transform; läuft nur im aktiven Bild weiter.
   Videos zoomen mit (lage.js gleicht den Zeitpunkt ans Standbild an), damit das Überblenden nicht springt. */
.story-bild img, .story-bild video {
  transform-origin: var(--fx, 50%) var(--fy, 50%);
  animation: lage-zoom 28s linear infinite alternate; animation-play-state: paused;
}
.story-bild.aktiv img, .story-bild.aktiv video { animation-play-state: running; }
@keyframes lage-zoom { from { transform: scale(1.01); } to { transform: scale(1.1); } }
/* Haken für spätere Video-Schleifen (data-video): blendet über das Standbild */
.story-bild video { opacity: 0; transition: opacity .8s var(--ease); }
.story-bild.mit-video video { opacity: 1; }

/* ---------- Höhenmesser + Kapitel-Navigation (Papier-Etiketten) ---------- */
.story-nav { position: absolute; z-index: 3; top: calc(var(--kopf-h) + 12px); right: var(--rand); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.hoehe {
  position: relative; margin: 0; display: grid; grid-template-columns: auto auto; align-items: baseline; column-gap: 5px;
  padding: 7px 11px 9px; background: var(--papier); border: 1px solid var(--linie); color: var(--tinte);
}
.hoehe small { grid-column: 1 / -1; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--sand-dunkel); }
.hoehe b { font: 300 24px/1.05 var(--head); font-variant-numeric: tabular-nums; min-width: 2.9em; text-align: right; }
.hoehe span { font-size: 13px; color: var(--tinte-2); }
.hoehe-balken { position: absolute; left: -1px; right: -1px; bottom: -1px; height: 2px; background: var(--linie); }
.hoehe-balken i { display: block; height: 100%; background: var(--sand-dunkel); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.story-nav ol { list-style: none; margin: 0; padding: 0; display: none; flex-direction: column; align-items: flex-end; gap: 4px; transition: opacity .5s, visibility .5s; }
/* Beim Titelbild nur der Höhenmesser — die Kapitel erscheinen, sobald die Geschichte beginnt */
.story.am-start .story-nav ol { opacity: 0; visibility: hidden; }
html:not(.lage-js) .story.am-start .story-nav ol { opacity: 1; visibility: visible; }
.story-nav ol a { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--tinte); }
.story-nav ol b {
  display: grid; place-items: center; width: 36px; height: 30px; background: var(--papier); border: 1px solid var(--linie);
  font: 700 12px/1 var(--sans); letter-spacing: .06em; transition: background .3s, border-color .3s;
}
.story-nav ol span {
  padding: 7px 10px; background: var(--papier); border: 1px solid var(--linie);
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .35s var(--ease); pointer-events: none;
}
.story-nav ol a:hover span, .story-nav ol a:focus-visible span, .story-nav ol a.aktiv span { opacity: 1; transform: none; }
.story-nav ol a:hover b { border-color: var(--sand-dunkel); }
.story-nav ol a.aktiv b { background: var(--sand); border-color: var(--sand); }

/* ---------- Kapitel: Papier-Tafeln, die über die Bühne scrollen ---------- */
.story-kapitel { position: relative; z-index: 2; margin-top: -100svh; }
.kap {
  position: relative; display: flex; align-items: flex-end; min-height: 118svh;
  padding: calc(var(--kopf-h) + 16px) var(--rand) 20px; pointer-events: none;
}
/* Handy: Titelbild wie ein Magazin-Cover — das Foto steht frei, die Tafel mit H1 schaut unten heraus */
.kap-held { display: block; min-height: 0; padding-top: 72svh; }
.tafel {
  pointer-events: auto; width: 100%; max-width: 480px; padding: 22px 20px 24px;
  background: var(--papier); color: var(--tinte); border: 1px solid var(--linie);
  box-shadow: 0 30px 60px -40px rgba(24, 33, 46, .5);
  scroll-margin-top: calc(var(--kopf-h) + 16px);
}
.tafel .eyebrow { margin: 0 0 12px; }
.tafel h1 { font-size: clamp(28px, 8.4vw, 40px); text-wrap: balance; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.tafel h2 { font-size: clamp(27px, 7.4vw, 36px); text-wrap: balance; overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.tafel p { margin: 14px 0 0; }
.tafel .lead, .tafel-text { font-size: 16px; line-height: 1.6; color: var(--tinte-2); text-wrap: pretty; }
.tafel .lead { color: var(--tinte); }
.kap-nr { margin: 0 0 12px !important; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--sand-dunkel); }
.tafel-text a, .tafel-mehr a, .tafel-fuss a, .lage-fakten a, .steckbrief-faq details p a {
  color: var(--tinte); text-decoration: underline; text-decoration-color: var(--sand); text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color .2s, text-decoration-color .2s;
}
.tafel-text a:hover, .tafel-mehr a:hover, .tafel-fuss a:hover, .lage-fakten a:hover, .steckbrief-faq details p a:hover { color: var(--sand-dunkel); text-decoration-color: var(--sand-dunkel); }
.tafel-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tafel-knoepfe .knopf { flex: 1 1 auto; }
.tafel-fakten { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--linie); }
.tafel-fakten li { position: relative; padding: 10px 0 10px 26px; border-bottom: 1px solid var(--linie); font-size: 15px; line-height: 1.4; }
.tafel-fakten li::before {
  content: ''; position: absolute; left: 2px; top: calc(10px + .38em); width: 12px; height: 7px;
  border-left: 2px solid var(--sand-dunkel); border-bottom: 2px solid var(--sand-dunkel); transform: rotate(-45deg);
}
.tafel-klein { font-size: 12.5px; line-height: 1.5; color: var(--tinte-2); }
.tafel-mehr { font-size: 14.5px; font-weight: 700; }

/* ---------- Kapitel 5: die fünf Zimmer fächern sich auf ---------- */
.tafel-breit { max-width: 1240px; }
.tafel-kopf { max-width: 720px; }
.faecher { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 10px; }
.faecher li { position: relative; }
.faecher a {
  display: grid; grid-template-columns: minmax(96px, 36%) 1fr; height: 100%;
  text-decoration: none; color: var(--tinte);
  background: var(--weiss); border: 1px solid var(--linie); transition: border-color .3s, box-shadow .3s;
}
.faecher a:hover, .faecher a:focus-visible { border-color: var(--sand-dunkel); box-shadow: 0 18px 36px -26px rgba(24, 33, 46, .45); }
.faecher-bild { position: relative; display: block; min-height: 112px; overflow: hidden; background: var(--papier-2); }
.faecher-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.faecher a:hover .faecher-bild img { transform: scale(1.045); }
.faecher-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; padding: 12px 14px 13px; }
.faecher-name { font: 300 19px/1.15 var(--head); overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
.faecher-fakten { font-size: 13.5px; color: var(--tinte-2); }
.faecher-preis { margin-top: 4px; font-size: 12.5px; color: var(--tinte-2); }
.faecher-preis b { margin: 0 .3em; font: 300 21px/1.1 var(--head); color: var(--tinte); white-space: nowrap; }
.faecher-los { margin-top: 6px; font-size: 13.5px; font-weight: 700; letter-spacing: .02em; color: var(--sand-dunkel); }
.tafel-fuss { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 18px !important; font-size: 13px; color: var(--tinte-2); }
.tafel-fuss a { font-weight: 700; }

/* ---------- Ab Tablet ---------- */
@media (min-width: 761px) {
  .tafel { padding: 30px 32px 32px; }
  .tafel h1 { font-size: clamp(36px, 4.6vw, 62px); }
  .tafel h2 { font-size: clamp(30px, 3.4vw, 46px); }
  .tafel .lead, .tafel-text { font-size: clamp(16.5px, 1.2vw, 18.5px); }
  .tafel-held { max-width: 760px; }
  .tafel-knoepfe .knopf { flex: 0 0 auto; }
}
@media (min-width: 900px) {
  .kap { align-items: center; min-height: 132svh; }
  .kap-held { display: flex; align-items: flex-end; justify-content: flex-end; min-height: 100svh; padding-top: calc(var(--kopf-h) + 16px); padding-bottom: clamp(28px, 7svh, 80px); }
  /* Tafel auf die Seite, auf der das Foto nichts Wichtiges zeigt */
  .kap-rechts { justify-content: flex-end; }
  .story-nav ol { display: flex; }
}
@media (min-width: 1081px) {
  .faecher { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
  .faecher a { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .faecher-bild { aspect-ratio: 4 / 5; min-height: 0; }
  .faecher-text { padding: 16px 16px 18px; }
  .faecher-name { font-size: 21px; }
  .faecher-preis { margin-top: 10px; }
  .faecher-preis b { display: block; margin: 2px 0; font-size: 26px; }
  .faecher-los { margin-top: auto; padding-top: 12px; }
  /* Fächer: liegen erst als Stapel in der Mitte, dann ziehen sie auseinander (lage.js setzt .vorher/.auf) */
  .faecher.vorher li { transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
  .faecher.vorher:not(.auf) li { transform: translateX(calc((2 - var(--i, 0)) * (100% + 16px))) rotate(calc((var(--i, 0) - 2) * 3deg)); }
}
@media (max-width: 1080px) {
  .faecher.vorher li { transition: transform .8s var(--ease), opacity .8s; transition-delay: calc(var(--i, 0) * 70ms); }
  .faecher.vorher:not(.auf) li { transform: translateY(18px); opacity: .001; }
}
@media (max-width: 420px) {
  .faecher a { grid-template-columns: minmax(72px, 30%) 1fr; }
  .faecher-name { font-size: 18px; }
}
@media (max-width: 760px) {
  .story-nav { top: calc(var(--kopf-h) + 10px); }
  .hoehe { padding: 5px 9px 7px; }
  .hoehe b { font-size: 20px; }
  .hoehe small { font-size: 9.5px; }
}

/* ---------- Auf einen Blick (Erweiterung zu .steckbrief aus zimmer.css) ---------- */
.lage-fakten dd { overflow-wrap: break-word; }

/* ---------- Link zum Vergleich ---------- */
.lage-vergleich { padding: clamp(56px, 8vw, 110px) var(--rand); background: var(--papier); border-top: 1px solid var(--linie); }
.lage-vergleich-link {
  display: block; max-width: 1200px; margin: 0 auto; padding: clamp(26px, 4vw, 48px) 0;
  text-decoration: none; color: var(--tinte); border-top: 1px solid var(--tinte); border-bottom: 1px solid var(--linie-2);
}
.lage-vergleich-link .eyebrow { display: block; }
.lage-vergleich-titel {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  font: 300 clamp(34px, 6vw, 80px)/1.04 var(--head); letter-spacing: .01em;
}
.lage-vergleich-titel i { flex: none; font-style: normal; color: var(--sand-dunkel); transition: transform .45s var(--ease); }
.lage-vergleich-link:hover .lage-vergleich-titel i, .lage-vergleich-link:focus-visible .lage-vergleich-titel i { transform: translateX(12px); }
.lage-vergleich-link:hover .lage-vergleich-titel { color: var(--sand-dunkel); }
.lage-vergleich-text { display: block; max-width: 640px; margin-top: 14px; color: var(--tinte-2); }

/* ---------- Kompakte Zimmerliste ---------- */
.lage-liste { padding: clamp(56px, 8vw, 110px) var(--rand); background: var(--weiss); border-top: 1px solid var(--linie); }
.lage-liste-innen { max-width: 1200px; margin: 0 auto; }
.lage-liste h2 { font-size: clamp(30px, 3.6vw, 48px); }
.kurzliste { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--linie); }
.kurzliste a {
  display: grid; grid-template-columns: 96px 1fr auto; column-gap: 20px; row-gap: 2px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--linie); text-decoration: none; color: inherit;
}
.kurzliste img { grid-column: 1; grid-row: 1 / span 2; width: 96px; height: 72px; object-fit: cover; background: var(--papier-2); }
.kurzliste-name { grid-column: 2; align-self: end; font: 300 clamp(20px, 2vw, 26px)/1.15 var(--head); transition: color .2s; }
.kurzliste-fakten { grid-column: 2; align-self: start; font-size: 14px; color: var(--tinte-2); }
.kurzliste-preis { grid-column: 3; grid-row: 1 / span 2; text-align: right; font-size: 12.5px; color: var(--tinte-2); white-space: nowrap; }
.kurzliste-preis b { display: block; font: 300 24px/1.05 var(--head); color: var(--tinte); }
.kurzliste a:hover .kurzliste-name, .kurzliste a:focus-visible .kurzliste-name { color: var(--sand-dunkel); }
.lage-liste .preis-klein { margin-top: 18px; }
@media (max-width: 560px) {
  .kurzliste a { grid-template-columns: 72px 1fr; column-gap: 14px; }
  .kurzliste img { grid-row: 1 / span 3; width: 72px; height: 56px; align-self: start; }
  .kurzliste-preis { grid-column: 2; grid-row: auto; text-align: left; white-space: normal; }
  .kurzliste-preis b { display: inline; margin: 0 .25em; font-size: 19px; }
}

/* ---------- Weniger Bewegung: stehende Bilder, kein Fächer ---------- */
@media (prefers-reduced-motion: reduce) {
  .story-bild, .story-bild video { transition: none; }
  .story-bild img, .story-bild video { animation: none; transform: none; }
  .faecher.vorher li, .faecher.vorher:not(.auf) li { transform: none; opacity: 1; transition: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Hinweis auf animierte Schleifen aus Originalfotos ("KI-animiert" bzw. "Animiert", je nach Herstellung) */
.story-ki { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 4px 9px; background: rgba(255, 255, 255, .86); color: #5a6472; font-size: 11px; letter-spacing: .06em; opacity: 0; transition: opacity .8s; pointer-events: none; }
.story-bild.mit-video .story-ki { opacity: 1; }
