/* ══════════════════════════════════════════════════════════════════════════
   Der Bierkönig — story template
   Dark dramatic beer-hall aesthetic · Playfair Display + Inter
   ══════════════════════════════════════════════════════════════════════════ */

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

:root {
  --ink:     #0d0d0d;
  --gold:    #f5a623;
  --gold-dk: #c47f00;
  --cream:   #f2e8d5;
  --muted:   #a89070;
  --panel-a: #111008;
  --panel-b: #0a0a14;
  --font-h:  'Playfair Display', Georgia, serif;
  --font-b:  'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body.is-story {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-b);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.story-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 20% 50%, #1a1000 0%, #0d0d0d 70%);
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(245,166,35,0.04) 0px,
      rgba(245,166,35,0.04) 1px,
      transparent 1px,
      transparent 40px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(245,166,35,0.04) 0px,
      rgba(245,166,35,0.04) 1px,
      transparent 1px,
      transparent 40px
    );
  pointer-events: none;
}

/* Rising beer bubbles */
.hero-bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-bubbles span {
  position: absolute;
  bottom: -20px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(245,166,35,0.25);
  animation: bubble-rise 6s ease-in infinite;
}
.hero-bubbles span:nth-child(1)  { left:  8%; width:  6px; height:  6px; animation-delay: 0s;    animation-duration: 7s; }
.hero-bubbles span:nth-child(2)  { left: 16%; width: 12px; height: 12px; animation-delay: 1.2s;  animation-duration: 5s; }
.hero-bubbles span:nth-child(3)  { left: 27%; width:  5px; height:  5px; animation-delay: 0.5s;  animation-duration: 8s; }
.hero-bubbles span:nth-child(4)  { left: 38%; width: 10px; height: 10px; animation-delay: 2.1s;  animation-duration: 6s; }
.hero-bubbles span:nth-child(5)  { left: 52%; width:  7px; height:  7px; animation-delay: 0.8s;  animation-duration: 7.5s; }
.hero-bubbles span:nth-child(6)  { left: 63%; width: 14px; height: 14px; animation-delay: 1.7s;  animation-duration: 5.5s; }
.hero-bubbles span:nth-child(7)  { left: 71%; width:  6px; height:  6px; animation-delay: 3s;    animation-duration: 9s; }
.hero-bubbles span:nth-child(8)  { left: 80%; width:  9px; height:  9px; animation-delay: 0.3s;  animation-duration: 6.5s; }
.hero-bubbles span:nth-child(9)  { left: 88%; width:  4px; height:  4px; animation-delay: 2.5s;  animation-duration: 7s; }
.hero-bubbles span:nth-child(10) { left: 95%; width: 11px; height: 11px; animation-delay: 1s;    animation-duration: 5.8s; }

@keyframes bubble-rise {
  0%   { transform: translateY(0)   scale(1);   opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(-105vh) scale(1.3); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-kicker {
  font-family: var(--font-b);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .8;
}

.hero-title {
  font-family: var(--font-h);
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 900;
  line-height: .95;
  color: var(--cream);
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
  display: block;
  font-size: clamp(4rem, 11vw, 9rem);
}

.hero-epigram {
  font-family: var(--font-h);
  font-style: italic;
  color: var(--muted);
  font-size: .95rem;
}

.hero-labels { display: flex; flex-wrap: wrap; gap: .5rem; }

.label-tag {
  display: inline-block;
  padding: .2rem .7rem;
  border: 1px solid rgba(245,166,35,0.4);
  border-radius: 2rem;
  color: var(--gold);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}
.label-tag:hover { background: rgba(245,166,35,0.15); border-color: var(--gold); }

.hero-scroll-cue {
  display: inline-flex;
  color: var(--gold);
  opacity: .6;
  animation: bounce 2s ease-in-out infinite;
  width: fit-content;
}
.hero-scroll-cue:hover { opacity: 1; }

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

.hero-image-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 1rem;
}

.hero-img {
  max-width: 100%;
  max-height: 55vh;
  object-fit: contain;
  border: 2px solid rgba(245,166,35,0.3);
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(245,166,35,0.15), 0 20px 60px rgba(0,0,0,0.6);
  transition: transform .3s, box-shadow .3s;
  cursor: pointer;
}
.hero-img:hover {
  transform: scale(1.02);
  box-shadow: 0 0 80px rgba(245,166,35,0.25), 0 20px 80px rgba(0,0,0,0.7);
}

.hero-img-caption {
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.story-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 2rem;
  background: rgba(13,13,13,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(245,166,35,0.2);
  transform: translateY(-100%);
  transition: transform .35s ease;
}
.story-topbar.visible { transform: translateY(0); }

.topbar-home {
  font-family: var(--font-h);
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  font-size: 1.1rem;
}
.topbar-title {
  font-family: var(--font-h);
  font-style: italic;
  color: var(--cream);
  flex: 1;
}
.topbar-date {
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .05em;
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.panel {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 5vw, 5rem);
  position: relative;
}
.panel.split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2rem, 4vw, 4rem);
  min-height: 70vh;
}
.panel.split.alt { grid-template-columns: 2fr 1fr; }

/* Alternating backgrounds */
.panel:nth-of-type(odd)  { background: var(--panel-a); }
.panel:nth-of-type(even) { background: var(--panel-b); }

/* Reveal animations */
[data-reveal] { opacity: 0; transition: opacity .7s ease, transform .7s ease; }
[data-reveal="left"]  { transform: translateX(-40px); }
[data-reveal="right"] { transform: translateX(40px); }
[data-reveal="up"]    { transform: translateY(30px); }
[data-reveal].in-view { opacity: 1; transform: none; }

/* Speaker block */
.panel-speaker {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 2rem 1rem;
  border-right: 2px solid rgba(245,166,35,0.2);
  text-align: center;
}
.panel-speaker.right { border-right: none; border-left: 2px solid rgba(245,166,35,0.2); }

.speaker-badge {
  font-family: var(--font-b);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(245,166,35,0.1);
  padding: .3rem .8rem;
  border-radius: 2rem;
  border: 1px solid rgba(245,166,35,0.3);
}
.speaker-name {
  font-family: var(--font-h);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 700;
  color: var(--cream);
}
.speaker-deco { font-size: 2.5rem; margin-top: .5rem; }

/* Verse */
.panel-text {
  display: flex;
  align-items: center;
  padding: 2rem 0;
}

blockquote.verse {
  font-family: var(--font-h);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.85;
  color: var(--cream);
  font-style: normal;
  border-left: 3px solid var(--gold);
  padding-left: 1.5rem;
  position: relative;
}
blockquote.verse::before {
  content: '\201E';
  position: absolute;
  left: -.6rem;
  top: -.4rem;
  font-size: 3rem;
  color: var(--gold);
  opacity: .4;
  line-height: 1;
}
.verse.verse-center { border-left: none; padding-left: 0; text-align: center; }
.verse.verse-center::before { display: none; }

.speaker-inline {
  font-size: .85em;
  color: var(--gold);
  font-style: italic;
  font-family: var(--font-b);
}

/* Full-bleed panel */
.panel.full-bleed {
  background: linear-gradient(135deg, #1a0e00 0%, #0d0a00 50%, #0a0a0a 100%);
  min-height: 50vh;
  justify-content: center;
}
.full-verse-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}
.full-verse-deco { font-size: 3.5rem; animation: sway 4s ease-in-out infinite; }
@keyframes sway {
  0%, 100% { transform: rotate(-5deg); }
  50%       { transform: rotate(5deg); }
}

/* Scene dividers */
.scene-divider {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem clamp(2rem, 5vw, 5rem);
  background: var(--ink);
}
.scene-divider svg { flex: 1; }
.scene-label {
  font-family: var(--font-b);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  opacity: .7;
}

/* Finale */
.panel.finale {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  background: radial-gradient(ellipse at 50% 0%, #201000 0%, #0d0d0d 70%);
  padding-bottom: 6rem;
  min-height: 80vh;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.finale-crown { font-size: 4rem; animation: crown-glow 3s ease-in-out infinite; }
@keyframes crown-glow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(245,166,35,0.5)); transform: translateY(0); }
  50%       { filter: drop-shadow(0 0 25px rgba(245,166,35,0.9)); transform: translateY(-5px); }
}
.finale-title {
  font-family: var(--font-h);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-style: italic;
  color: var(--gold);
}
.finale-verse {
  max-width: 640px;
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
}
.finale-speaker {
  font-family: var(--font-h);
  font-style: italic;
  color: var(--muted);
  font-size: .95rem;
}
.finale-foam {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80'%3E%3Cellipse cx='100' cy='80' rx='90' ry='50' fill='rgba(245,166,35,0.06)'/%3E%3Cellipse cx='280' cy='75' rx='120' ry='55' fill='rgba(245,166,35,0.04)'/%3E%3Cellipse cx='500' cy='80' rx='100' ry='45' fill='rgba(245,166,35,0.07)'/%3E%3Cellipse cx='750' cy='72' rx='140' ry='60' fill='rgba(245,166,35,0.04)'/%3E%3Cellipse cx='980' cy='78' rx='110' ry='50' fill='rgba(245,166,35,0.06)'/%3E%3Cellipse cx='1150' cy='80' rx='90' ry='48' fill='rgba(245,166,35,0.05)'/%3E%3C/svg%3E") center bottom / cover no-repeat;
  pointer-events: none;
}

/* Collections nav */
.event-collections {
  padding: 2rem clamp(2rem, 5vw, 5rem);
  background: #070707;
  border-top: 1px solid rgba(245,166,35,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .85rem;
}
.event-collections a { color: var(--muted); text-decoration: none; }
.event-collections a:hover { color: var(--gold); }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .story-hero { grid-template-columns: 1fr; }
  .hero-image-wrap { padding: 2rem 1.5rem 3rem; }
  .panel.split, .panel.split.alt { grid-template-columns: 1fr; }
  .panel-speaker { border: none !important; border-bottom: 2px solid rgba(245,166,35,0.2) !important; padding-bottom: 1.5rem; flex-direction: row; justify-content: flex-start; gap: 1rem; }
  .panel-speaker.right { flex-direction: row-reverse; }
  .panel-text { padding: 0; }
}

/* ── Lightbox ── */
#lightbox{display:none;position:fixed;inset:0;background:rgba(0,0,0,.9);
  z-index:9999;align-items:center;justify-content:center;
  flex-direction:column;gap:.5rem}
#lightbox img{max-width:90vw;max-height:80vh;object-fit:contain}
.lb-close{position:fixed;top:1rem;right:1.5rem;font-size:2.5rem;
  color:#fff;cursor:pointer;line-height:1;opacity:.8}
.lb-close:hover{opacity:1}
.lb-nav{position:fixed;top:50%;transform:translateY(-50%);font-size:3rem;
  color:#fff;cursor:pointer;padding:.5rem;user-select:none;opacity:.7}
.lb-nav:hover{opacity:1}
.lb-prev{left:1rem}.lb-next{right:1rem}
.lb-caption{color:#ccc;font-size:.9rem;text-align:center;max-width:80vw}

/* ── Collection links ── */
nav.event-collections{{display:flex;flex-wrap:wrap;gap:.5rem 1rem;padding:1rem 1.5rem;border-top:1px solid rgba(128,128,128,.2);font-family:var(--font-head,sans-serif);font-size:.82rem}}
