/* Scroll-Geschichte der Startseite.
   Ohne JavaScript und bei „Bewegung reduzieren“: alle Szenen stehen untereinander.
   Mit .is-live (setzt main.js): fixierte Bühne, Szenen wechseln beim Scrollen, Text unten. */

.story { position: relative; }
.story-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; max-width: var(--wrap); margin-inline: auto; padding: clamp(24px, 4vw, 40px) max(20px, env(safe-area-inset-right, 0px)) 0 max(20px, env(safe-area-inset-left, 0px)); }
.story.is-live .story-intro { position: absolute; top: 0; left: 0; right: 0; z-index: 3; padding-top: 10px; padding-right: 140px; }
@media (max-width: 700px) {
  .story.is-live .story-intro .eyebrow { display: none; }
  .story.is-live .story-intro { padding-right: 110px; padding-top: 4px; }
  .story.is-live .call-head small { display: none; }
  .story.is-live .ring { width: 38px; height: 38px; }
  .story.is-live .ring svg { width: 18px; height: 18px; }
  .story.is-live .phone { height: min(100%, 560px); }
  .story.is-live .bubble p, .story.is-live .sms p { font-size: 13px; line-height: 1.4; }
  .story.is-live .scene { padding-top: 60px; }
  .story.is-live .phone-screen { align-content: end; }
}
.skip-story { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 15px; }
.skip-story:focus { color: var(--text); }

.stage { position: relative; }
.stage-count { display: none; }
.stage-progress { display: none; }

.scene { display: grid; grid-template-rows: auto auto; gap: 28px; padding-block: 48px; border-bottom: 1px solid var(--line); }
.scene:last-child { border-bottom: 0; }
.visual { position: relative; display: grid; place-items: center; min-height: 0; }
.caption { display: grid; gap: 14px; max-width: 760px; }
.caption .h1, .caption h2 { font-size: clamp(34px, 6.2vw, 92px); font-weight: 760; letter-spacing: -.035em; line-height: 1; }
.caption p { color: var(--soft); font-size: clamp(17px, 1.5vw, 20px); max-width: 52ch; }
.caption .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Live-Modus */
.story.is-live { height: calc(var(--scenes, 6) * 100svh); }
.story.is-live .stage { position: sticky; top: calc(var(--header) + env(safe-area-inset-top, 0px)); height: calc(100svh - var(--header) - env(safe-area-inset-top, 0px)); overflow: hidden; }
.story.is-live .scene { position: absolute; inset: 0; grid-template-rows: minmax(0, 1fr) auto; gap: 18px; padding: 56px max(20px, env(safe-area-inset-right, 0px)) clamp(28px, 4vh, 48px) max(20px, env(safe-area-inset-left, 0px)); max-width: var(--wrap); margin-inline: auto; border: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
.story.is-live .scene.is-active { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.story.is-live .caption { align-self: end; max-width: 1100px; gap: 10px; }
.story.is-live .caption .h1, .story.is-live .caption h2 { font-size: clamp(28px, min(5.4vw, 7vh), 80px); }
.story.is-live .caption p { font-size: clamp(16px, min(1.5vw, 2.3vh), 20px); }
.story.is-live .browser { width: auto; height: min(100%, 560px); max-width: 100%; }
.story.is-live .cal { max-height: 100%; overflow: hidden; }
.story.is-live .cal-day { min-height: 0; }
.story.is-live .phone { height: min(100%, 600px); width: auto; }
.story.is-live .final-visual img { height: min(100%, 220px); width: auto; }
.story.is-live .scene { padding-top: 84px; }
.story.is-live .phone-screen { gap: 8px; padding: 12px 14px; }
.story.is-live .call-head { padding: 4px 0 10px; gap: 4px; }
.story.is-live .ring { width: 46px; height: 46px; }
.story.is-live .ring svg { width: 22px; height: 22px; }
.story.is-live .bubble p, .story.is-live .sms p { font-size: 13.5px; padding: 8px 11px; }
.story.is-live .stage-count { display: block; position: absolute; top: 18px; right: max(20px, env(safe-area-inset-right, 0px)); z-index: 3; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.story.is-live .stage-count b { color: var(--blue-bright); font-weight: 600; }
.story.is-live .stage-progress { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); z-index: 3; }
.story.is-live .stage-progress i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--blue-bright); }
.story.is-live .visual { height: 100%; }
@media (max-height: 640px) and (orientation: landscape) { .story.is-live .scene { grid-template-rows: minmax(0, 1fr) auto; } .caption .h1, .caption h2 { font-size: clamp(26px, 4vw, 44px); } .caption p { display: none; } }

/* Browser-Rahmen */
.browser { width: min(100%, 880px); aspect-ratio: 16 / 10; max-height: 100%; border-radius: 14px; border: 1px solid var(--line-2); background: #1A262E; overflow: hidden; display: grid; grid-template-rows: 36px 1fr; box-shadow: 0 40px 90px rgba(0, 0, 0, .55); }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #121C22; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 10px; height: 10px; border-radius: 50%; background: #34444F; }
.browser-bar span { margin-left: 12px; font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-view { position: relative; overflow: hidden; }
.layer { position: absolute; inset: 0; overflow: hidden; }
.visual .tag { position: absolute; top: 12px; left: 12px; z-index: 4; }

/* Alte Beispiel-Seite (bewusst veraltet) */
.old { background: #E7E3D7; color: #222; font-family: "Times New Roman", Times, serif; padding: 3.2% 4%; display: grid; grid-template-columns: 22% 1fr; grid-template-rows: auto 1fr auto; gap: 3%; font-size: clamp(9px, 1.25vw, 14px); line-height: 1.35; }
.old-banner { grid-column: 1 / -1; background: #3B5998; color: #FFF7B0; text-align: center; padding: 2% 0; font-weight: bold; font-size: 1.6em; border: 3px ridge #8FA6D6; }
.old-nav { display: grid; gap: .5em; align-content: start; background: #D3CEBD; border: 2px inset #B9B3A0; padding: 6%; }
.old-nav u { color: #0000CC; }
.old-main { display: grid; gap: .7em; align-content: start; }
.old-main b { font-size: 1.15em; color: #8B0000; }
.old-img { height: 5.5em; background: repeating-linear-gradient(45deg, #C9C3B0 0 6px, #BDB6A1 6px 12px); border: 2px solid #999; display: grid; place-items: center; color: #666; font-size: .85em; }
.old-foot { grid-column: 1 / -1; text-align: center; font-size: .8em; color: #555; border-top: 1px solid #999; padding-top: .6em; }
.counter { font-family: "Courier New", monospace; background: #000; color: #3F3; padding: 0 .4em; }

/* Neue Beispiel-Seite */
.new { background: #F5F7F8; color: #0D1A22; font-family: var(--body); clip-path: inset(0 calc(100% - var(--wipe, 0%)) 0 0); display: grid; grid-template-rows: auto 1fr; }
.story:not(.is-live) .new { clip-path: none; }
.wipe-line { position: absolute; top: 0; bottom: 0; left: var(--wipe, 0%); width: 3px; background: var(--accent); box-shadow: 0 0 0 6px rgba(214, 217, 222, .18); z-index: 3; transform: translateX(-50%); }
.story:not(.is-live) .wipe-line { display: none; }
.new-nav { display: flex; justify-content: space-between; align-items: center; padding: 2.4% 4%; font-size: clamp(9px, 1.1vw, 13px); font-weight: 600; }
.new-nav b { font-family: var(--display); font-stretch: 112%; letter-spacing: .08em; }
.new-nav span { background: #0D1A22; color: #fff; padding: .5em 1em; border-radius: 99px; }
.new-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 4%; padding: 2% 4% 4%; align-items: center; }
.new-hero h3 { font-size: clamp(16px, 3.6vw, 44px); font-weight: 760; line-height: 1; letter-spacing: -.03em; }
.new-hero p { font-size: clamp(9px, 1.1vw, 14px); color: #3D4D57; margin-top: .8em; }
.new-btns { display: flex; gap: .6em; margin-top: 1.2em; font-size: clamp(9px, 1.05vw, 13px); font-weight: 650; }
.new-btns span { background: var(--accent); color: var(--accent-ink); padding: .7em 1.2em; border-radius: 99px; }
.new-btns span + span { background: transparent; border: 1.5px solid #0D1A22; color: #0D1A22; }
.new-img { aspect-ratio: 4 / 3.2; border-radius: 12px; background: linear-gradient(160deg, #20323D, #0D1A22); display: grid; place-items: center; color: #9FB0BC; font-size: clamp(9px, 1vw, 12px); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.new-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2%; padding: 0 4% 4%; }
.new-cards span { background: #fff; border: 1px solid #DCE3E7; border-radius: 10px; padding: 7% 8%; font-size: clamp(8px, .95vw, 12px); font-weight: 650; }

/* Handy */
.phone { position: relative; width: min(330px, 78vw); height: min(100%, 640px); max-height: 640px; aspect-ratio: 9 / 18.5; border-radius: 42px; border: 10px solid #1F2C34; background: #0E171D; box-shadow: 0 40px 90px rgba(0, 0, 0, .55); display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.story:not(.is-live) .phone { height: auto; min-height: 520px; }
.phone-notch { justify-self: center; width: 34%; height: 22px; margin-top: 8px; border-radius: 99px; background: #1F2C34; }
.phone-screen { display: grid; align-content: start; gap: 12px; padding: 18px 16px; overflow: hidden; }
.call-head { display: grid; justify-items: center; gap: 6px; padding: 10px 0 14px; border-bottom: 1px solid var(--line); text-align: center; }
.call-head strong { font-size: 18px; }
.call-head small { color: var(--muted); font-size: 13px; }
.ring { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); }
.ring svg { width: 28px; height: 28px; }
.is-active .ring { animation: ring 1.2s ease-in-out infinite; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(214, 217, 222, .5); } 50% { box-shadow: 0 0 0 16px rgba(214, 217, 222, 0); } }
.bubble { display: grid; gap: 4px; max-width: 88%; }
.bubble span { font-size: 12px; font-weight: 650; color: var(--muted); }
.bubble p { padding: 10px 13px; border-radius: 16px 16px 16px 4px; background: var(--surface-2); font-size: 14.5px; line-height: 1.45; color: var(--text); }
.bubble.me { justify-self: end; }
.bubble.me span { text-align: right; }
.bubble.me p { border-radius: 16px 16px 4px 16px; background: transparent; border: 1px solid var(--line-2); color: var(--soft); }
.story.is-live .scene .pop { opacity: 0; transform: translateY(10px); }
.story.is-live .scene.is-active .pop { animation: pop .45s ease forwards; animation-delay: calc(var(--d, 0) * 1s); }
@keyframes pop { to { opacity: 1; transform: none; } }
.sms-head { display: grid; justify-items: center; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.sms-head .av { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; color: var(--accent); }
.sms-head small { color: var(--muted); font-size: 12px; }
.sms { display: grid; gap: 4px; }
.sms small { text-align: center; color: var(--muted); font-size: 12px; }
.sms p { padding: 12px 14px; border-radius: 18px 18px 18px 5px; background: var(--surface-2); font-size: 14.5px; line-height: 1.5; max-width: 92%; }
.sms a, .sms u { color: var(--blue-bright); text-decoration: underline; text-underline-offset: 3px; }

/* Kalender */
.cal { width: min(100%, 860px); max-height: 100%; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); padding: clamp(14px, 2vw, 24px); display: grid; gap: 14px; box-shadow: 0 40px 90px rgba(0, 0, 0, .5); }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-right: 92px; }
.cal-head strong { font-family: var(--display); font-stretch: 112%; font-size: clamp(16px, 1.8vw, 22px); }
.cal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.cal-day { display: grid; gap: 8px; align-content: start; min-height: clamp(150px, 28vh, 300px); padding: 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.cal-day > b { font-size: 13px; color: var(--muted); font-weight: 600; }
.ev { padding: 8px 9px; border-radius: 8px; background: var(--blue-soft); border-left: 3px solid var(--blue-bright); font-size: 12.5px; line-height: 1.3; color: var(--text); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 560px) { .ev { font-size: 12px; padding: 7px; } .cal-grid { gap: 6px; } .cal-day { padding: 7px; } }
.ev small { display: block; color: var(--muted); font-family: var(--mono); font-size: 11.5px; }
@media (max-width: 560px) { .cal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .cal-day:nth-child(n+4) { display: none; } }

/* Abschluss-Szene */
.final-visual img { width: clamp(120px, 22vw, 240px); height: auto; opacity: .95; }
.final-visual { gap: 18px; }

@media (max-width: 700px) {
  .browser { aspect-ratio: 4 / 5; }
  .old { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr auto; }
  .old-nav { grid-auto-flow: column; grid-template-columns: repeat(3, auto); justify-content: start; gap: .8em; padding: 3%; }
  .new-hero { grid-template-columns: 1fr; }
  .new-img { aspect-ratio: 16 / 9; }
  .new-hero h3 { font-size: clamp(22px, 7vw, 34px); }
  .new-hero p, .new-btns, .new-nav, .new-cards span { font-size: 12px; }
  .old { font-size: 12px; }
  .story.is-live .scene { padding-top: 48px; }
}
