/* seite.css · lp-210 HRUBY PETRAS, Kanzlei für Creator (Beispiel).
 * Papier, Tinte, ein Textmarker. Bewegung in jedem Abschnitt: Marker im Kopf, Stapel der 14 Seiten, Zahlen kippen,
 * Rechnungszeilen, Blatt legt sich gerade, Altbau-Licht. Regelbruch (D26): die Unterschrift läuft über den Rand ins Foto. */

@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("../fonts/satoshi-var.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  --tinte: #121c40;
  --papier: #f3f1eb;
  --weiss: #fffefb;
  --marker: #e8ff3a;
  --t-titel: clamp(2.05rem, 1.05rem + 3.4vw, 4.25rem);
  --t-h2: clamp(1.75rem, 1.15rem + 2.1vw, 3.1rem);
  --t-d3: clamp(1.25rem, 1rem + 1vw, 1.75rem);   /* dritte und letzte Stufe der Display-Schrift */
  --schatten-papier: 0 1px 2px rgba(10, 14, 32, 0.18), 0 20px 44px -20px rgba(10, 14, 32, 0.5);
}
body { font-weight: 450; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.025em; }
:focus-visible { outline-color: var(--tinte); }
.marke { font-weight: 700; font-size: 1rem; letter-spacing: 0.02em; }

/* Knopf: Tinte mit Markergelb, auf Papier gut sichtbar; Hover legt einen Markerrand an */
.knopf { background: var(--tinte); color: var(--marker); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .knopf:hover { box-shadow: 0 0 0 4px var(--marker), 0 0 0 5.5px var(--tinte); } }
.knopf:focus-visible { outline: 3px solid var(--tinte); outline-offset: 4px; }

/* ---------- 1 · Kopf: Schrift oben auf dem Papier, darunter das breite Foto des Vertrags */
.anfang { display: grid; grid-template-rows: auto 1fr; align-items: stretch; min-height: 100svh; padding-top: calc(var(--kopf-hoehe) + clamp(12px, 4vh, 56px)); overflow: clip; }
.anfang-text { position: relative; z-index: 2; }
.titel { position: relative; z-index: 0; isolation: isolate; font-size: var(--t-titel); line-height: 1.04; letter-spacing: -0.035em; max-width: 19ch; }
.mark { position: relative; white-space: nowrap; }
.mark::before { content: ""; position: absolute; z-index: -1; left: -0.1em; right: -0.12em; top: 0.48em; height: 0.56em; background: var(--marker); border-radius: 0.1em 0.35em 0.2em 0.4em; transform-origin: 0 50%; transform: rotate(-1.2deg) scaleX(var(--m, 1)); }
.anfang-zeile { display: grid; gap: 22px clamp(28px, 5vw, 80px); margin-top: clamp(20px, 3.2vh, 36px); align-items: end; }
@media (min-width: 960px) { .anfang-zeile { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.unterzeile { margin-top: 0; max-width: 31rem; color: var(--text-2); }
.beleg { margin-top: 12px; max-width: 31rem; }
.anfang .handlung { margin-top: 0; }
.anfang .beruhigung { max-width: 26rem; }
.anfang-bild { position: relative; z-index: 1; margin: clamp(-48px, -4vh, -16px) 0 0; min-height: 30svh; overflow: hidden; }
.anfang-bild img { position: absolute; inset: -6% 0 0 0; width: 100%; height: 106%; object-fit: cover; object-position: 50% 72%; -webkit-mask-image: linear-gradient(to bottom, transparent 0, transparent 9%, #000 36%); mask-image: linear-gradient(to bottom, transparent 0, transparent 9%, #000 36%); transform: translateY(calc(var(--p, 0) * 9%)) scale(calc(1 + var(--p, 0) * 0.05)); }
@media (max-width: 959px) {
  .anfang-bild { min-height: 34svh; margin-top: 8px; }
  .anfang-bild img { object-position: 46% 78%; }
}

/* ---------- 2 · Stapel: Tintenblaue Bühne, 14 weiße Seiten. Ohne JavaScript und in der ruhigen Fassung: die drei Seiten nebeneinander. */
.seiten { position: relative; background: var(--tinte); color: #eef0f8; }
.js .seiten { height: 300svh; }
.seiten-buehne { padding-block: var(--abstand); }
.js .seiten-buehne { position: sticky; top: 0; height: 100svh; padding-block: calc(var(--kopf-hoehe) + 8px) 24px; overflow: hidden; }
.seiten-raster { display: grid; gap: 28px; height: 100%; }
@media (min-width: 960px) { .seiten-raster { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(32px, 5vw, 80px); } }
.seiten h2 { font-size: var(--t-h2); max-width: 16ch; color: #fbfbf4; }
.seiten-satz { margin-top: 16px; max-width: 26rem; color: #c6cbe0; }
.stellen { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 18px; max-width: 28rem; }
.stellen li { color: #c6cbe0; transition: opacity 0.4s ease; }
.stellen strong { display: block; width: fit-content; margin: 2px 0 2px -0.15em; padding: 0 0.15em; color: #fbfbf4; font-weight: 700; transition: background-color 0.4s ease, color 0.4s ease; }
.stelle-ort { display: block; font-size: 0.85rem; color: #aab1cc; }
.js .seiten.laeuft .stellen li { opacity: 0.38; }
.js .seiten.laeuft .stellen li.aktiv { opacity: 1; }
.js .seiten.laeuft .stellen li.aktiv strong { background: var(--marker); color: var(--tinte); }

.stapel { position: relative; display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; min-height: 0; }
.blatt { width: min(600px, 86vw); aspect-ratio: 210 / 297; overflow: hidden; padding: 34px 38px 40px; background: var(--weiss); color: #1d2130; border-radius: 6px; box-shadow: var(--schatten-papier); font-size: 17px; line-height: 1.6; }
.blatt p + p { margin-top: 12px; }
.blatt-kopf { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 26px; font-size: 13px; color: #6b6f80; letter-spacing: 0.02em; }
.blatt-titel { margin-bottom: 14px; font-weight: 750; font-size: 19px; }
.blatt-unterschrift { margin-top: 48px !important; padding-top: 8px; border-top: 1px solid #b9bccb; width: 60%; font-size: 13px; color: #6b6f80; }
.blatt-mark { background-image: linear-gradient(var(--marker), var(--marker)); background-repeat: no-repeat; background-position: 0 58%; background-size: calc(var(--s, 1) * 100%) 0.95em; padding: 0 0.1em; }
/* ohne JavaScript: nur die drei Seiten, verkleinert nebeneinander */
html:not(.js) .blatt:not(.blatt--stelle), .ruhig-stapel .blatt:not(.blatt--stelle) { display: none; }
html:not(.js) .blatt--stelle, .ruhig-stapel .blatt--stelle { width: min(360px, 100%); font-size: 14px; padding: 24px; }
/* mit JavaScript: alle Seiten liegen absolut in der Bühne, stapel.js setzt Lage und Größe */
.js .seiten:not(.ruhig-stapel) .stapel { display: block; height: 100%; min-height: 46svh; }
.js .seiten:not(.ruhig-stapel) .blatt { position: absolute; left: 50%; top: 50%; margin: 0; transform-origin: 50% 50%; backface-visibility: hidden; }
@media (max-width: 959px) {
  .js .seiten-raster { grid-template-rows: auto 1fr auto; gap: 14px; }
  .js .seiten h2 { font-size: 1.6rem; }
  .js .seiten-satz { display: none; }
  .js .stellen { order: 3; margin: 0; }
  .js .seiten.laeuft .stellen li:not(.aktiv) { display: none; }
  .js .seiten:not(.laeuft) .stellen { display: none; }
  .js .stapel { order: 2; }
  .blatt { padding: 26px 26px 30px; font-size: 16px; }
}

.js .seiten.ruhig-stapel { height: auto; }
.js .ruhig-stapel .seiten-buehne { position: static; height: auto; padding-block: var(--abstand); overflow: visible; }
@media (max-width: 959px) { .js .seiten.ruhig-stapel .stellen { display: grid; } .js .ruhig-stapel .seiten-satz { display: block; } }

/* ---------- 3 · Wende: großes Makrofoto, drei Zahlen kippen, die Unterschrift läuft über den Rand ins Foto */
.wende-raster { display: grid; gap: clamp(32px, 5vw, 88px); align-items: center; }
@media (min-width: 960px) { .wende-raster { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); } }
.wende-bild { position: relative; margin: 0; aspect-ratio: 3 / 4; max-height: 88svh; overflow: hidden; border-radius: 14px; }
.wende-bild img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.1 - var(--p, 1) * 0.1)); transform-origin: 30% 40%; }
.wende h2 { font-size: var(--t-h2); max-width: 14ch; }
.wende-satz { margin-top: 18px; max-width: 30rem; color: var(--text-2); }
.kippen { margin: 36px 0 0; display: grid; gap: 0; max-width: 34rem; }
.kipp { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 16px; padding: 18px 0; border-top: 1px solid var(--linie); }
.kipp:last-child { border-bottom: 1px solid var(--linie); }
@media (max-width: 520px) { .kipp { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.kipp dt { color: var(--text-2); }
.kipp dd { margin: 0; display: flex; align-items: baseline; gap: 18px; font-family: var(--schrift-display); font-weight: 700; }
.vorher { position: relative; text-decoration: none; color: #565c76; font-size: 1rem; font-weight: 500; }
.vorher::after { content: ""; position: absolute; left: -4px; right: -4px; top: 52%; height: 3px; background: var(--tinte); border-radius: 2px; transform-origin: 0 50%; transform: scaleX(clamp(0, calc((var(--p, 1) - 0.22 - var(--i) * 0.06) / 0.06), 1)); }
.nachher { display: inline-block; overflow: hidden; vertical-align: bottom; font-size: var(--t-d3); line-height: 1.15; }
.nachher > span { display: inline-block; padding: 0 0.12em; background: var(--marker); transform: translateY(calc((1 - clamp(0, calc((var(--p, 1) - 0.25 - var(--i) * 0.06) / 0.06), 1)) * 110%)); }
.kipp[data-i="0"] { --i: 0; } .kipp[data-i="1"] { --i: 1; } .kipp[data-i="2"] { --i: 2; }
.unterschrift { position: relative; margin-top: 30px; }
.unterschrift svg { display: block; width: min(420px, 100%); height: auto; overflow: visible; }
@media (min-width: 960px) { .unterschrift svg { width: 520px; margin-left: clamp(-180px, -12vw, -90px); } }
.unterschrift path { fill: none; stroke: var(--tinte); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - clamp(0, calc((var(--p, 1) - 0.4) / 0.14), 1)); }
.unterschrift-zeile { margin-top: 6px; font-size: var(--t-klein); color: var(--text-3); }

/* ---------- 4 · Preise wie eine Rechnung, auf Markergelb */
.preise { background: var(--marker); color: var(--tinte); padding-block: var(--abstand); }
.preise h2 { font-size: var(--t-h2); max-width: 16ch; }
.preise-satz { margin-top: 16px; max-width: 34rem; color: #2a3156; }
.rechnung { list-style: none; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; border-top: 2px solid var(--tinte); }
.posten { display: grid; gap: 10px 32px; padding: clamp(22px, 3vw, 34px) 0; border-bottom: 1px solid rgba(18, 28, 64, 0.35); transform: translateX(calc((1 - clamp(0, calc((var(--p, 1) - 0.12 - var(--i) * 0.06) / 0.16), 1)) * 12vw)); opacity: clamp(0, calc((var(--p, 1) - 0.1 - var(--i) * 0.06) / 0.12), 1); }
.posten[data-i="0"] { --i: 0; } .posten[data-i="1"] { --i: 1; } .posten[data-i="2"] { --i: 2; }
@media (min-width: 860px) { .posten { grid-template-columns: minmax(0, 1fr) 12rem minmax(10rem, auto); align-items: baseline; } }
.posten h3 { font-size: var(--t-d3); }
.posten-was p { margin-top: 6px; max-width: 34rem; color: #2a3156; }
.posten-zeit { font-weight: 650; }
.posten-preis { text-align: left; font-family: var(--schrift-display); font-weight: 700; font-size: var(--t-h2); line-height: 1; white-space: nowrap; }
@media (min-width: 860px) { .posten-preis { text-align: right; } }
.posten-preis span { position: relative; display: inline-block; }
.posten-preis span::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 4px; background: var(--tinte); border-radius: 2px; transform-origin: 0 50%; transform: scaleX(clamp(0, calc((var(--p, 1) - 0.3 - var(--i) * 0.06) / 0.12), 1)); }
.posten-preis small { display: block; margin-top: 16px; font-family: var(--schrift-text); font-size: 0.9rem; font-weight: 600; white-space: normal; }

/* ---------- 5 · Formular auf einem Blatt, das sich beim Scrollen gerade legt */
.vertrag-raster { display: grid; gap: clamp(32px, 5vw, 96px); align-items: start; }
@media (min-width: 960px) { .vertrag-raster { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); } }
.vertrag h2 { font-size: var(--t-h2); max-width: 12ch; }
.vertrag .abschnitt-satz { font-size: var(--t-text); margin-bottom: 26px; }
.vertrag .direkt a { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); font-weight: 650; }
.vertrag .direkt p { color: var(--text-2); }
.vertrag-blatt { max-width: none; padding: clamp(24px, 4vw, 48px); background: var(--weiss); border-radius: 6px; box-shadow: var(--schatten-papier); transform: rotate(calc((1 - clamp(0, calc((var(--p, 1) - 0.08) / 0.3), 1)) * -2.4deg)) translateY(calc((1 - clamp(0, calc((var(--p, 1) - 0.08) / 0.3), 1)) * 40px)); }
.vertrag-blatt .feld input, .vertrag-blatt .feld textarea { background-color: var(--papier); }
.feld input[type="file"] { padding: 10px; cursor: pointer; }
.feld-hinweis { font-size: var(--t-klein); color: var(--text-3); }
.feld input[type="file"]::file-selector-button { margin-right: 14px; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--tinte); color: var(--marker); font: inherit; font-weight: 650; cursor: pointer; }
@media (min-width: 700px) { .vertrag-blatt { grid-template-columns: 1fr 1fr; column-gap: 20px; } .vertrag-blatt .handlung { grid-column: 1 / -1; } }

/* ---------- 6 · Schluss: Altbau-Foto, Text auf der hellen Wand */
.kanzlei { position: relative; overflow: clip; }
.kanzlei-bild { margin: 0; position: relative; overflow: hidden; aspect-ratio: 16 / 9; max-height: 100svh; width: 100%; }
.kanzlei-bild img { width: 100%; height: 112%; object-fit: cover; object-position: 70% 50%; transform: translateY(calc((var(--p, 1) - 0.5) * -10%)); }
.kanzlei-text { padding-block: clamp(32px, 5vw, 56px) var(--abstand); }
@media (max-width: 959px) { .kanzlei-bild { aspect-ratio: 4 / 3; } }
.kanzlei h2 { font-size: var(--t-h2); max-width: 12ch; }
.menschen { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; max-width: 30rem; }
.menschen li { color: var(--text-2); transform: translateX(calc((1 - clamp(0, calc((var(--p, 1) - 0.25) / 0.2), 1)) * -24px)); }
.menschen li + li { transform: translateX(calc((1 - clamp(0, calc((var(--p, 1) - 0.3) / 0.2), 1)) * -24px)); }
.menschen strong { display: block; color: var(--text); font-weight: 750; }
.kanzlei-ort { margin-top: 18px; color: var(--text-2); }
.schluss { margin: 28px 0 24px; max-width: 22ch; font-family: var(--schrift-display); font-weight: 500; font-size: var(--t-d3); line-height: 1.25; }
@media (min-width: 960px) {
  .kanzlei-bild { position: absolute; inset: 0; aspect-ratio: auto; max-height: none; height: 100%; }
  .kanzlei { min-height: 100svh; display: grid; align-items: center; }
  .kanzlei-text { position: relative; z-index: 1; padding-block: calc(var(--kopf-hoehe) + 40px) 64px; }
  .kanzlei-text > * { max-width: min(32rem, 40vw); }
}

/* Bewegte Teile (Zeilen fahren von rechts ein, Blatt kippt) dürfen die Seite nie breiter machen */
.wende, .preise, .vertrag { overflow-x: clip; }

/* ---------- Fußzeile */
.fuss { background: var(--papier); }

/* ---------- Ruhige Fassung: alles an seinem Endplatz */
@media (prefers-reduced-motion: reduce) {
  .anfang-bild img, .wende-bild img, .kanzlei-bild img, .posten, .menschen li, .vertrag-blatt, .nachher > span { transform: none !important; opacity: 1 !important; }
  .vorher::after, .posten-preis span::after { transform: none !important; }
  .unterschrift path { stroke-dashoffset: 0 !important; }
}
