/* Weihnachtliche Fensterbemalung – Josefina Kfuri
   Idee: Der Bildschirm ist die Schaufensterscheibe. Das Video läuft dahinter,
   alles auf der Seite ist mit weißem Marker auf das Glas gemalt. */

:root {
  --glass: #FBF8F3;               /* Marker-Weiß, die Farbe der Zeichnungen im Video */
  --glass-2: rgba(251, 248, 243, .8);
  --glass-3: rgba(251, 248, 243, .58);
  --night: #0F1A26;               /* Winterabend, nur für Abdunklungen */
  --night-rgb: 15, 26, 38;
  --berry: #A30E22;               /* Weihnachtsrot aus Josefinas Unterlagen */
  --berry-hi: #BA162D;
  --fir: #24513A;                 /* Tannengrün aus Josefinas Unterlagen */
  --paper: #E7E1D2;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --trail-space: 72px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --glide: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--glass);
  font: 400 18px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--glass); outline-offset: 3px; border-radius: 6px; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Bühne: Video hinter dem Glas ---------- */

.stage {
  position: fixed; inset: 0;
  height: 100vh; height: 100lvh;
  z-index: 0;
  background: var(--night) url("../frames/d/000.webp") center / cover no-repeat;
}
@media (max-aspect-ratio: 4/5) {
  .stage { background-image: url("../frames/m/000.webp"); }
}
.stage__canvas { display: block; width: 100%; height: 100%; }
.stage__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 95% at 50% 42%, transparent 58%, rgba(var(--night-rgb), .5));
}

/* ---------- Kopfzeile ---------- */

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
  pointer-events: none;
}
.bar::before {
  content: ""; position: absolute; inset: 0 0 -50px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(var(--night-rgb), .5), transparent);
}
.bar a { pointer-events: auto; }
.bar__name {
  font: italic 400 clamp(1.25rem, 1.6vw, 1.45rem)/1 var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 0; letter-spacing: -.01em;
  text-decoration: none;
  padding: .2em .1em;
  text-shadow: 0 1px 14px rgba(var(--night-rgb), .6);
}

/* ---------- Knöpfe ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 1.45em;
  border: 0; border-radius: 999px;
  font: 500 1rem/1 var(--sans); letter-spacing: .005em;
  text-decoration: none; color: var(--glass); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .45s var(--spring), background-color .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.96); transition-duration: .12s; }
.btn--berry {
  background: var(--berry);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 12px 28px -12px rgba(163, 14, 34, .9);
}
.btn--berry:hover { background: var(--berry-hi); }
.btn--glass {
  background: rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}
.btn--glass:hover { background: rgba(255, 255, 255, .18); }
.bar__cta { min-height: 42px; padding: 0 1.2em; font-size: .95rem; }

/* ---------- Sternenpfad (Abschnittsnavigation) ---------- */

.trail {
  position: fixed; z-index: 25;
  right: clamp(14px, 2.2vw, 32px); top: 50%;
  transform: translateY(-50%);
}
.trail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; position: relative; }
.trail a {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 6px; margin: -6px;
  text-decoration: none; color: var(--glass);
}
.trail__label {
  font-size: .85rem; font-weight: 500;
  opacity: 0; transform: translateX(6px);
  transition: opacity .3s ease, transform .45s var(--spring);
  text-shadow: 0 1px 10px rgba(var(--night-rgb), .9);
  white-space: nowrap;
}
.trail a:hover .trail__label,
.trail a:focus-visible .trail__label,
.trail li.is-here .trail__label { opacity: 1; transform: none; }
.trail li.is-here .trail__label { opacity: .78; }
.trail a:hover .trail__label { opacity: 1; }
.trail__star {
  width: 16px; height: 16px; flex: none;
  fill: transparent; stroke: var(--glass); stroke-width: 1.6; stroke-linejoin: round;
  opacity: .6;
  transition: fill .3s ease, opacity .3s ease, transform .5s var(--spring);
  filter: drop-shadow(0 1px 4px rgba(var(--night-rgb), .8));
}
.trail li.is-past .trail__star { fill: var(--glass); opacity: 1; }
.trail li.is-here .trail__star { fill: var(--glass); opacity: 1; transform: scale(1.35) rotate(45deg); }
/* Schiene von Stern zu Stern: 4 Abstände à (16px Stern + 22px Lücke) = 152px */
.trail__rail {
  position: absolute; right: 7px; top: 8px; height: 152px; width: 2px;
  background: rgba(255, 255, 255, .22); border-radius: 2px;
}
.trail a, .trail__label { line-height: 16px; }
.trail__fill {
  position: absolute; inset: 0; border-radius: 2px; background: var(--glass);
  transform-origin: top; transform: scaleY(var(--trail, 0));
}

/* ---------- Szenen ---------- */

main { position: relative; z-index: 1; }

.scene {
  position: relative;
  height: calc((var(--len) + 100) * 1vh);
  height: calc((var(--len) + 100) * 1svh);
  pointer-events: none;
}
.scene + .scene { margin-top: -100vh; margin-top: -100svh; }
.pin {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.scene.is-live .copy { pointer-events: auto; }

.scrim { position: absolute; inset: 0; pointer-events: none; opacity: var(--vis, 1); }
.scrim--bottom {
  background: linear-gradient(to top, rgba(var(--night-rgb), .82) 0%, rgba(var(--night-rgb), .42) 34%, transparent 64%);
}
.scrim--left {
  background: linear-gradient(to right, rgba(var(--night-rgb), .78) 0%, rgba(var(--night-rgb), .45) 30%, transparent 58%);
}
.scrim--deep {
  background:
    linear-gradient(to right, rgba(var(--night-rgb), .86) 0%, rgba(var(--night-rgb), .55) 34%, transparent 64%),
    linear-gradient(to top, rgba(var(--night-rgb), .4), transparent 40%);
}
.scrim--right {
  background: linear-gradient(to left, rgba(var(--night-rgb), .78) 0%, rgba(var(--night-rgb), .45) 30%, transparent 58%);
}
.scrim--split {
  background:
    linear-gradient(to bottom, rgba(var(--night-rgb), .7) 0%, rgba(var(--night-rgb), .25) 26%, transparent 40%),
    linear-gradient(to top, rgba(var(--night-rgb), .8) 0%, rgba(var(--night-rgb), .35) 30%, transparent 46%);
}
.scrim--center {
  background: radial-gradient(48% 38% at 50% 47%, rgba(var(--night-rgb), .46), transparent 72%);
}

.copy { position: absolute; }

.copy--hero {
  left: var(--gutter); bottom: clamp(56px, 11vh, 128px);
  max-width: min(1100px, calc(100vw - 2 * var(--gutter)));
}
.copy--right {
  right: calc(var(--gutter) + var(--trail-space)); top: 50%;
  width: min(460px, 40vw);
  transform: translateY(-30%);
}
.copy--left {
  left: var(--gutter); top: 50%;
  width: min(480px, 42vw);
  transform: translateY(-46%);
}
.copy--top {
  left: var(--gutter); top: clamp(84px, 13vh, 132px);
  width: min(560px, 60vw);
}
.copy--tiles {
  left: var(--gutter); right: calc(var(--gutter) + var(--trail-space));
  bottom: clamp(24px, 5vh, 56px);
}
.copy--center {
  left: 50%; top: 47%;
  transform: translate(-50%, -50%);
  text-align: center; width: max-content; max-width: 92vw;
}
.copy--panel {
  right: calc(var(--gutter) + var(--trail-space)); top: 50%;
  width: min(440px, calc(100vw - 2 * var(--gutter)));
  transform: translateY(-50%);
}

/* ---------- Schrift ---------- */

/* Fraunces Italic mit weichen Strichenden ("SOFT") und ruhigen Buchstaben ("WONK" aus):
   elegant wie die Schreibschrift aus Josefinas Unterlagen, aber über dem Video gut lesbar */
.display {
  font-family: var(--display); font-style: italic; font-weight: 380;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  line-height: 1.06; letter-spacing: -.012em;
  text-shadow: 0 2px 26px rgba(var(--night-rgb), .5);
}
.h-hero { font-size: clamp(2.6rem, 7vw, 7rem); line-height: 1.02; }
.h-scene { font-size: clamp(2.3rem, 3.9vw, 4.2rem); }
.h-panel { font-size: clamp(2rem, 2.4vw, 2.4rem); line-height: 1.05; }
.h-fog { font-size: clamp(2.8rem, 6vw, 6rem); text-shadow: 0 2px 30px rgba(var(--night-rgb), .6); }

/* Jede Zeile wird wie mit dem Stift geschrieben: eine Maske fährt von links nach rechts.
   Der Innenabstand gibt dem Überhang der Kursiven Platz. */
.ink {
  display: block; width: fit-content;
  padding: .08em .22em .16em; margin: -.08em -.22em -.16em;
}
.js .ink {
  -webkit-mask-image: linear-gradient(100deg, #000 calc(var(--w, 0) * 135% - 35%), transparent calc(var(--w, 0) * 135%));
  mask-image: linear-gradient(100deg, #000 calc(var(--w, 0) * 135% - 35%), transparent calc(var(--w, 0) * 135%));
}
.h-hero .ink + .ink { margin-left: clamp(.3em, 4vw, 1em); }
.copy--center .ink { margin-left: auto; margin-right: auto; }

.copy h2 + p, .copy h1 + p { margin-top: 18px; }
.copy p { max-width: 36ch; color: var(--glass-2); text-shadow: 0 1px 16px rgba(var(--night-rgb), .7); }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.32rem); line-height: 1.5; color: var(--glass) !important; max-width: 34ch; }

/* Ein- und Ausblenden: Text erscheint, und beschlägt beim Gehen wie Glas */
.js .fade { opacity: var(--vis, 1); }
.js .blur { filter: blur(calc((1 - var(--vis, 1)) * 6px)); }
.js .copy--hero .lead, .js .scene:first-child .cue { opacity: calc(var(--vis, 1) * var(--hi, 0)); }
.js .scene { --vis: 0; }
.js .scene:first-child { --vis: 1; }

/* Hinweis zum Scrollen */
.cue {
  position: absolute; right: calc(var(--gutter) + var(--trail-space)); bottom: clamp(56px, 11vh, 128px);
  display: grid; justify-items: center; gap: 10px;
  font-size: .85rem; color: var(--glass-2);
  text-shadow: 0 1px 10px rgba(var(--night-rgb), .8);
}
.cue__line {
  width: 2px; height: 46px; border-radius: 2px;
  background: linear-gradient(var(--glass), var(--glass)) top / 2px 0 no-repeat, rgba(255, 255, 255, .25);
  animation: cue 2.4s var(--glide) infinite;
}
@keyframes cue {
  0% { background-size: 2px 0; background-position: top; }
  55% { background-size: 2px 100%; background-position: top; }
  56% { background-position: bottom; }
  100% { background-size: 2px 0; background-position: bottom; }
}

/* ---------- Ablauf ---------- */

.steps { list-style: none; margin: 26px 0 0; padding: 0; }
.step {
  position: relative;
  display: grid; grid-template-columns: 36px 1fr; column-gap: 18px;
  padding: 8px 0;
}
/* Verbindungsstrich zum nächsten Schritt, füllt sich, sobald ein Schritt erledigt ist */
.step:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 48px; bottom: -4px; width: 2px; border-radius: 2px;
  background: linear-gradient(var(--glass), var(--glass)) top / 2px 0 no-repeat, rgba(255, 255, 255, .22);
  transition: background-size .7s var(--glide);
}
.step.is-done::after { background-size: 2px 100%; }
.step__n {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font: 600 .95rem/1 var(--sans);
  color: var(--glass-2);
  background: rgba(var(--night-rgb), .55);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .42);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease, transform .5s var(--spring);
}
.step.is-on .step__n, .step.is-done .step__n { background: var(--glass); color: var(--night); box-shadow: none; }
.step.is-on .step__n { transform: scale(1.14); }
.step__t {
  font: 600 1.12rem/1.3 var(--sans);
  padding-top: 7px;
  color: var(--glass-3);
  transition: color .3s ease;
  text-shadow: 0 1px 14px rgba(var(--night-rgb), .8);
}
.step.is-on .step__t, .step.is-done .step__t { color: var(--glass); }
.step__d { display: grid; grid-template-rows: 1fr; }
.step__d > p { overflow: hidden; padding-top: 4px; font-size: 1rem; }
.js .step__d { grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .55s var(--glide), opacity .35s ease; }
.js .step.is-on .step__d { grid-template-rows: 1fr; opacity: 1; }

/* ---------- Motive ---------- */

.tiles { display: flex; gap: 12px; }
.tile {
  /* Breite im Verhältnis zur Skizze, so stehen alle Zeichnungen auf gleicher Höhe */
  flex: var(--ar) 1 0; min-width: 0;
  position: relative;
  display: grid; gap: 10px;
  padding: 14px 14px 12px;
  border: 0; border-radius: 18px;
  background: rgba(var(--night-rgb), .38);
  -webkit-backdrop-filter: blur(16px) saturate(1.25); backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .13);
  text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .5s var(--spring), background-color .3s ease, box-shadow .3s ease, opacity .2s linear;
}
.tile:hover { transform: translateY(-5px); background: rgba(var(--night-rgb), .28); }
.tile:active { transform: translateY(-1px) scale(.97); transition-duration: .12s; }
.tile[aria-pressed="true"] {
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .78);
}
.tile__art { display: block; aspect-ratio: var(--ar); }
.tile__art img { width: 100%; height: 100%; object-fit: contain; opacity: .9; transition: opacity .3s ease; }
.tile__art--pair { display: flex; gap: 4%; align-items: stretch; }
.tile__art--pair img { width: auto; flex: var(--w) 1 0; min-width: 0; }
.tile[aria-pressed="true"] .tile__art img { opacity: 1; }
.tile__name { font-size: .92rem; font-weight: 500; line-height: 1.25; }
.tile__check {
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px; padding: 4px; border-radius: 50%;
  background: var(--berry);
  fill: none; stroke: var(--glass); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
  transform: scale(.4); opacity: 0;
  transition: transform .5s var(--spring), opacity .2s ease;
}
.tile__check path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .45s var(--glide) .12s; }
.tile[aria-pressed="true"] .tile__check { transform: none; opacity: 1; }
.tile[aria-pressed="true"] .tile__check path { stroke-dashoffset: 0; }
/* Beim Auswählen wird die Skizze noch einmal "gemalt" */
.tile.is-painting .tile__art img {
  -webkit-mask-image: linear-gradient(100deg, #000 40%, transparent 60%);
  mask-image: linear-gradient(100deg, #000 40%, transparent 60%);
  -webkit-mask-size: 250% 100%; mask-size: 250% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  animation: paint .9s var(--glide) both;
}
@keyframes paint {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}
.tiles__status {
  margin-top: 14px; font-size: .95rem; max-width: none !important;
  min-height: 1.55em;
}

/* ---------- Preisrechner ---------- */

.panel {
  display: grid; gap: 18px;
  max-height: calc(100svh - 120px); overflow: auto;
  padding: 28px 28px 26px;
  border-radius: 28px;
  background: rgba(var(--night-rgb), .5);
  -webkit-backdrop-filter: blur(26px) saturate(1.3); backdrop-filter: blur(26px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 90px -40px rgba(0, 0, 0, .7);
  scrollbar-width: none;
}
.panel::-webkit-scrollbar { display: none; }
.panel .h-panel { margin-bottom: -6px; }
.panel__intro { font-size: .95rem; color: var(--glass-3); }

.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend { padding: 0; margin-bottom: 8px; font-size: .88rem; font-weight: 500; color: var(--glass-3); }
.seg__track {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 4px; border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.seg__pill {
  position: absolute; top: 4px; bottom: 4px; left: 0; width: 0;
  border-radius: 12px; background: var(--glass);
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .6);
  transition: transform .55s var(--spring), width .55s var(--spring);
}
.seg label {
  position: relative; z-index: 1;
  display: grid; place-items: center; align-content: center; gap: 1px;
  min-height: 46px; padding: 8px 6px; border-radius: 12px;
  cursor: pointer; text-align: center;
  color: var(--glass-2);
  transition: color .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.seg label:active { transform: scale(.97); }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg b { font-weight: 600; font-size: .98rem; line-height: 1.2; }
.seg small { font-size: .78rem; opacity: .78; line-height: 1.2; }
.seg label.is-on { color: var(--night); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--glass); outline-offset: 2px; }
html:not(.js) .seg label:has(input:checked) { background: var(--glass); color: var(--night); }
.seg__hint { margin-top: 8px; font-size: .86rem; color: var(--glass-3); min-height: 1.4em; }

.switch {
  display: grid; grid-template-columns: 1fr auto 46px; align-items: center; column-gap: 14px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__text b { display: block; font-weight: 500; font-size: 1rem; line-height: 1.3; }
.switch__text small { display: block; font-size: .8rem; line-height: 1.35; color: var(--glass-3); margin-top: 2px; }
.switch__amt { font-size: .95rem; color: var(--glass-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.switch__ui {
  position: relative; width: 46px; height: 28px; border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  transition: background-color .3s ease;
}
.switch__ui::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--glass);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .5s var(--spring), background-color .3s ease;
}
.switch input:checked ~ .switch__ui { background: var(--glass); }
.switch input:checked ~ .switch__ui::after { transform: translateX(18px); background: var(--berry); }
.switch input:focus-visible ~ .switch__ui { outline: 2px solid var(--glass); outline-offset: 3px; }
.switch:active .switch__ui::after { width: 26px; }
.switch:active input:checked ~ .switch__ui::after { transform: translateX(14px); }

.total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 4px; }
.total__label { font-size: 1rem; color: var(--glass-2); }
.total__value { font: 600 clamp(2.2rem, 3vw, 2.75rem)/1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.total__roll { display: inline-flex; align-items: flex-end; }
.roll { display: inline-block; height: 1em; overflow: hidden; }
.roll__s { display: block; transition: transform .75s var(--glide); }
.roll__s > span { display: block; height: 1em; line-height: 1; }
.roll__c { display: inline-block; line-height: 1; }
.panel__fine { font-size: .86rem; color: var(--glass-3); margin-top: -8px; }
.panel__cta { width: 100%; }

/* ---------- Kontakt ---------- */

.copy--contact { width: min(520px, 46vw); transform: translateY(-42%); }
.summary { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.summary[hidden] { display: none; }
.summary li {
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  font-size: .9rem; line-height: 1.3;
}
.summary li.is-price { background: var(--glass); color: var(--night); font-weight: 600; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.direct { display: grid; gap: 2px; margin-top: 22px; font-size: .95rem; }
.direct a { text-decoration: none; width: fit-content; color: var(--glass-2); }
.direct a:hover { color: var(--glass); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Fußzeile ---------- */

.foot {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 28px;
  padding: 64px var(--gutter) max(28px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(var(--night-rgb), .94) 60%);
  font-size: .9rem; color: var(--glass-3);
}
.foot__links { display: flex; gap: 24px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--glass); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tablet ---------- */

@media (max-width: 1100px) {
  .copy--right, .copy--left { width: min(440px, 48vw); }
  .tiles { gap: 10px; }
  .tile { padding: 10px 10px 10px; border-radius: 16px; }
  .tile__name { font-size: .84rem; }
}

/* ---------- Telefon und schmale Fenster: alles sitzt unten, über einem Verlauf ---------- */

@media (max-width: 760px), (max-aspect-ratio: 4/5) {
  :root { --trail-space: 0px; }
  body { font-size: 17px; }
  .trail { display: none; }

  .scrim--left, .scrim--right, .scrim--deep {
    background: linear-gradient(to top, rgba(var(--night-rgb), .9) 0%, rgba(var(--night-rgb), .6) 38%, transparent 66%);
  }
  .scrim--split {
    background:
      linear-gradient(to bottom, rgba(var(--night-rgb), .78) 0%, rgba(var(--night-rgb), .3) 24%, transparent 36%),
      linear-gradient(to top, rgba(var(--night-rgb), .88) 0%, rgba(var(--night-rgb), .4) 32%, transparent 48%);
  }
  .scrim--center { background: radial-gradient(80% 36% at 50% 47%, rgba(var(--night-rgb), .5), transparent 75%); }

  .copy--hero, .copy--right, .copy--left, .copy--contact, .copy--panel {
    left: var(--gutter); right: var(--gutter); top: auto; width: auto;
    bottom: max(24px, env(safe-area-inset-bottom));
    transform: none;
  }
  .copy--hero { bottom: 88px; }
  .copy--top { left: var(--gutter); right: var(--gutter); width: auto; top: 78px; }
  .copy--tiles { left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); }

  .h-hero { font-size: clamp(2.4rem, 10.4vw, 4rem); }
  .h-hero .ink + .ink { margin-left: .25em; }
  .h-scene { font-size: clamp(2.05rem, 8.6vw, 3rem); }
  .h-fog { font-size: clamp(2.4rem, 11vw, 3.6rem); }
  .copy p { max-width: 40ch; }
  .lead { font-size: 1.08rem; }

  .cue { right: auto; left: var(--gutter); bottom: 28px; grid-auto-flow: column; align-items: center; }
  .cue__line { width: 30px; height: 2px; animation: none; background: rgba(255, 255, 255, .5); }

  .steps { margin-top: 16px; }
  .step { padding: 6px 0; }
  .step:not(:last-child)::after { top: 44px; }

  .tiles {
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
    padding: 6px var(--gutter) 4px;
    scrollbar-width: none;
  }
  .tiles::-webkit-scrollbar { display: none; }
  .tile { flex: 0 0 auto; width: calc(var(--ar) * 118px + 20px); scroll-snap-align: start; }
  .tiles__status { padding: 0 var(--gutter); font-size: .9rem; }

  .panel {
    gap: 14px; padding: 20px 18px 18px; border-radius: 24px;
    max-height: calc(100svh - 96px);
  }
  .h-panel { font-size: 1.95rem; }
  .seg label { min-height: 44px; padding: 6px 4px; }

  .copy--contact .actions { margin-top: 20px; }
  .copy--contact .btn { flex: 1 1 auto; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .panel__intro, .panel__fine { display: none; }
  .switch__text small { display: none; }
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .blur { filter: none; }
  .cue__line { animation: none; background: rgba(255, 255, 255, .5); }
  .tile.is-painting .tile__art img { animation: none; -webkit-mask-image: none; mask-image: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
