/* LAGE IT-Betreuung (Beispiel) · lp-248 · eine Datei für Startseite und Rechtliches.
   Farbwelt: Türkis (Gerät offen) wird beim Zuschrauben zu Grün (läuft). Tinte und Papier, sonst nichts.
   Schrift-Ordnung: zwei Schriften, fünf Größen, alle als Variablen (siehe 20_Werkstatt/lp-248-lage-it/SCHRIFT.md). */

@font-face { font-family: "Geist"; src: url("../fonts/geist-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-var.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }

:root {
  --auf: #25d6d0;
  --zu: #58d858;
  --tinte: #141414;
  --papier: #fffdf3;
  --grund: var(--auf);
  --rand: clamp(1.1rem, 4.4vw, 4rem);
  --kopf: 4.25rem;
  --r: 14px;
  --s-riesig: min(22vw, 42vh);
  --s-h1: clamp(2.5rem, 5.1vw, 6.5rem);
  --s-h2: clamp(1.95rem, 3.6vw, 5rem);
  --s-gross: clamp(1.1rem, 1.5vw, 1.8rem);
  --s-text: clamp(1rem, 1.18vw, 1.4rem);
  --s-klein: .8125rem;
  --schrift: "Geist", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --weich: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--auf); scroll-padding-top: var(--kopf); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--tinte); font-family: var(--schrift); font-size: var(--s-text); line-height: 1.5; font-weight: 450; overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; border-radius: 6px; }
.fuss :focus-visible { outline-color: var(--papier); }

h1, h2 { font-weight: 700; letter-spacing: -.045em; line-height: .98; text-wrap: balance; }
h1 { font-size: var(--s-h1); }
h2 { font-size: var(--s-h2); }
h3 { font-size: var(--s-gross); font-weight: 650; letter-spacing: -.015em; line-height: 1.15; }
.gross { font-size: var(--s-gross); line-height: 1.35; font-weight: 500; }
.klein { font-size: var(--s-klein); line-height: 1.45; }

.sprung { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--tinte); color: var(--papier); padding: .7rem 1rem; border-radius: 999px; }
.sprung:focus { top: 1rem; }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Knopf: ein gefüllter Typ */
.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .85rem 1.55rem; border: 0; border-radius: 999px; background: var(--tinte); color: var(--papier); font: inherit; font-weight: 600; font-size: var(--s-text); text-decoration: none; cursor: pointer; transition: transform .25s var(--weich), box-shadow .25s var(--weich); box-shadow: 0 0 0 0 var(--tinte); }
.knopf:hover { transform: translateY(-2px); box-shadow: 0 6px 0 0 rgba(20, 20, 20, .22); }
.knopf:active { transform: translateY(1px) scale(.98); box-shadow: none; }
.knopf:disabled { opacity: .55; cursor: progress; transform: none; box-shadow: none; }
.knopf--klein { min-height: 2.75rem; padding: .5rem 1.1rem; font-size: .95rem; }

/* Kopfzeile: schwebende Leiste auf Papier, damit sie über jeder Lage lesbar bleibt */
.kopf { position: fixed; z-index: 20; top: .7rem; left: calc(var(--rand) - .9rem); right: calc(var(--rand) - .9rem); display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.6rem); padding: .4rem .45rem .4rem .9rem; background: var(--papier); border-radius: 999px; box-shadow: 0 1px 0 rgba(20, 20, 20, .12), 0 10px 30px -18px rgba(20, 20, 20, .5); }
.logo { margin-right: auto; display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; font-weight: 700; letter-spacing: -.03em; font-size: 1.3rem; text-decoration: none; }
.logo-zeichen { display: grid; gap: 2px; width: 1.25rem; transform: skewX(-18deg); }
.logo-zeichen i { display: block; height: 3px; background: var(--tinte); border-radius: 1px; transition: transform .4s var(--weich); }
.logo:hover .logo-zeichen i:nth-child(1) { transform: translateY(-2px); }
.logo:hover .logo-zeichen i:nth-child(4) { transform: translateY(2px); }
.menue { display: flex; gap: clamp(.4rem, 1.6vw, 1.4rem); }
.menue a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .35rem; text-decoration: none; font-weight: 550; font-size: .98rem; }
.menue a:hover { text-decoration: underline; }
.schalter { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem; padding: 0 .3rem; border: 0; background: none; color: inherit; font-family: var(--mono); font-size: var(--s-klein); cursor: pointer; }
.schalter-bahn { position: relative; width: 2.9rem; height: 1.6rem; border-radius: 999px; background: var(--tinte); }
.schalter-knopf { position: absolute; top: .2rem; left: .2rem; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--auf); transform: translateX(1.3rem); transition: transform .35s var(--weich), background-color .35s; }
.schalter[aria-checked="false"] .schalter-knopf { transform: none; background: var(--zu); }
html:not(.bewegt) .schalter { display: none; }

/* Bühne: fest hinter dem Text, alle Lagen und Gegenstände liegen hier und werden vom Skript geführt */
.buehne { position: fixed; inset: 0; z-index: 1; overflow: clip; pointer-events: none; contain: layout style; }
html:not(.bewegt) .buehne { display: none; }
html.bewegt:not(.bereit) .buehne { visibility: hidden; }
.buehne > * { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.lage, .kopie, .ding, .vorn { max-width: none; }
.kopie, .ding, .vorn, .lupe, .lupe-wort, .marke, .riesig { opacity: 0; }
.ding, .vorn, .lupe { transform-origin: 50% 50%; }
html.bewegt .buehne { opacity: 0; transition: opacity .45s; }
html.bewegt.bereit .buehne { opacity: 1; }

.schatten { background: radial-gradient(closest-side, rgba(20, 20, 20, .42), rgba(20, 20, 20, .16) 55%, rgba(20, 20, 20, 0)); opacity: 0; }
.riesig { width: 100%; text-align: center; font-weight: 700; font-size: var(--s-riesig); line-height: .8; letter-spacing: -.055em; color: var(--papier); }
.riesig span { position: absolute; left: 0; top: 0; width: 100%; will-change: transform; }
.riesig span:nth-child(2) { color: rgba(255, 253, 243, .34); }
.riesig span:nth-child(3) { color: rgba(255, 253, 243, .2); }
.riesig span:nth-child(4) { color: rgba(255, 253, 243, .1); }
.mess { position: fixed; left: 0; top: 0; width: 0; height: 100vh; height: 100svh; visibility: hidden; pointer-events: none; }

.marke { font-family: var(--mono); font-size: var(--s-klein); font-weight: 600; white-space: nowrap; background: var(--tinte); color: var(--papier); padding: .3rem .6rem; border-radius: 6px; }
.marke::before { content: ""; position: absolute; right: 100%; top: 50%; width: 1.1rem; height: 2px; background: var(--tinte); }
.marke .marke-lang { display: none; }
.marke.lang .marke-kurz { display: none; }
.marke.lang .marke-lang { display: inline; }
.marke.lang::before { right: auto; left: 1.2rem; top: 100%; width: 2px; height: .9rem; }

.lupe { width: 14rem; height: 14rem; border-radius: 50%; overflow: hidden; background: var(--tinte); box-shadow: 0 0 0 4px var(--papier), 0 18px 40px -12px rgba(20, 20, 20, .6); }
.lupe img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; will-change: transform; }
.lupe-wort { font-family: var(--mono); font-size: var(--s-klein); font-weight: 600; white-space: nowrap; background: var(--papier); padding: .3rem .6rem; border-radius: 6px; }

/* Akte: jeder Abschnitt hält den Text fest, während die Bühne dahinter fährt */
main { position: relative; z-index: 2; }
.akt { position: relative; }
.halt { display: grid; padding: calc(var(--kopf) + 1.5rem) var(--rand) clamp(1.5rem, 6vh, 3.5rem); }
html.bewegt .akt { height: 210vh; height: 210svh; }
html.bewegt .akt--oben { height: 165vh; height: 165svh; }
html.bewegt .akt--laeuft { height: 230vh; height: 230svh; }
html.bewegt .halt { position: sticky; top: 0; height: 100vh; height: 100svh; }
html.bewegt .still { display: none; }

.text { max-width: 31rem; display: grid; gap: 1.1rem; align-content: start; }
.text--oben { align-self: end; max-width: min(36vw, 33rem); gap: 1.15rem; }
.text--oben .klein { max-width: 22rem; }
.knopfzeile { margin-top: .3rem; }
.beleg { position: absolute; right: var(--rand); bottom: clamp(1.5rem, 6vh, 3.5rem); max-width: 15rem; font-family: var(--mono); font-size: var(--s-klein); line-height: 1.45; text-align: right; }
.beleg b { display: block; font-family: var(--schrift); font-size: var(--s-h2); font-weight: 650; letter-spacing: -.04em; line-height: .9; }

.akt--station .text { align-self: center; max-width: 28rem; }
@keyframes hoch { from { opacity: 0; transform: translateY(24px); } }
html.bewegt .text--oben > *, html.bewegt .beleg { animation: hoch .75s var(--weich) both; }
html.bewegt .text--oben > :nth-child(2) { animation-delay: .08s; }
html.bewegt .text--oben > :nth-child(3) { animation-delay: .16s; }
html.bewegt .text--oben > :nth-child(4) { animation-delay: .22s; }
html.bewegt .beleg { animation-delay: .34s; }
.text-links .text { justify-self: start; }
.text-rechts .text { justify-self: end; }
.zahl { font-size: var(--s-text); font-weight: 550; display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center; max-width: 26rem; }
.zahl b { font-size: var(--s-h1); font-weight: 650; letter-spacing: -.05em; line-height: .85; font-variant-numeric: tabular-nums; min-width: 1.15em; }

.protokoll { font-family: var(--mono); font-size: clamp(.82rem, .95vw, .95rem); font-weight: 500; display: grid; gap: .45rem; }
.protokoll li { background: var(--tinte); color: var(--papier); padding: .55rem .8rem; border-radius: 8px; width: fit-content; max-width: 100%; }
.protokoll span { color: var(--auf); margin-right: .5rem; }
html.bewegt .protokoll li { clip-path: inset(0 calc(100% - var(--t, 0) * 100%) 0 0 round 8px); }

.dreizwei { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; font-weight: 550; }
.dreizwei span { display: inline-flex; align-items: baseline; gap: .45rem; transition: opacity .4s, transform .5s var(--weich); }
.dreizwei b { font-size: var(--s-h2); font-weight: 650; letter-spacing: -.05em; line-height: .9; }
html.bewegt .dreizwei span { opacity: .28; transform: translateY(6px); }
html.bewegt .dreizwei span.an { opacity: 1; transform: none; }

/* Text kommt Zeile für Zeile, sobald die Lage steht */
html.bewegt .akt--station .text > *, html.bewegt .akt--laeuft .text > *, html.bewegt .preis > * { opacity: 0; transform: translateY(26px); transition: opacity .55s var(--weich), transform .7s var(--weich); }
html.bewegt .akt.ist-da .text > *, html.bewegt .akt.ist-da .preis > * { opacity: 1; transform: none; }
.akt.ist-da .text > :nth-child(2), .akt.ist-da .preis > :nth-child(2) { transition-delay: .08s; }
.akt.ist-da .text > :nth-child(3), .akt.ist-da .preis > :nth-child(3) { transition-delay: .16s; }

.akt--laeuft .halt { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; }
.text--laeuft { max-width: 27rem; }
.preis { display: grid; gap: .5rem; justify-items: end; text-align: right; max-width: 20rem; }
.preis-zahl { font-size: var(--s-gross); font-weight: 600; }
.preis-zahl b { font-size: var(--s-h1); font-weight: 650; letter-spacing: -.05em; line-height: .85; }

/* Ablauf: drei Schritte auf einer Schiene, die Dauer ist die Überschrift */
.ablauf, .anfrage { position: relative; padding: clamp(4rem, 12vh, 8rem) var(--rand); }
.ablauf h2 { max-width: 14ch; margin-bottom: clamp(2rem, 6vh, 4rem); }
.schiene { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 3px solid var(--tinte); }
.schiene li { padding: 1.4rem 1.6rem 0 0; display: grid; gap: .55rem; align-content: start; position: relative; }
.schiene li + li { padding-left: 1.6rem; border-left: 3px solid var(--tinte); }
.schiene li::before { content: ""; position: absolute; top: -9px; left: -3px; width: 15px; height: 15px; border-radius: 50%; background: var(--tinte); }
.dauer { font-size: var(--s-h2); font-weight: 650; letter-spacing: -.04em; line-height: 1; }
.schiene h3 { font-family: var(--mono); font-size: var(--s-klein); font-weight: 600; letter-spacing: 0; text-transform: none; }
.schiene p:last-child { max-width: 22rem; }
html.bewegt .schiene li { opacity: 0; transform: translateY(34px) rotate(1.2deg); transition: opacity .6s var(--weich), transform .8s var(--weich); }
html.bewegt .schiene.ist-da li { opacity: 1; transform: none; }
.schiene.ist-da li:nth-child(2) { transition-delay: .12s; }
.schiene.ist-da li:nth-child(3) { transition-delay: .24s; }

/* Anfrage: der Zettel liegt auf dem Tisch */
.anfrage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.anfrage-wort { display: grid; gap: 1.2rem; max-width: 30rem; }
.adresse { font-family: var(--mono); font-size: var(--s-klein); line-height: 1.6; }
.zettel { background: var(--papier); border-radius: var(--r); padding: clamp(1.2rem, 3vw, 2.2rem); display: grid; gap: 1rem; box-shadow: 0 30px 50px -30px rgba(20, 20, 20, .55); }
html.bewegt .zettel { transform: rotate(-1.6deg) translateY(30px); opacity: 0; transition: transform .9s var(--weich), opacity .5s; }
html.bewegt .zettel.ist-da { transform: none; opacity: 1; }
.feld { display: grid; gap: .3rem; }
.feld label { font-size: .9rem; font-weight: 600; }
.feld input, .feld select, .feld textarea { width: 100%; min-height: 3rem; padding: .7rem .85rem; border: 2px solid var(--tinte); border-radius: 10px; background: #fffefa; color: var(--tinte); font: inherit; font-size: 1rem; }
.feld textarea { resize: vertical; }
.feld [aria-invalid="true"] { border-color: #b3261e; }
.fehler { font-size: var(--s-klein); color: #8c1d18; min-height: 0; }
.formular-meldung { font-weight: 600; min-height: 1.5em; }
.formular-meldung:focus { outline: none; }

/* Fuß */
.fuss { position: relative; z-index: 2; background: var(--tinte); color: var(--papier); padding: clamp(3rem, 9vh, 6rem) var(--rand) 2rem; }
.fuss-satz { font-size: var(--s-h2); font-weight: 650; letter-spacing: -.035em; line-height: 1; max-width: 18ch; margin-bottom: clamp(2rem, 6vh, 4rem); }
.fuss-satz em { font-style: normal; color: var(--zu); }
.fuss-reihe { display: grid; grid-template-columns: 1.4fr 1fr auto 1.2fr; gap: 2rem; align-items: start; font-size: .98rem; line-height: 1.7; }
.fuss a { text-decoration: none; }
.fuss a:hover { text-decoration: underline; }
.zeichen-liste { display: flex; gap: .2rem; }
.zeichen-link { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; }
.zeichen-link:hover { background: rgba(255, 253, 243, .14); }
.zeichen { width: 1.25rem; height: 1.25rem; }
.fuss-klein { font-size: var(--s-klein); opacity: .85; }

/* Ohne Bewegung und ohne Skript: alles steht, jede Lage als Bild neben ihrem Text */
html:not(.bewegt) .halt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 2rem; padding-top: clamp(3rem, 8vh, 6rem); padding-bottom: clamp(3rem, 8vh, 6rem); }
html:not(.bewegt) .akt--oben .halt { padding-top: calc(var(--kopf) + 3rem); }
html:not(.bewegt) .text--oben { max-width: 33rem; align-self: center; }
html:not(.bewegt) .beleg { position: static; grid-column: 1; text-align: left; }
html:not(.bewegt) .still--oben { grid-column: 2; grid-row: 1 / span 2; }
html:not(.bewegt) .text-rechts .text { order: 2; }
html:not(.bewegt) .akt--laeuft, html:not(.bewegt) .ablauf, html:not(.bewegt) .anfrage { background: var(--zu); }
html:not(.bewegt) .akt--laeuft .halt { grid-template-columns: 1fr 1fr; }
html:not(.bewegt) .akt--laeuft .still { display: none; }
html:not(.bewegt) .preis { justify-items: start; text-align: left; }

/* Hochformat (Handy, Tablet hochkant): die Lage steht oben, der Text unten */
@media (orientation: portrait) {
  :root { --s-riesig: 25vw; }
  .halt { padding-bottom: 1.25rem; }
  .text--oben { max-width: 34rem; gap: .8rem; }
  .text--oben .klein { max-width: none; }
  .beleg { position: static; text-align: left; max-width: none; margin-top: .9rem; display: flex; gap: .7rem; align-items: center; }
  .beleg b { font-size: 2.4rem; }
  html.bewegt .akt--oben .halt { align-content: end; }
  html.bewegt .akt--station .text { align-self: end; justify-self: start; max-width: 34rem; gap: .8rem; }
  .zahl b { font-size: 3rem; }
  .akt--laeuft .halt { grid-template-columns: 1fr; gap: 1rem; align-content: end; }
  .preis { justify-items: start; text-align: left; }
  .preis-zahl b { font-size: 3rem; }
  .lupe { width: 9rem; height: 9rem; }
}

/* schmale Fenster */
@media (max-width: 760px) {
  :root { --kopf: 3.9rem; }
  .menue { display: none; }
  .schalter-wort { display: none; }
  .kopf { gap: .35rem; padding-left: .8rem; }
  .logo { font-size: 1.15rem; }
  .knopf--klein { padding: .5rem .9rem; font-size: .9rem; }
  .schiene { grid-template-columns: 1fr; border-top: 0; border-left: 3px solid var(--tinte); }
  .schiene li, .schiene li + li { padding: 0 0 2rem 1.4rem; border-left: 0; }
  .schiene li::before { top: .5rem; left: -9px; }
  .anfrage { grid-template-columns: 1fr; }
  .fuss-reihe { grid-template-columns: 1fr 1fr; }
  html:not(.bewegt) .halt, html:not(.bewegt) .akt--laeuft .halt { grid-template-columns: 1fr; }
  html:not(.bewegt) .still--oben { grid-column: 1; grid-row: auto; }
  html:not(.bewegt) .text-rechts .text { order: 0; }
}

/* Querformat: das Gerät steht groß in der Mitte, die Überschrift als schmaler Turm links daneben */
@media (orientation: landscape) {
  .text--oben { max-width: min(27vw, 36rem); }
  .text--oben h1 { font-size: clamp(2.1rem, 3.9vw, 5.6rem); }
  .text--oben h1 span { display: block; white-space: nowrap; }
  .text--oben .gross { font-size: var(--s-text); line-height: 1.45; }
  .akt--station .text { max-width: min(34rem, 31vw); }
  .text--laeuft { max-width: min(27rem, 40vw); }
}

/* flache Fenster im Querformat: Text kleiner und schmäler, damit er neben dem Gerät Platz hat */
@media (max-height: 560px) and (orientation: landscape) {
  :root { --s-h1: clamp(1.7rem, 7.6vh, 3.2rem); --s-h2: clamp(1.45rem, 6.2vh, 2.6rem); --s-gross: 1rem; --s-text: .92rem; --s-riesig: min(22vw, 40vh); }
  .text { gap: .55rem; }
  .text--oben { max-width: 42vw; }
  .text--oben h1 { font-size: var(--s-h1); }
  .text--oben h1 span { display: inline; white-space: normal; }
  .knopf { min-height: 2.75rem; padding: .5rem 1.15rem; }
  .halt { padding-top: calc(var(--kopf) + .5rem); padding-bottom: .9rem; }
  .beleg { position: static; text-align: left; max-width: none; display: flex; gap: .6rem; align-items: center; margin-top: .5rem; }
  .beleg b { font-size: 1.8rem; }
  html.bewegt .akt--oben .halt { align-content: end; }
  .zahl b, .preis-zahl b { font-size: 2.4rem; }
  .lupe { width: 8.5rem; height: 8.5rem; }
}
/* Rechtliches */
.recht { background: var(--papier); }
.recht main { max-width: 46rem; margin: 0 auto; padding: calc(var(--kopf) + 3rem) var(--rand) 4rem; display: grid; gap: 1rem; }
.recht h1 { font-size: var(--s-h2); }
.recht h2 { font-size: var(--s-gross); letter-spacing: -.015em; line-height: 1.2; margin-top: 1.2rem; }
.recht .kopf { box-shadow: 0 0 0 2px var(--tinte); }
.recht .kopf .knopf { margin-left: auto; }
.recht dl { margin: 0; display: grid; gap: .5rem; }
.recht dl div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; }
.recht dt { font-family: var(--mono); font-size: var(--s-klein); font-weight: 600; padding-top: .2rem; }
.recht dd { margin: 0; }
.offen { background: var(--auf); padding: .05em .35em; border-radius: 4px; }
.offen.block { display: block; padding: .8rem 1rem; border-radius: 10px; }
@media (max-width: 760px) { .recht dl div { grid-template-columns: 1fr; gap: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
