/* Haus des Rechts — Scroll-Film */

body.recht-story {
  --story-chapter-space: clamp(3.5rem, 8vh, 6rem);
}

body.recht-story .site-header {
  background: transparent;
  border-bottom-color: transparent;
  transition: background 0.5s var(--ease-out), border-color 0.5s, backdrop-filter 0.5s;
}

body.recht-story .site-header.is-scrolled {
  background: rgba(16, 14, 11, 0.9);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

body.recht-story main {
  /* natives Scrollen */
}

body.recht-story .story-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  z-index: 350;
  pointer-events: none;
}

body.recht-story .scroll-progress {
  display: none;
}

body.recht-story .story-nav {
  position: fixed;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

body.recht-story .story-nav a {
  font-family: var(--font-tech);
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line-strong);
  background: rgba(16, 14, 11, 0.75);
  color: var(--gold-muted);
  text-decoration: none;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

body.recht-story .story-nav a.is-active,
body.recht-story .story-nav a:hover {
  background: var(--gold);
  border-color: var(--gold-bright);
  color: var(--ink);
  box-shadow: 0 0 12px var(--vision-glow);
}

body.recht-story [id] {
  scroll-margin-top: calc(var(--nav-height) + 3.5rem);
}

/* Kapitel */
.recht-chapter {
  position: relative;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.recht-chapter.is-visible {
  opacity: 1;
  transform: none;
}

.recht-chapter--hero {
  opacity: 1;
  transform: none;
}

.recht-chapter--hero.book-hero {
  background:
    radial-gradient(ellipse 55% 60% at 78% 42%, rgba(201, 168, 76, 0.14), transparent 62%),
    radial-gradient(ellipse 40% 45% at 12% 80%, rgba(90, 70, 40, 0.18), transparent 55%),
    linear-gradient(165deg, #1a1510 0%, #0e0b09 48%, #12100c 100%);
  border-bottom: 1px solid var(--line);
  min-height: 0;
  padding-top: 0;
  align-items: stretch;
  display: block;
}

.recht-chapter--hero .book-hero__copy h1 {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-out) 0.15s, transform 1s var(--ease-out) 0.15s;
}

.recht-chapter--hero.is-visible .book-hero__copy h1,
.recht-chapter--hero .book-hero__copy h1,
body.hero-ready .recht-chapter--hero .book-hero__copy h1 {
  opacity: 1;
  transform: none;
}

.recht-chapter--hero .recht-hero-grid h1 {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-out) 0.15s, transform 1s var(--ease-out) 0.15s;
}

.recht-chapter--hero.is-visible .recht-hero-grid h1,
.recht-chapter--hero .recht-hero-grid h1 {
  opacity: 1;
  transform: none;
}

.recht-chapter--stats {
  padding: 0;
  opacity: 1;
  transform: none;
}

.recht-chapter--cta {
  min-height: 70svh;
  display: flex;
  align-items: center;
}

.recht-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  font-family: var(--font-tech);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.recht-scroll-hint span {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--gold-bright), transparent);
  animation: recht-scroll-line 2s ease-in-out infinite;
}

@keyframes recht-scroll-line {
  0%, 100% { transform: scaleY(0.35); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 900px) {
  body.recht-story .story-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recht-chapter {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .recht-scroll-hint {
    display: none;
  }
}
