/* ══════════════════════════════════════════════════════
   STORY-BASE — shared styles for story exhibits
   ══════════════════════════════════════════════════════ */

/* ── Override main-app lockdown from variables.css (html,body{overflow:hidden;height:100%}) ── */
html:has(.story-page),
html:has(.story-page) body {
  height: auto;
  overflow: visible;
  overflow-y: auto;
  scroll-behavior: smooth;
}

/* ── Page container ── */
.story-page {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  scroll-snap-type: y proximity;
}

/* ── Section ── */
.story-section {
  min-height: 100vh;
  scroll-snap-align: start;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 64px;
}

/* ── Fixed header ── */
.story-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(20, 22, 24, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200, 136, 58, 0.08);
}

.story-back {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(200, 136, 58, 0.2);
  background: rgba(20, 22, 24, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
}
.story-back:hover {
  background: rgba(200, 136, 58, 0.12);
  color: var(--text-primary);
}

.story-header-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ── Typography ── */
.story-overline {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.5;
  margin-bottom: 14px;
}

.story-title {
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 200;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
  line-height: 1.2;
}

.story-text {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  text-align: center;
}

/* ── Citation ── */
.story-citation {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
  text-align: center;
  max-width: 480px;
}
.story-citation em {
  font-style: italic;
}

/* ── CTA buttons ── */
.story-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border: 1px solid rgba(200, 136, 58, 0.4);
  border-radius: 24px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.story-cta:hover {
  background: rgba(200, 136, 58, 0.1);
  border-color: var(--accent);
}

.story-cta-secondary {
  border-color: rgba(200, 136, 58, 0.15);
  color: var(--text-muted);
  font-size: 13px;
  padding: 10px 24px;
}
.story-cta-secondary:hover {
  color: var(--accent);
  border-color: rgba(200, 136, 58, 0.3);
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scroll indicator ── */
.story-scroll-hint {
  position: absolute;
  bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12px;
  letter-spacing: 1px;
  animation: storyScrollBounce 2s ease-in-out infinite;
}
.story-scroll-line {
  width: 1px;
  height: 24px;
  background: linear-gradient(180deg, var(--text-dim), transparent);
}
@keyframes storyScrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .story-scroll-hint {
    animation: none;
  }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .story-page {
    scroll-snap-type: none;
  }
  .story-section {
    padding: 72px 16px 48px;
    scroll-snap-align: none;
  }
  .story-text {
    font-size: 14px;
  }
  .story-header {
    padding: 10px 12px;
  }
}
