/* seite.css · Bestattung Lindenhof (Beispiel). Gebaut nach dem Skill motionsites-web-builder:
 * ein Wiedererkennungsmerkmal (das Fenster öffnet sich), ruhige Oberfläche, Serif-Akzent in der Überschrift.
 * Bauanleitung: 20_Werkstatt/lp-220-lindenhof/SPEC.md */

@font-face { font-family: "Plus Jakarta Sans"; src: url("../fonts/plus-jakarta-sans-var.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/cormorant-garamond-500-kursiv.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }

:root {
  --ein: cubic-bezier(0.22, 1, 0.36, 1);
  --rund-bild: 22px;
  --t-riesig: clamp(2.35rem, 1rem + 4.3vw, 5rem);
  --t-gross: clamp(2rem, 1.2rem + 2.9vw, 4rem);
}
::selection { background: rgba(53, 80, 196, 0.22); }
h1, h2, h3 { font-weight: 400; letter-spacing: -0.035em; }
h1 em, h2 em { font-family: var(--schrift-akzent); font-style: italic; font-weight: 500; font-size: 1.14em; letter-spacing: -0.02em; line-height: 0.8; color: var(--text-3); }

/* Etikett: kleine Zeile in Großbuchstaben mit Strich davor */
.etikett { display: flex; align-items: center; gap: 14px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.etikett::before { content: ""; width: 40px; height: 1px; background: currentColor; opacity: 0.6; }

.ikon { width: 1.15em; height: 1.15em; flex: none; }
.textlink { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 6px; color: var(--text); font-weight: 560; text-decoration: none; }
.textlink .ikon { transition: transform 0.3s var(--ein); }
@media (hover: hover) and (pointer: fine) { .textlink:hover .ikon { transform: translateX(3px); } }

/* ---------- Kopfzeile: ohne Unschärfe (auf Intel teuer), dafür fast deckender Grund */
.kopf-fest .kopfzeile { backdrop-filter: none; }
.marke { gap: 10px; font-weight: 600; font-size: 1.12rem; }
.marke-zeichen { width: 18px; height: 22px; color: var(--akzent); }
.menue a { font-size: 0.92rem; }
.kopf-tel { gap: 8px; }
@media (max-width: 860px) {
  .kopfzeile .kopf-tel { display: inline-flex; width: 44px; padding: 0; font-size: 0; gap: 0; }
  .kopfzeile .kopf-tel .ikon { width: 20px; height: 20px; }
}

/* ---------- Erster Bildschirm: Fensteröffnung, die sich öffnet
 * --o 0 → 1: Öffnung wächst bis zum Rand · --k 0 → 1: Kopftext tritt zurück · --z 0 → 1: zweiter Satz erscheint
 * Ohne JavaScript und in der ruhigen Fassung bleiben alle drei bei 0: das Fenster steht, alles ist lesbar. */
.fenster-buehne { position: relative; height: 200svh; }
.fenster-halt { --o: 0; --k: 0; --z: 0; position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.oeffnung {
  --t0: 15vh; --b0: 13vh; --r0: var(--kante); --breite: min(33vw, 500px);
  --l0: calc(100% - var(--kante) - var(--breite)); --bogen: calc(var(--breite) / 2); --fuss: 18px;
  position: absolute; inset: 0; z-index: 1; background: var(--grund-2);
  clip-path: inset(calc(var(--t0) * (1 - var(--o))) calc(var(--r0) * (1 - var(--o))) calc(var(--b0) * (1 - var(--o))) calc(var(--l0) * (1 - var(--o)))
    round calc(var(--bogen) * (1 - var(--o))) calc(var(--bogen) * (1 - var(--o))) calc(var(--fuss) * (1 - var(--o))) calc(var(--fuss) * (1 - var(--o))));
}
/* Am Anfang ist das Bild nach rechts geschoben, damit Fenster und Stuhl in der Öffnung stehen; beim Öffnen gleitet es an seinen Platz */
.oeffnung img { --dx: 37vw; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; transform: translateX(calc(var(--dx) * (1 - var(--o)))) scale(calc(1.12 - 0.12 * var(--o))); transform-origin: 60% 55%; }
.oeffnung-schatten { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 42%, rgba(10, 18, 13, 0.5)); opacity: var(--z); }

.anfang-text { position: relative; z-index: 10; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(40px, 10vh, 112px);
  opacity: calc(1 - var(--k)); transform: translateY(calc(var(--k) * -48px)); }
.anfang-text > :not(.titel) { max-width: min(46%, 640px); }
.anfang-text .etikett { margin-bottom: 26px; }
.titel { font-size: var(--t-riesig); line-height: 1; letter-spacing: -0.045em; }
.titel .zeile { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.titel .zeile > span { display: block; }
@media (min-width: 960px) { .titel .zeile > span { white-space: nowrap; } }
.titel em { font-size: 1.16em; }
.unterzeile { max-width: 30rem; margin-top: 26px; font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem); line-height: 1.55; color: var(--text-2); }
.handlung { margin-top: 30px; gap: 10px 18px; }
.beruhigung { margin-top: 4px; }
.beleg { margin-top: 22px; font-size: 0.86rem; color: var(--text-3); }
.beleg strong { font-weight: 600; }

.zweiter-satz { position: absolute; z-index: 10; left: var(--kante); right: var(--kante); bottom: clamp(48px, 13vh, 140px); margin: 0; color: #f6f7f0;
  font-size: clamp(2rem, 1rem + 4vw, 4.6rem); line-height: 1.02; letter-spacing: -0.04em; text-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
  opacity: var(--z); transform: translateY(calc((1 - var(--z)) * 32px)); pointer-events: none; }
.zweiter-satz span { display: block; }
.zweiter-satz span + span { font-family: var(--schrift-akzent); font-style: italic; font-weight: 500; font-size: 1.12em; letter-spacing: -0.02em; opacity: 0.86; }

/* Einlauf beim Laden: Zeilen steigen aus ihrer Maske, der Rest folgt in festem Takt */
@keyframes steigen { from { transform: translateY(105%); } to { transform: none; } }
@keyframes kommen { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes aufziehen { from { opacity: 0; } to { opacity: 1; } }
.js .titel .zeile > span { animation: steigen 0.95s var(--ein) both; animation-delay: 0.22s; }
.js .titel .zeile + .zeile > span { animation-delay: 0.34s; }
.js .anfang-text .einlauf { animation: kommen 0.9s var(--ein) both; }
.js .anfang-text .etikett.einlauf { animation-delay: 0.1s; }
.js .anfang-text .unterzeile { animation-delay: 0.5s; }
.js .anfang-text .handlung { animation-delay: 0.62s; }
.js .anfang-text .beleg { animation-delay: 0.74s; }
.js .oeffnung img { animation: aufziehen 1.2s ease-out both; }

/* Handy: Öffnung oben in der Mitte, Text darunter */
@media (max-width: 959px) {
  .fenster-buehne { height: 175svh; }
  .oeffnung { --t0: 80px; --breite: min(62vw, 300px); --b0: calc(100% - 80px - clamp(170px, 32svh, 300px)); --r0: calc((100% - var(--breite)) / 2); --l0: var(--r0); --fuss: 14px; }
  .oeffnung img { --dx: 30vw; object-position: 32% 50%; }
  .anfang-text > :not(.titel) { max-width: 100%; }
  .anfang-text { padding-bottom: 28px; }
  .anfang-text .etikett { margin-bottom: 16px; }
  .titel { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.2rem); }
  .unterzeile { margin-top: 16px; font-size: 1rem; line-height: 1.5; }
  .handlung { margin-top: 20px; }
  .beleg { margin-top: 14px; font-size: 0.8rem; }
}
@media (max-width: 959px) and (max-height: 700px) { .beleg { display: none; } .oeffnung { --b0: calc(100% - 76px - 150px); --t0: 76px; } }
/* Kleines, flaches Fenster (quer gehaltenes Handy, kleines Laptopfenster): Öffnung als schmale Spalte rechts, Text links */
@media (max-width: 959px) and (max-height: 560px) and (min-width: 560px) {
  .oeffnung { --t0: 78px; --b0: 22px; --breite: 30vw; --r0: var(--rand); --l0: calc(100% - var(--rand) - var(--breite)); --bogen: 15vw; }
  .oeffnung img { --dx: 40vw; }
  .anfang-text > *, .anfang-text > :not(.titel) { max-width: 58%; }
  .titel { font-size: 2rem; }
  .anfang-text .etikett { margin-bottom: 10px; }
  .unterzeile { margin-top: 10px; font-size: 0.95rem; }
  .handlung { margin-top: 14px; }
  .beleg, .beruhigung { display: none; }
}
@media (min-width: 960px) and (max-height: 760px) { .oeffnung { --t0: 13vh; --b0: 9vh; } .anfang-text { padding-bottom: 7vh; } .unterzeile { margin-top: 18px; } }

/* ---------- Die ersten Stunden: dunkle Fläche, Bild bleibt stehen, Schritte ziehen vorbei */
.kapitel { background: var(--wald); color: var(--auf-wald); padding-block: var(--abstand) clamp(56px, 7vw, 112px); }
.kapitel :focus-visible, .rueckruf :focus-visible { outline-color: var(--auf-wald); }
.kapitel .etikett, .rueckruf .etikett { color: rgba(238, 240, 230, 0.62); }
.kapitel h2 em, .rueckruf h2 em { color: rgba(238, 240, 230, 0.6); }
.kapitel-kopf h2 { font-size: var(--t-gross); max-width: 15ch; }
.kapitel-raster { display: grid; gap: clamp(32px, 5vw, 88px); margin-top: clamp(40px, 6vw, 80px); }
.kapitel-bilder { display: none; }
.schritt { padding-bottom: 56px; }
.schritt-bild { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--rund-bild); margin-bottom: 22px; }
.schritt-nr { display: block; font-family: var(--schrift-akzent); font-style: italic; font-weight: 500; font-size: 3.4rem; line-height: 0.9; color: rgba(238, 240, 230, 0.5); }
.schritt h3 { margin-top: 14px; font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem); font-weight: 500; letter-spacing: -0.02em; }
.schritt p { margin-top: 16px; max-width: 30rem; font-size: clamp(1.04rem, 0.98rem + 0.25vw, 1.18rem); line-height: 1.62; color: rgba(238, 240, 230, 0.76); }
.kapitel-liste { list-style: none; margin: 0; padding: 0; }

@media (min-width: 960px) {
  .kapitel-raster { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); align-items: start; }
  .kapitel-bilder { display: block; position: sticky; top: calc(var(--kopf-hoehe) + 4vh); height: calc(100vh - var(--kopf-hoehe) - 8vh); max-height: 760px; border-radius: var(--rund-bild); overflow: hidden; background: #26342c; }
  .kbild { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1s ease; }
  .kbild img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.8s var(--ein); }
  .kbild[data-nr="1"] img { object-position: 42% 60%; }
  .kbild[data-nr="4"] img { object-position: 34% 50%; }
  .kbild.ist-aktiv { opacity: 1; }
  .kbild.ist-aktiv img { transform: none; }
  .kbild-zaehler { position: absolute; left: 22px; bottom: 18px; padding: 6px 14px; border-radius: 999px; background: rgba(20, 30, 24, 0.72); color: var(--auf-wald); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
  .schritt-bild { display: none; }
  .kapitel-liste { position: relative; padding-left: 34px; padding-bottom: 22vh; }
  .kapitel-liste::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 22vh; width: 1px; background: rgba(238, 240, 230, 0.16); }
  .schritt { position: relative; min-height: 64vh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 0; opacity: 0.3; transition: opacity 0.6s ease; }
  .schritt:first-child { min-height: 52vh; justify-content: flex-start; padding-top: 4vh; }
  .schritt::before { content: ""; position: absolute; left: -38px; top: 50%; width: 9px; height: 9px; border-radius: 50%; background: var(--wald); box-shadow: 0 0 0 1px rgba(238, 240, 230, 0.4); transition: background-color 0.4s ease, box-shadow 0.4s ease; }
  .schritt:first-child::before { top: calc(4vh + 22px); }
  .schritt.ist-aktiv { opacity: 1; }
  .schritt.ist-aktiv::before { background: var(--akzent); box-shadow: 0 0 0 1px var(--akzent), 0 0 0 6px rgba(53, 80, 196, 0.25); }
  .schritt-nr { font-size: 5.2rem; }
}
html:not(.js) .schritt { opacity: 1; }

/* ---------- Zwischensatz: Wörter füllen sich mit Tinte (--p kommt aus bewegung.js, Rückfall 1 = alles gefüllt) */
.zwischensatz { padding-block: clamp(96px, 16vw, 220px); }
.tinte { max-width: 24ch; font-size: clamp(1.75rem, 1rem + 2.9vw, 3.3rem); line-height: 1.16; letter-spacing: -0.03em; text-align: left; }
.tinte .wort { opacity: clamp(0.2, calc((var(--p, 1) * 1.9 - 0.32 - var(--i, 0) / var(--n, 1)) * 7), 1); }

/* ---------- Kosten: Urne mit Jahresringen, drei aufklappbare Zeilen */
.kosten { padding-block: 0 var(--abstand); overflow-x: clip; }
.kosten-raster { display: grid; gap: clamp(40px, 6vw, 96px); }
.kosten-bild { position: relative; width: min(100%, 480px); justify-self: center; padding: 9%; }
.kosten-bild img { position: relative; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px var(--rund-bild) var(--rund-bild); }
.ringe { position: absolute; left: 50%; top: 50%; width: 124%; height: auto; transform: translate(-50%, -50%); overflow: visible; pointer-events: none; }
.ringe circle { fill: none; stroke: var(--text); stroke-opacity: 0.14; stroke-width: 1; stroke-dasharray: 1 1; transform: rotate(-90deg); transform-origin: 200px 200px; }
.ringe circle:nth-child(1) { stroke-dashoffset: clamp(0, calc(1 - (var(--p, 1) * 2.4 - 0.25)), 1); }
.ringe circle:nth-child(2) { stroke-dashoffset: clamp(0, calc(1 - (var(--p, 1) * 2.4 - 0.4)), 1); }
.ringe circle:nth-child(3) { stroke-dashoffset: clamp(0, calc(1 - (var(--p, 1) * 2.4 - 0.55)), 1); }
.ringe circle:nth-child(4) { stroke-dashoffset: clamp(0, calc(1 - (var(--p, 1) * 2.4 - 0.7)), 1); }
.ringe circle:nth-child(5) { stroke-dashoffset: clamp(0, calc(1 - (var(--p, 1) * 2.4 - 0.85)), 1); }
.kosten-text h2 { font-size: var(--t-gross); max-width: 14ch; }
.preise { margin-top: clamp(32px, 4vw, 52px); border-top: 1px solid var(--linie); }
.preis { border-bottom: 1px solid var(--linie); }
.preis summary { list-style: none; display: grid; grid-template-columns: minmax(0, 1fr) auto 28px; align-items: center; gap: 18px; min-height: 84px; padding-block: 14px; cursor: pointer; }
.preis summary::-webkit-details-marker { display: none; }
.preis-name { font-size: clamp(1.08rem, 0.98rem + 0.45vw, 1.35rem); font-weight: 500; letter-spacing: -0.015em; }
.preis-betrag { font-family: var(--schrift-akzent); font-weight: 500; font-size: clamp(1.7rem, 1.3rem + 1.2vw, 2.3rem); line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.preis-betrag small { font-family: var(--schrift-text); font-size: 0.85rem; color: var(--text-3); margin-right: 4px; }
.preis-plus { position: relative; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--linie-feld); transition: transform 0.4s var(--ein), background-color 0.3s ease; }
.preis-plus::before, .preis-plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.preis-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.preis[open] .preis-plus { transform: rotate(45deg); background: var(--grund-2); }
@media (hover: hover) and (pointer: fine) { .preis summary:hover .preis-plus { box-shadow: inset 0 0 0 1px var(--text); } }
.preis ul { margin: 0; padding: 0 0 26px; list-style: none; display: grid; gap: 8px; color: var(--text-2); }
.preis li { position: relative; padding-left: 22px; }
.preis li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 10px; height: 1px; background: var(--akzent); }
.kosten-hinweis { margin-top: 24px; max-width: 34rem; font-size: 0.92rem; color: var(--text-3); }
@media (min-width: 960px) {
  .kosten-raster { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .kosten-bild { position: sticky; top: calc(var(--kopf-hoehe) + 6vh); justify-self: start; }
  .kosten-text { padding-top: 8vh; }
}

/* ---------- Rückruf: dunkle Fläche, große Nummer, Formular mit Wahl-Pillen */
.rueckruf { background: var(--wald); color: var(--auf-wald); padding-block: var(--abstand); --text-2: rgba(238, 240, 230, 0.74); --grund-2: #26342c; --linie-feld: #7d8a80; --text: var(--auf-wald); }
.rueckruf-raster { display: grid; gap: 56px clamp(40px, 7vw, 120px); }
.rueckruf h2 { font-size: var(--t-gross); max-width: 13ch; }
.gross-tel { display: inline-flex; margin-top: clamp(28px, 4vw, 48px); font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); letter-spacing: -0.035em; font-variant-numeric: tabular-nums; text-decoration: none; border-bottom: 1px solid rgba(238, 240, 230, 0.3); padding-bottom: 6px; transition: border-color 0.3s ease; }
@media (hover: hover) and (pointer: fine) { .gross-tel:hover { border-color: var(--auf-wald); } }
.rueckruf .direkt { margin-top: 26px; color: rgba(238, 240, 230, 0.74); }
.rueckruf .direkt a { font-size: 1rem; min-height: 44px; }
.wahl { margin: 0 0 6px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.wahl legend { margin-bottom: 12px; font-size: 0.95rem; color: var(--text-2); }
.wahl label { position: relative; cursor: pointer; }
.wahl input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wahl span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--linie-feld); font-size: 0.95rem; transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease; }
.wahl input:checked + span { background: var(--auf-wald); color: var(--wald); box-shadow: none; }
.wahl input:focus-visible + span { outline: 2px solid var(--auf-wald); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .wahl label:hover input:not(:checked) + span { box-shadow: inset 0 0 0 1px var(--auf-wald); } }
.rueckruf .feld-fehler { color: #ffb3a8; }
.rueckruf .knopf:hover { box-shadow: 0 10px 30px -12px rgba(53, 80, 196, 0.9); }
@media (min-width: 960px) { .rueckruf-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

/* Abschnitte tauchen einmal auf (js/szene.js setzt .ist-da); ohne JavaScript sofort sichtbar */
.js .auftauchen { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ein), transform 0.8s var(--ein); }
.js .auftauchen.ist-da { opacity: 1; transform: none; }

.fuss { background: var(--grund); }

@media (prefers-reduced-motion: reduce) {
  .fenster-buehne { height: auto; }
  .fenster-halt { position: relative; height: 100svh; }
  .js .auftauchen { opacity: 1; transform: none; }
  .kbild img { transform: none; }
}
