/* ============================================================
   Zeitreise — Fullscreen Cinematic Presentation
   Each entry fills the entire screen like a projected slideshow.
   ============================================================ */
:root {
  --zr-bg: #08060A;
  --zr-text: #EDE5D5;
  --zr-dim: #9B9286;
  --zr-gold: #C9A84C;
  --zr-gold-dim: rgba(201,168,76,.15);
  --zr-border: rgba(201,168,76,.18);
  --zr-ease: cubic-bezier(.22,1,.36,1);
  --zr-rail-w: 220px;
}

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

.zr-body {
  font-family: 'Inter', sans-serif;
  background: var(--zr-bg);
  color: var(--zr-text);
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ====== Intro ====== */
.zr-intro {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(201,168,76,.06), transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(122,46,46,.06), transparent 50%),
    var(--zr-bg);
  overflow: hidden;
}
.zr-intro::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 40h80M40 0v80' stroke='%23C9A84C' stroke-opacity='.025' stroke-width='.5'/%3E%3C/svg%3E");
}
.zr-intro--leaving { opacity: 0; transition: opacity .6s var(--zr-ease); pointer-events: none; }

.zr-intro-content { text-align: center; animation: zrUp .7s var(--zr-ease) both; position: relative; z-index: 1; }
.zr-intro-icon { font-size: 3.5rem; color: var(--zr-gold); display: block; margin-bottom: 1.5rem; opacity: .8; }
.zr-intro-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 900; letter-spacing: -.03em; line-height: 1;
  color: var(--zr-text); margin-bottom: .6rem;
}
.zr-intro-subtitle { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.15rem; color: var(--zr-dim); margin-bottom: .3rem; }

/* Filter panel */
.zr-filter {
  width: 100%; max-width: 480px; margin: 0 auto 2rem;
  text-align: left; animation: zrUp .7s var(--zr-ease) .15s both;
}
.zr-filter-group { margin-bottom: 1.25rem; }
.zr-filter-label {
  display: flex; align-items: center; gap: .4rem;
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--zr-gold); margin-bottom: .55rem;
}
.zr-filter-label .material-symbols-outlined { font-size: 1rem; }
.zr-filter-range { display: flex; align-items: center; gap: .6rem; }
.zr-filter-input {
  width: 100px; padding: .5rem .7rem; border: 1px solid var(--zr-border);
  border-radius: 10px; background: rgba(255,255,255,.05); color: var(--zr-text);
  font-size: .95rem; font-weight: 600; text-align: center;
  font-variant-numeric: tabular-nums; outline: none; transition: border-color .2s;
}
.zr-filter-input:focus { border-color: var(--zr-gold); }
.zr-filter-range-sep { color: var(--zr-dim); font-weight: 600; }
.zr-filter-types { display: flex; flex-wrap: wrap; gap: .45rem; }
.zr-type-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .4rem .75rem; border-radius: 999px;
  border: 1px solid var(--zr-border); background: transparent;
  font-size: .8rem; font-weight: 600; color: var(--zr-dim);
  cursor: pointer; transition: all .2s var(--zr-ease); user-select: none;
}
.zr-type-chip .material-symbols-outlined { font-size: .95rem; }
.zr-type-chip input { display: none; }
.zr-type-chip:has(input:checked) { background: var(--zr-gold); color: var(--zr-bg); border-color: var(--zr-gold); }
.zr-type-chip:hover { border-color: var(--zr-gold); color: var(--zr-text); }
.zr-filter-select-all {
  margin-top: .5rem; font-size: .72rem; font-weight: 600;
  color: var(--zr-dim); background: none; border: none; cursor: pointer;
  text-decoration: underline; transition: color .2s;
}
.zr-filter-select-all:hover { color: var(--zr-text); }
.zr-filter-count { text-align: center; font-size: .9rem; font-weight: 700; color: var(--zr-text); margin-bottom: .5rem; }
.zr-filter-count span { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--zr-gold); }

.zr-start-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 1rem 3rem; background: linear-gradient(135deg, var(--zr-gold), #B8942F); color: var(--zr-bg);
  font-size: 1.05rem; font-weight: 700; border: none; border-radius: 999px; cursor: pointer;
  transition: transform .25s var(--zr-ease), box-shadow .25s; animation: zrUp .7s var(--zr-ease) .2s both;
  box-shadow: 0 4px 24px rgba(201,168,76,.25); letter-spacing: .02em;
}
.zr-start-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 36px rgba(201,168,76,.35); }
.zr-start-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.zr-back-link {
  display: flex; align-items: center; justify-content: center; gap: .25rem; margin-top: 1.5rem;
  color: var(--zr-dim); text-decoration: none; font-size: .82rem; transition: color .2s;
  animation: zrUp .7s var(--zr-ease) .35s both;
}
.zr-back-link:hover { color: var(--zr-text); }
.zr-back-link .material-symbols-outlined { font-size: .95rem; }

/* ====== Stage — FULLSCREEN ====== */
.zr-stage { position: fixed; inset: 0; z-index: 50; }

/* Fullscreen background image layers */
.zr-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.zr-bg--active { opacity: 1; }

/* Gradient scrim over the background for text readability */
.zr-bg-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(8,6,10,.4) 0%, rgba(8,6,10,.15) 35%, rgba(8,6,10,.15) 50%, rgba(8,6,10,.85) 100%),
    linear-gradient(90deg, rgba(8,6,10,.7) 0%, transparent 40%, transparent 60%, rgba(8,6,10,.3) 100%);
}

/* ====== Top bar ====== */
.zr-topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 2rem;
}
.zr-exit-btn {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--zr-text); text-decoration: none; transition: background .2s;
  backdrop-filter: blur(8px);
}
.zr-exit-btn:hover { background: rgba(255,255,255,.16); }
.zr-era {
  font-family: 'Playfair Display', serif; font-size: .8rem; font-weight: 700;
  color: var(--zr-gold); letter-spacing: .1em; text-transform: uppercase;
}
.zr-counter { font-size: .8rem; color: var(--zr-dim); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ====== Main content — fullscreen centered ====== */
.zr-main {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 0 2.5rem 6.5rem 2.5rem;
  margin-right: var(--zr-rail-w);
}

/* Ghost cards (prev/next) — hidden in fullscreen mode */
.zr-ghost { display: none; }

/* Centered layout when no image — content in the middle of the screen */
.zr-main--centered {
  align-items: center;
  justify-content: center;
  padding-bottom: 5rem;
}
.zr-card--centered {
  text-align: center;
  max-width: 860px;
}
.zr-card--centered .zr-card-year {
  font-size: clamp(5rem, 14vw, 10rem);
  margin-bottom: .3rem;
}
.zr-card--centered .zr-card-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin-bottom: .8rem;
}
.zr-card--centered .zr-card-desc {
  font-size: 1.15rem;
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  -webkit-line-clamp: 5;
  color: rgba(237,229,213,.8);
}
.zr-card--centered .zr-card-footer {
  justify-content: center;
}
.zr-card--centered .zr-card-event {
  font-size: .8rem;
  letter-spacing: .18em;
  margin-bottom: 1.2rem;
}

/* ====== Content overlay — bottom-left like a cinematic title ====== */
.zr-card {
  position: relative; max-width: 720px; width: 100%;
  background: none; border: none; border-radius: 0;
  padding: 0; text-align: left;
  transition: opacity .5s var(--zr-ease), transform .5s var(--zr-ease);
}
.zr-card::before { display: none; }

/* Card animation states */
.zr-card--enter      { opacity: 0; transform: translateY(40px); }
.zr-card--visible    { opacity: 1; transform: translateY(0); }
.zr-card--exit-left  { opacity: 0; transform: translateX(-80px); }
.zr-card--exit-right { opacity: 0; transform: translateX(80px); }
.zr-card--expanded   { max-width: 800px; }

/* Year — huge, cinematic */
.zr-card-year {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.5rem, 10vw, 7rem); font-weight: 900; line-height: 1;
  color: var(--zr-gold); margin-bottom: .15rem;
  text-shadow: 0 2px 40px rgba(0,0,0,.5);
}

/* Event type label */
.zr-card-event {
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  color: var(--zr-gold); margin-bottom: 1rem; opacity: .7;
}

/* Image — hidden in fullscreen mode, BG does the job */
.zr-card-img { display: none !important; }

/* Title — large, readable */
.zr-card-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 700; line-height: 1.2;
  margin-bottom: .6rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.4);
}

/* Description */
.zr-card-desc {
  font-size: 1rem; line-height: 1.7; color: rgba(237,229,213,.75);
  max-height: none; overflow: visible; margin-bottom: 1.25rem;
  max-width: 600px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
}

/* Footer — badge + detail button */
.zr-card-footer { display: flex; align-items: center; gap: 1rem; }
.zr-card-badge {
  font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  background: rgba(201,168,76,.2); color: var(--zr-gold);
  padding: .25rem .75rem; border-radius: 999px;
  backdrop-filter: blur(4px); border: 1px solid rgba(201,168,76,.15);
}
.zr-card-detail-btn {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .85rem; font-weight: 600; color: var(--zr-text);
  background: rgba(255,255,255,.08); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 999px;
  padding: .4rem 1rem; cursor: pointer; transition: all .2s;
}
.zr-card-detail-btn:hover { background: rgba(255,255,255,.15); }

/* Expanded detail panel — slides up from bottom */
.zr-card-expanded {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  margin-right: var(--zr-rail-w);
  background: rgba(12,10,8,.95); backdrop-filter: blur(20px);
  border-top: 1px solid var(--zr-border);
  padding: 2rem 2.5rem;
  animation: zrSlideUp .4s var(--zr-ease) both;
}
.zr-expanded-scroll {
  max-height: 45vh; overflow-y: auto; text-align: left;
  font-size: .95rem; line-height: 1.75; color: var(--zr-dim);
  padding-right: 1rem;
  columns: 2; column-gap: 2rem;
}
.zr-expanded-scroll::-webkit-scrollbar { width: 3px; }
.zr-expanded-scroll::-webkit-scrollbar-thumb { background: var(--zr-gold); border-radius: 2px; }
.zr-expanded-actions {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 1.25rem; gap: .75rem;
}
.zr-expanded-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .88rem; font-weight: 600; color: var(--zr-gold); text-decoration: none;
}
.zr-expanded-link:hover { text-decoration: underline; }
.zr-expanded-link .material-symbols-outlined { font-size: 1rem; }
.zr-expanded-close {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 600; color: var(--zr-text);
  background: rgba(255,255,255,.08); border: none; border-radius: 999px;
  padding: .45rem 1rem; cursor: pointer; transition: background .2s;
}
.zr-expanded-close:hover { background: rgba(255,255,255,.14); }
.zr-expanded-close .material-symbols-outlined { font-size: .9rem; }

/* ====== Right Rail Timeline ====== */
.zr-rail {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--zr-rail-w); z-index: 8;
  background: linear-gradient(90deg, transparent, rgba(8,6,10,.7) 30%);
  padding: 4rem .75rem 5.5rem 0;
  display: flex; flex-direction: column;
}
.zr-rail-track {
  flex: 1; overflow-y: auto; position: relative;
  padding-left: 28px;
  scrollbar-width: thin; scrollbar-color: var(--zr-gold) transparent;
}
.zr-rail-track::-webkit-scrollbar { width: 2px; }
.zr-rail-track::-webkit-scrollbar-thumb { background: var(--zr-gold); border-radius: 2px; }
.zr-rail-track::before {
  content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--zr-border) 5%, var(--zr-border) 95%, transparent);
}
.zr-rail-item {
  position: relative; display: flex; gap: .6rem; align-items: flex-start;
  padding: .45rem 0; cursor: pointer; transition: opacity .2s; opacity: .3;
}
.zr-rail-item:hover { opacity: .55; }
.zr-rail-item--active { opacity: 1 !important; }
.zr-rail-dot {
  position: absolute; left: -22px; top: .55rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--zr-dim); border: 1px solid var(--zr-bg);
  transition: all .3s var(--zr-ease);
}
.zr-rail-item--active .zr-rail-dot {
  background: var(--zr-gold); width: 10px; height: 10px; top: .45rem; left: -23px;
  border: 2px solid var(--zr-bg); box-shadow: 0 0 8px rgba(201,168,76,.4);
}
.zr-rail-thumb {
  width: 36px; height: 36px; border-radius: 6px; overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,.05);
}
.zr-rail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.zr-rail-thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
.zr-rail-thumb-placeholder .material-symbols-outlined { font-size: .9rem; color: var(--zr-dim); opacity: .5; }
.zr-rail-info { flex: 1; min-width: 0; }
.zr-rail-year { font-family: 'Playfair Display', serif; font-size: .72rem; font-weight: 700; color: var(--zr-gold); }
.zr-rail-title {
  font-size: .7rem; color: var(--zr-dim); line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.zr-rail-item--active .zr-rail-title { color: var(--zr-text); }

/* ====== Bottom controls ====== */
.zr-bottom {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  margin-right: var(--zr-rail-w);
}
.zr-progress-bar {
  height: 4px; background: rgba(255,255,255,.06); cursor: pointer; transition: height .15s;
}
.zr-progress-bar:hover { height: 8px; }
.zr-progress-fill {
  height: 100%; background: var(--zr-gold); border-radius: 0 2px 2px 0;
  transition: width .5s var(--zr-ease);
}
.zr-controls {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .6rem 1.5rem;
  background: rgba(8,6,10,.6); backdrop-filter: blur(8px);
}
.zr-btn {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--zr-text); background: none; border: none; cursor: pointer; transition: background .15s;
}
.zr-btn:hover { background: rgba(255,255,255,.08); }
.zr-btn--play { width: 44px; height: 44px; background: var(--zr-gold); color: var(--zr-bg); }
.zr-btn--play:hover { filter: brightness(1.1); }
.zr-speed-wrap {
  display: flex; align-items: center; gap: .3rem; margin-left: .75rem;
  padding-left: .75rem; border-left: 1px solid rgba(255,255,255,.08);
}
.zr-speed-label { font-size: .95rem; color: var(--zr-dim); }
.zr-speed {
  width: 60px; -webkit-appearance: none; appearance: none; height: 3px;
  background: rgba(255,255,255,.12); border-radius: 2px; outline: none;
}
.zr-speed::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--zr-gold); cursor: pointer;
}
.zr-speed::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--zr-gold); border: none; cursor: pointer;
}

/* ====== Keyframes ====== */
@keyframes zrUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes zrSlideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== Responsive ====== */
@media (max-width: 900px) {
  :root { --zr-rail-w: 0px; }
  .zr-rail { display: none; }
  .zr-main { padding: 0 1.5rem 6rem 1.5rem; }
  .zr-card-year { font-size: 3rem; }
  .zr-card-title { font-size: 1.4rem; }
  .zr-controls { padding: .5rem; }
  .zr-speed-wrap { display: none; }
  .zr-card-expanded { margin-right: 0; }
  .zr-expanded-scroll { columns: 1; }
}

@media (max-width: 480px) {
  .zr-intro-title { font-size: 2.2rem; }
  .zr-card-year { font-size: 2.5rem; }
  .zr-card-title { font-size: 1.15rem; }
  .zr-card-desc { font-size: .88rem; -webkit-line-clamp: 3; }
  .zr-topbar { padding: .75rem 1rem; }
  .zr-main { padding: 0 1rem 5.5rem 1rem; }
}
