/* =========================================================================
   Unsere Geschichte (/geschichte/): DT Reinigung → LIVAFS
   ========================================================================= */

/* ---------- hero ---------- */
.story-hero { padding-bottom: clamp(40px, 6vw, 72px); }
.story-hero .page-hero__content { max-width: 760px; }
.story-hero .lead { color: var(--on-dark-muted); max-width: 58ch; }
.story-hero__scroll { margin-top: 26px; }
.story-hero__scroll .link-arrow { color: var(--lime-300); }

/* ---------- transformation stage (scroll-driven, story.js sets --p and --wipe) ---------- */
.morph-stage { --p: 0; --wipe: 0; position: relative; height: 380vh; background: var(--forest-950); }
.morph-stage__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.morph-stage__bg { position: absolute; inset: 0;
  background: radial-gradient(1000px 520px at 50% 0%, color-mix(in srgb, #3366cc calc((1 - var(--wipe)) * 60%), var(--forest-700)) 0%, transparent 70%), var(--forest-950); }
.morph-stage__year { position: absolute; top: calc(var(--header-h) - 10px); left: 50%; translate: -50% 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(60px, 10vw, 150px); line-height: 1; letter-spacing: -.04em; color: rgba(255, 255, 255, .07); font-variant-numeric: tabular-nums; pointer-events: none; }

.webframe { position: relative; width: min(980px, 70vw); aspect-ratio: 1440 / 935; border-radius: 14px; overflow: hidden; background: #fff; margin-top: 4vh;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .08); scale: calc(.94 + var(--p) * .06); }
.webframe__bar { position: absolute; inset: 0 0 auto 0; height: 3.8%; min-height: 24px; background: #e9eaee; display: flex; align-items: center; gap: 6px; padding: 0 12px; z-index: 5; }
.webframe__bar i { width: 10px; height: 10px; border-radius: 50%; background: #d0d2d8; }
.webframe__bar i:nth-child(1) { background: #ef7b6c; } .webframe__bar i:nth-child(2) { background: #f2c14e; } .webframe__bar i:nth-child(3) { background: #7cc95b; }
.webframe__url { margin-left: 12px; flex: 0 1 360px; background: #fff; border-radius: 999px; padding: 2px 10px; font-size: clamp(10px, 1vw, 13px); color: #3b4048; display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; }
.webframe__url .i { width: 12px; height: 12px; color: var(--green-ink); flex: none; }
.webframe__caret { width: 1px; height: 13px; background: #3b4048; animation: story-blink 1s steps(1) infinite; }
@keyframes story-blink { 50% { opacity: 0; } }
.webframe__screen { position: absolute; inset: 3.8% 0 0 0; }
.webframe__screen picture, .webframe__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.webframe__old { clip-path: inset(0 0 0 calc(var(--wipe) * 100%)); filter: saturate(calc(1 - var(--wipe) * .6)); }
.webframe__new img { scale: calc(1.04 - var(--wipe) * .04); }
.webframe__blade { position: absolute; top: -6%; bottom: -6%; left: calc(var(--wipe) * 100%); width: 0; z-index: 4;
  opacity: calc(min(1, var(--wipe) * 12) * min(1, (1 - var(--wipe)) * 12)); }
.webframe__blade::before { content: ""; position: absolute; inset: 0 auto 0 -7px; width: 14px; border-radius: 8px;
  background: linear-gradient(90deg, #0b2a17, #1c5a2f 45%, #0b2a17); box-shadow: 0 0 0 2px rgba(124, 194, 46, .6), 0 10px 30px rgba(0, 0, 0, .45); }
.webframe__blade::after { content: ""; position: absolute; top: 38%; height: 24%; left: -24px; width: 48px; border-radius: 14px; background: var(--lime-500); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.webframe__water { position: absolute; inset: 0 auto 0 calc(var(--wipe) * 100% - 120px); width: 120px; z-index: 3; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35) 85%, rgba(255, 255, 255, .6));
  opacity: calc(min(1, var(--wipe) * 10) * min(1, (1 - var(--wipe)) * 10)); }
.webframe__sparkles { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.webframe__sparkles span { position: absolute; width: 10px; height: 10px; border-radius: 50%; opacity: 0; transform: scale(.3);
  background: radial-gradient(circle, #fff 0 30%, rgba(124, 194, 46, .9) 31% 55%, transparent 56%); transition: opacity .4s, transform .6s var(--ease-spring); }
.morph-stage.is-done .webframe__sparkles span { opacity: 1; transform: scale(1); }

.morph-stage__team { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.mpol { position: absolute; margin: 0; width: clamp(88px, 10vw, 150px); background: #fff; padding: 7px 7px 28px; border-radius: 3px; box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .6);
  opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.6); transition: opacity .5s var(--dl), transform .9s var(--ease-spring) var(--dl); }
.mpol::before { content: ""; position: absolute; top: -8px; left: 30%; width: 40%; height: 16px; background: rgba(216, 239, 181, .85); rotate: -4deg; }
.mpol img, .mpol__sk { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.mpol__sk { display: grid; place-items: center; background: #eef3e6; font-family: var(--font-display); font-weight: 800; color: var(--forest-800); font-size: clamp(22px, 2.4vw, 34px); }
.mpol b { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: clamp(15px, 1.4vw, 20px); color: var(--ink); }
.morph-stage.is-team .mpol { opacity: 1; transform: translate(0, 0) rotate(var(--r)) scale(1); }
.mpol--m { left: 3vw; top: 34vh; --r: -6deg; --fx: -80px; --fy: 40px; --dl: 0s; }
.mpol--j { right: 3vw; top: 20vh; --r: 5deg; --fx: 90px; --fy: -40px; --dl: .15s; }
.mpol--h { right: 4.5vw; bottom: 18vh; --r: 4deg; --fx: 90px; --fy: 60px; --dl: .3s; }
.mpol--e { right: 4.5vw; bottom: 20vh; --r: -4deg; --fx: 90px; --fy: 70px; --dl: .45s; }

.morph-stage__caption { position: absolute; bottom: 4.5vh; left: 50%; translate: -50% 0; width: min(760px, 90vw); text-align: center; color: #fff; z-index: 8; }
.morph-stage__caption p { margin: 0; font-family: var(--font-display); font-size: clamp(19px, 2.4vw, 30px); font-weight: 700; letter-spacing: -.01em; }
.morph-stage__caption small { display: block; margin-top: 6px; color: var(--on-dark-muted); font-size: clamp(13px, 1.1vw, 15px); }

@media (max-width: 760px) {
  .morph-stage { height: 300vh; }
  .webframe { width: 92vw; margin-top: 0; }
  .morph-stage__team { inset: auto 0 15vh 0; height: 120px; display: flex; justify-content: center; gap: 8px; }
  .mpol { position: relative; inset: auto; width: 21vw; padding: 4px 4px 20px; }
  .mpol b { font-size: 13px; }
}
/* reduced motion: before/after side by side, no scroll animation */
@media (prefers-reduced-motion: reduce) {
  .morph-stage { height: auto; padding: 80px 0; }
  .morph-stage__sticky { position: static; height: auto; display: block; }
  .webframe { margin: 0 auto 24px; }
  .morph-stage__team, .webframe__blade, .webframe__water { display: none; }
  .morph-stage__caption { position: static; translate: none; margin: 0 auto; }
}

/* ---------- numbers ---------- */
.story-stats { background: var(--forest-900); color: var(--on-dark); padding-block: clamp(48px, 6vw, 80px); }
.story-stats__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.story-stats .sstat { border-left: 2px solid var(--lime-500); padding-left: 18px; }
.story-stats .sstat b { display: block; font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); line-height: 1; color: #fff; letter-spacing: -.03em; }
.story-stats .sstat > span { display: block; margin-top: 8px; color: var(--on-dark-muted); font-size: .95rem; line-height: 1.4; }
@media (max-width: 760px) { .story-stats__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- timeline ---------- */
.story .h2 { max-width: 20ch; }
.timeline { --tl: 0; position: relative; list-style: none; margin: clamp(40px, 6vw, 80px) 0 0; padding: 0; }
.timeline__spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 3px; translate: -50% 0; background: var(--paper-3); border-radius: 3px; }
.timeline__fill { position: absolute; inset: 0 0 auto 0; height: calc(var(--tl) * 100%); background: linear-gradient(var(--lime-500), var(--green-ink)); border-radius: 3px; }
.chapter { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding-block: clamp(36px, 5vw, 72px); }
.chapter::before { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; translate: -50% -50%; border-radius: 50%; background: var(--paper); border: 4px solid var(--lime-500); box-shadow: 0 0 0 6px var(--paper); z-index: 1; }
.chapter > * { min-width: 0; }
.chapter--right > .chapter__body { order: 2; }
.chapter__year { position: absolute; top: 4px; left: 50%; translate: -50% 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(15px, 1.4vw, 18px); color: var(--green-ink);
  background: var(--paper); padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--lime-300); z-index: 2; white-space: nowrap; }
.chapter__when { margin: 0 0 6px; font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--green-ink); }
.chapter__title { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 14px; color: var(--forest-800); }
.chapter__body p { color: var(--ink-2); line-height: 1.65; }
.chapter__chips { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chapter__chips li { background: #fff; border: 1.5px solid var(--paper-3); border-radius: 999px; padding: 6px 13px; font-weight: 600; font-size: .9rem; color: var(--forest-800); }

/* photos as taped snapshots */
.snap { position: relative; margin: 0; background: #fff; padding: 10px 10px 14px; border-radius: 4px; box-shadow: var(--shadow-2); max-width: 460px; justify-self: center; }
.snap img { display: block; width: 100%; height: auto; border-radius: 2px; filter: sepia(.18) saturate(.9); }
.snap figcaption { text-align: center; font-size: 1.35rem; color: var(--ink-2); margin-top: 8px; }
.snap--tilt-l { rotate: -2.5deg; } .snap--tilt-r { rotate: 2deg; }
.snaps { position: relative; display: grid; justify-items: center; }
.snap--small { position: absolute; width: 52%; right: -4%; bottom: -16%; }

/* team board – pins fly in when the board is in view */
.board { position: relative; min-height: 420px; }
.board__strings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--lime-600); stroke-width: 2.4; stroke-dasharray: 6 6; }
.pin { position: absolute; margin: 0; width: clamp(120px, 15vw, 170px); background: #fff; padding: 8px 8px 12px; border-radius: 3px; box-shadow: var(--shadow-2);
  opacity: 0; transform: translate(var(--from-x), var(--from-y)) rotate(0deg) scale(.7); transition: opacity .5s var(--delay, 0s), transform 1s var(--ease-spring) var(--delay, 0s); }
.board.is-in .pin { opacity: 1; transform: translate(0, 0) rotate(var(--rot)) scale(1); }
.pin img, .pin__sketch { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.pin__sketch { position: relative; background: #eef3e6; display: grid; place-items: center; }
.pin__sketch svg { position: absolute; inset: 14%; width: 72%; height: 72%; fill: none; stroke: rgba(47, 116, 20, .35); stroke-width: 4; }
.pin__initials { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; color: var(--forest-800); }
.pin figcaption { margin-top: 8px; line-height: 1.25; }
.pin figcaption b { display: block; font-family: var(--font-display); font-size: .98rem; color: var(--forest-800); }
.pin figcaption span { display: block; font-size: .78rem; color: var(--muted); }
.pin--marta { left: 4%; top: 4%; } .pin--jorin { right: 4%; top: 0; } .pin--hevzi { left: 50%; bottom: 0; margin-left: calc(clamp(120px, 15vw, 170px) / -2); }
.board__hand { position: absolute; left: 50%; top: 46%; translate: -50% -50%; font-size: 1.6rem; color: var(--green-ink); rotate: -4deg; white-space: nowrap;
  opacity: 0; transition: opacity .6s 1.4s; }
.board.is-in .board__hand { opacity: 1; }

/* rename: a little LIVAFS cleaner wipes the DT logo away (story.js + cleaner.js) */
.morph { position: relative; min-height: 280px; border-radius: var(--radius-l); overflow: hidden; color: #fff; isolation: isolate; }
.morph__layer { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 18px; }
.morph__layer--new { background: radial-gradient(120% 90% at 30% 20%, #1d4a2a, var(--forest-900) 60%); }
.morph__layer--new img { width: clamp(220px, 32vw, 380px); height: auto; }
.morph__layer--old { background: linear-gradient(160deg, #3f72cf, #2b5fbf 55%, #224f9f); }
.morph__layer--old img { width: clamp(170px, 24vw, 280px); height: auto; }
.morph__since { font-size: .78rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.morph__layer--new .morph__since { color: var(--lime-300); }
.morph__foam { position: absolute; top: -4px; bottom: -4px; left: 0; width: var(--fw, 30px); opacity: 0; pointer-events: none; z-index: 2;
  background:
    radial-gradient(circle, #fff 0 30%, rgba(255, 255, 255, .6) 38%, transparent 42%) 35% 0 / 20px 20px repeat-y,
    radial-gradient(circle at 40% 40%, #fff 0 22%, rgba(225, 242, 255, .9) 30%, transparent 40%) 75% 7px / 26px 26px repeat-y,
    radial-gradient(circle, rgba(255, 255, 255, .95) 0 26%, transparent 32%) 10% 3px / 11px 11px repeat-y,
    linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .8) 35%, rgba(246, 252, 255, .9) 62%, rgba(255, 255, 255, 0));
  filter: drop-shadow(3px 0 5px rgba(10, 30, 60, .3)); }
.morph .dtc { z-index: 3; }
.morph__again { position: absolute; right: 14px; bottom: 14px; z-index: 6; border: 1px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 7px 14px;
  background: rgba(3, 18, 10, .55); color: #fff; font: 600 .85rem var(--font-body); cursor: pointer; backdrop-filter: blur(4px); transition: background .2s; }
.morph__again:hover { background: var(--forest-800); }
@media (prefers-reduced-motion: reduce) { .morph__layer--old, .morph__foam { display: none; } }

/* route map */
.route { margin: 0; background: #fff; border-radius: var(--radius-l); padding: 18px; box-shadow: var(--shadow-1); }
.route svg { width: 100%; height: auto; overflow: visible; }
.route__line { fill: none; stroke: var(--lime-500); stroke-width: 4; stroke-linecap: round; }
.route__pt circle { fill: var(--forest-800); stroke: #fff; stroke-width: 3; }
.route__pt--hq circle { fill: var(--lime-500); }
.route__pt text { font-family: var(--font-display); font-weight: 700; font-size: 17px; fill: var(--forest-800); }
.route__pt .route__yr { font-family: var(--font-body); font-weight: 600; font-size: 13px; fill: var(--green-ink); }
.route__pt { opacity: 0; transition: opacity .5s calc(.6s + var(--d) * .6s); }
.route.is-in .route__pt { opacity: 1; }

@media (max-width: 860px) {
  .timeline__spine { left: 14px; }
  .chapter { grid-template-columns: 1fr; padding-left: 44px; gap: 28px; }
  .chapter::before { left: 14px; top: 46px; }
  .chapter__year { left: 44px; translate: 0 0; top: 0; }
  .chapter__body { padding-top: 28px; }
  .chapter--right > .chapter__body { order: 0; }
  .snap--small { position: relative; width: 70%; right: auto; bottom: auto; margin-top: -30px; justify-self: end; }
  .board { min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .pin { position: relative; inset: auto; width: auto; }
  .board__strings, .board__hand { display: none; }
}

/* ---------- stays / new ---------- */
.keep-new__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 34px; }
.kn { background: #fff; border-radius: var(--radius-l); padding: clamp(24px, 3vw, 36px); box-shadow: var(--shadow-1); }
.kn h3 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 14px; color: var(--forest-800); }
.kn--new { background: var(--forest-800); color: var(--on-dark); }
.kn--new h3 { color: var(--lime-500); }
.kn ul { margin: 0; }
@media (max-width: 760px) { .keep-new__grid { grid-template-columns: 1fr; } }
.morph .dtpop--big { top: 17%; font-size: clamp(18px, 2.4vw, 30px); border-width: 2.5px; border-radius: 14px; box-shadow: 4px 4px 0 #0b2a17; }
