/* =========================================================
   W&S Security – Stylesheet „Story“ (GSAP + three.js)
   Eigenständige Version: eine scrollgesteuerte Geschichte
   mit 3D-Bühne im Hintergrund und Hinweistafeln davor.
   Farben & Schriften wie in der Hauptseite (style.css).
   ========================================================= */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 300 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 300 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --cloud: #f0eee9;
  --paper: #fbfaf7;
  --wax: #e9e2d3;
  --teal-950: #0a2b2d;
  --teal-900: #0d3a3c;
  --teal-700: #12605f;
  --teal-500: #2f8a84;
  --teal-100: #d7e7e3;
  --logo-green: #009640;
  --amber: #e2a75c;
  --amber-deep: #b97a2e;
  --amber-ink: #2b1c0b;
  --alert: #c8553d;
  --ink: #1b2a2b;
  --muted: #586866;
  --line: rgba(27, 42, 43, .12);

  /* Akzent je Story: Veranstaltung = Laternen-Amber (Standard), Objektschutz = Teal (siehe .story--objekt) */
  --accent: var(--amber);
  --accent-rgb: 226, 167, 92;
  --accent-ink: var(--amber-ink);
  --accent-text: var(--amber);
  --accent-deep: var(--amber-deep);

  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gutter: max(16px, 4.5vw);
  --tafel-w: min(410px, 100% - 32px);
}

.story--objekt {
  --accent: var(--teal-500);
  --accent-rgb: 47, 138, 132;
  --accent-ink: #fff;
  --accent-text: var(--teal-100);
  --accent-deep: var(--teal-700);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: #fff;
  background: var(--teal-950);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0 0 .45em; letter-spacing: -.015em; font-optical-sizing: auto; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--amber); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

/* ---------- 3D-Bühne ---------- */
.stage { position: fixed; inset: 0; z-index: 0; background: radial-gradient(120% 90% at 50% 100%, #c98a64 0%, #24384c 45%, #0a1626 100%); }
.stage canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; }
.stage.is-ready canvas { opacity: 1; }
/* sanfter Verlauf hinter Text-Kapiteln und Tafeln (links bzw. unten) */
.stage__scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(6, 18, 22, .55) 0%, rgba(6, 18, 22, .15) 42%, rgba(6, 18, 22, 0) 60%); opacity: var(--scrim, 1); transition: opacity .6s; }
.no-webgl .stage { background: linear-gradient(rgba(10, 43, 45, .55), rgba(10, 43, 45, .85)), url("../img/hero-wache-1400.webp") center / cover; }
.no-webgl .story--objekt .stage { background-image: linear-gradient(rgba(10, 43, 45, .55), rgba(10, 43, 45, .85)), url("../img/objekt-buero-1600.webp"); }

/* ---------- Overlay: Markierung + Leitlinie ---------- */
.overlay { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.overlay__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.overlay__lines path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 5 6; opacity: .9; }
.overlay__lines circle { fill: var(--accent); }
.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; will-change: transform; }
.pin__dot { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .3), 0 0 24px 4px rgba(var(--accent-rgb), .55); }
.pin__ring { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--accent); animation: ring 2.2s var(--ease) infinite; }
.pin__label { position: absolute; left: 16px; top: -34px; white-space: nowrap; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: .32em .7em; border-radius: 999px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }
.pin.is-left .pin__label { left: auto; right: 16px; }
.pin.is-alert .pin__dot { background: var(--alert); box-shadow: 0 0 0 4px rgba(200, 85, 61, .3), 0 0 26px 6px rgba(200, 85, 61, .6); }
.pin.is-alert .pin__ring { border-color: var(--alert); animation-duration: 1.1s; }
.pin.is-alert .pin__label { background: var(--alert); color: #fff; }
@keyframes ring { from { transform: scale(.35); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* ---------- Header ---------- */
.s-header { position: fixed; inset: 0 0 auto; z-index: 20; height: 76px; display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter); background: linear-gradient(rgba(6, 18, 22, .55), rgba(6, 18, 22, 0)); }
.s-brand { width: 170px; flex: none; }
.s-brand img { width: 100%; height: auto; }
.s-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: .93rem; font-weight: 600; }
.s-nav a:not(.s-btn) { text-decoration: none; opacity: .85; transition: opacity .2s; }
.s-nav a:not(.s-btn):hover { opacity: 1; }
.s-phone { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: .95rem; }
.s-phone small { display: block; font-size: .68rem; opacity: .75; font-weight: 500; letter-spacing: .03em; }
.s-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--logo-green); position: relative; flex: none; }
.s-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--logo-green); animation: pulse 2s infinite; }
@keyframes pulse { to { transform: scale(2.8); opacity: 0; } }

/* ---------- Buttons ---------- */
.s-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.5em; border-radius: 999px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .96rem; text-decoration: none; white-space: nowrap; transition: transform .3s var(--ease), background .3s, box-shadow .3s; }
.s-btn:hover { transform: translateY(-2px); }
.s-btn--accent { background: var(--amber); color: var(--amber-ink); box-shadow: 0 10px 30px -12px rgba(226, 167, 92, .9); }
.s-btn--accent:hover { background: #e9b56f; }
.s-btn--glass { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.s-btn--glass:hover { background: rgba(255, 255, 255, .2); }
.s-btn--small { padding: .55em 1.1em; font-size: .88rem; }
.s-btn--lg { padding: 1em 1.8em; font-size: 1.02rem; }

/* ---------- HUD (Uhr) ---------- */
.hud { position: fixed; left: var(--gutter); bottom: 26px; z-index: 10; display: grid; grid-template-columns: auto auto auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 10px 18px 10px 12px; border-radius: 18px; background: rgba(8, 24, 28, .55); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transform: translateY(12px); transition: opacity .5s, transform .5s var(--ease); }
.hud.is-on { opacity: 1; transform: none; }
.hud__icon { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; position: relative; background: var(--amber); box-shadow: 0 0 18px rgba(226, 167, 92, .7); transition: background .6s, box-shadow .6s; }
.hud__icon.is-night { background: #dfe7f2; box-shadow: 0 0 16px rgba(200, 220, 255, .55); }
.hud__icon.is-night::after { content: ""; position: absolute; width: 26px; height: 26px; top: -3px; left: 11px; border-radius: 50%; background: rgba(8, 24, 28, .95); }
.hud__day { font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.hud__time { grid-column: 2; font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.hud__chapter { grid-column: 3; grid-row: 1 / span 2; padding-left: 14px; margin-left: 4px; border-left: 1px solid rgba(255, 255, 255, .2); font-size: .82rem; font-weight: 600; color: var(--accent-text); }

/* ---------- Kapitelnavigation ---------- */
.chapters { position: fixed; right: var(--gutter); top: 50%; z-index: 10; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.chapters a { display: flex; align-items: center; justify-content: flex-end; gap: 10px; text-decoration: none; font-size: .74rem; font-weight: 600; letter-spacing: .04em; color: rgba(255, 255, 255, .7); padding: 4px 0; }
.chapters a span { opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .3s var(--ease); text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.chapters a i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .35); transition: background .3s, transform .3s var(--ease), box-shadow .3s; flex: none; }
.chapters a.is-sep { margin-top: 10px; }
.chapters a:hover span, .chapters a.is-active span { opacity: 1; transform: none; }
.chapters a.is-active { color: #fff; }
.chapters a.is-active i { background: var(--accent); transform: scale(1.5); box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .25); }
.chapters a.is-done i { background: rgba(var(--accent-rgb), .6); }

/* ---------- Story-Abschnitte ---------- */
.story { position: relative; z-index: 3; }
.beat { position: relative; height: calc(var(--h, 2) * 100vh); height: calc(var(--h, 2) * 100svh); }
.beat__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; padding: 96px var(--gutter) 110px; }

/* Titel (Prolog / Epilog) */
.title-block { max-width: 760px; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.title-block h1, .title-block h2 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); }
.title-block__lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 560px; color: rgba(255, 255, 255, .88); }
.title-block__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }
.outro-lines span { display: inline-block; color: rgba(255, 255, 255, .92); }
.outro-lines em { display: block; }
.s-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 1.2em; }
.s-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .25); }
.scroll-hint { display: inline-flex; align-items: center; gap: 12px; margin-top: 1.4em; font-size: .85rem; font-weight: 600; opacity: .8; }
.scroll-hint span { width: 22px; height: 34px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 12px; position: relative; }
.scroll-hint span::after { content: ""; position: absolute; left: 50%; top: 6px; width: 4px; height: 7px; margin-left: -2px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* Kapitelkarten */
.chapter-block { max-width: 620px; text-shadow: 0 2px 30px rgba(0, 0, 0, .4); }
.chapter-block .chapter-block__num { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: .4em .9em; border-radius: 999px; text-shadow: none; margin-bottom: 1.3em; }
.chapter-block h2 { font-size: clamp(2.3rem, 5.2vw, 4.4rem); }
.chapter-block p { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: rgba(255, 255, 255, .88); max-width: 480px; }

/* ---------- Hinweistafel ---------- */
.tafel {
  width: var(--tafel-w);
  position: relative;
  color: var(--ink);
  background: var(--paper);
  border-radius: var(--radius);
  padding: 22px 24px 20px;
  box-shadow: 0 2px 0 rgba(255, 255, 255, .6) inset, 0 30px 60px -24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
  font-size: .95rem;
  line-height: 1.55;
}
/* Akzentkante links wie bei einem Hinweisschild */
.tafel::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
.tafel__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); }
.tafel__kicker { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-700); }
.tafel__time { font-family: var(--serif); font-size: 2rem; font-weight: 600; line-height: 1; color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.tafel h3 { font-size: 1.55rem; margin-bottom: .4em; }
.tafel p { color: #3a4a4a; }
.tafel__label { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted) !important; margin: 1.1em 0 .5em; }
.tafel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tafel li { position: relative; padding-left: 30px; }
.tafel li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--teal-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312605f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; }
.tafel--alert::before { background: var(--alert); }
.tafel--alert .tafel__time { color: var(--alert); }

/* Wechsel zur anderen Story (im Epilog) */
.story-switch { display: inline-flex; align-items: center; gap: 14px; margin-top: 2.2em; padding: 12px 20px 12px 12px; border-radius: 18px; text-decoration: none; text-shadow: none; background: rgba(8, 24, 28, .55); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background .3s, transform .3s var(--ease); }
.story-switch:hover { background: rgba(8, 24, 28, .75); transform: translateY(-2px); }
.story-switch__icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--amber-ink); background: var(--amber); }
.story--event .story-switch__icon { color: #fff; background: var(--teal-500); }
.story-switch__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.story-switch small { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.story-switch strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }

/* ---------- Auswahlseite (story.html) ---------- */
.hub-page { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(90% 70% at 85% 0%, rgba(226, 167, 92, .22), transparent 60%), var(--teal-950); }
.hub { flex: 1; width: min(1100px, 100% - 32px); margin: 0 auto; padding: 140px 0 80px; }
.hub h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); }
.hub__lead { max-width: 560px; font-size: 1.15rem; color: rgba(255, 255, 255, .8); margin-bottom: 2.4em; }
.hub__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.hub-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .6); transition: transform .4s var(--ease), box-shadow .4s; }
.hub-card:hover { transform: translateY(-4px); box-shadow: 0 40px 70px -28px rgba(0, 0, 0, .7); }
.hub-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 4px solid var(--accent); }
.hub-card__body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 26px; }
.hub-card__body strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; line-height: 1.15; }
.hub-card__body > span:not([class]) { color: var(--muted); font-size: .96rem; }
.hub-card__kicker { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); }
.hub-card__cta { margin-top: 6px; font-weight: 700; color: var(--teal-700); }
@media (max-width: 760px) { .hub__grid { grid-template-columns: 1fr; } .hub { padding-top: 110px; } }

/* ---------- Footer ---------- */
.s-footer { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; padding: 28px var(--gutter) 34px; background: var(--teal-950); font-size: .85rem; color: rgba(255, 255, 255, .7); }
.s-footer p { margin: 0; }
.s-footer nav { display: flex; gap: 20px; }
.s-footer a { text-decoration: none; }
.s-footer a:hover { color: #fff; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .s-nav a:not(.s-btn) { display: none; }
  .chapters { display: none; }
  .stage__scrim { background: linear-gradient(0deg, rgba(6, 18, 22, .6) 0%, rgba(6, 18, 22, .1) 45%, rgba(6, 18, 22, 0) 60%); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .s-header { height: 64px; gap: 12px; }
  .s-brand { width: 132px; }
  .s-nav { display: none; }
  .s-phone { margin-left: auto; font-size: .88rem; }
  .beat__sticky { padding: 80px 16px 24px; }
  .beat--moment .beat__sticky { align-items: flex-end; }
  .beat--title .beat__sticky, .beat--chapter .beat__sticky { align-items: flex-end; padding-bottom: 110px; }
  .tafel { width: 100%; padding: 18px 18px 16px; font-size: .9rem; }
  .tafel h3 { font-size: 1.3rem; }
  .tafel__time { font-size: 1.6rem; }
  .tafel ul { gap: 6px; }
  .tafel > p:not(.tafel__label) { margin-bottom: .6em; }
  .hud { top: 74px; bottom: auto; left: 16px; padding: 7px 14px 7px 9px; }
  .hud__icon { width: 26px; height: 26px; }
  .hud__icon.is-night::after { width: 20px; height: 20px; left: 8px; }
  .hud__time { font-size: 1.3rem; }
  .pin__label { font-size: .64rem; }
}
@media (max-width: 640px) {
  /* Prolog/Epilog: unten wenig Abstand (die Uhr sitzt auf Handys oben), damit lange Titel auch auf kleinen Handys ganz ins Bild passen */
  .beat--title .beat__sticky { padding-bottom: 48px; }
  .beat--outro .beat__sticky { padding-bottom: 28px; }
  .title-block--outro .s-eyebrow { margin-bottom: .8em; }
  .title-block--outro h2 { font-size: clamp(2rem, 9.4vw, 2.6rem); }
  .title-block--outro .title-block__lead { font-size: .98rem; margin-bottom: 0; }
  .title-block__ctas { gap: 10px; margin-top: 1.2em; }
  .title-block__ctas .s-btn { padding: .8em 1.3em; font-size: .94rem; }
  .story-switch { margin-top: 1.2em; padding: 10px 16px 10px 10px; gap: 12px; }
  .story-switch__icon { width: 36px; height: 36px; }
  .story-switch strong { font-size: 1.02rem; }
}
@media (max-width: 640px) and (max-height: 700px) {
  .tafel ul li:nth-child(3) { display: none; }
  .title-block--outro .title-block__lead { display: none; }
}

/* ---------- Ohne JavaScript bzw. mit reduzierter Bewegung ---------- */
.no-js .beat { height: auto; }
.no-js .beat__sticky { position: relative; height: auto; min-height: 70vh; }
@media (prefers-reduced-motion: reduce) {
  .pin__ring, .s-pulse::after, .scroll-hint span::after { animation: none; }
}
