/* =====================================================
   HISTORIE PAGE — cinematic chapter scroll
   Inspired by landonorris.com, mit MVO-Farbidentität
===================================================== */

:root {
  --historie-cream: #f7f3eb;
  --historie-cream-deep: #efe8d9;
  --historie-ink: #0e0e10;
  --historie-ink-soft: #1a1a1d;
  --historie-line: rgba(14, 14, 16, 0.18);
  --historie-line-soft: rgba(14, 14, 16, 0.08);
  --historie-accent: #d0021b;
  --historie-gold: #f2c94c;
  --historie-easing: cubic-bezier(0.22, 1, 0.36, 1);
  --historie-easing-soft: cubic-bezier(0.65, 0, 0.35, 1);
}

/* =========================
   PAGE WRAPPER
========================= */

.historie-page {
  min-height: 100vh;
  overflow-x: clip;
  background-color: var(--historie-cream);
  color: var(--historie-ink);
  font-feature-settings: "ss01", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.historie-page ::selection {
  background-color: var(--historie-accent);
  color: var(--color-white);
}

/* =========================
   HERO
========================= */

.historie-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--historie-ink);
  color: var(--color-white);
}

.historie-hero-bg {
  position: absolute;
  inset: -8% 0 0 0;
  z-index: -2;
  will-change: transform;
}

.historie-hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  filter: grayscale(0.18) contrast(1.05) brightness(0.78);
  transform: scale(1.06);
  animation: historieHeroZoom 16s var(--historie-easing) forwards;
}

@keyframes historieHeroZoom {
  to { transform: scale(1.0); }
}

.historie-hero-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.historie-hero-vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 28%, rgba(0,0,0,0.55) 78%, rgba(14,14,16,0.95) 100%),
    radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(0,0,0,0.45) 100%);
}

.historie-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  padding: 0 32px 96px 32px;
}

.historie-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-white);
}

.historie-hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--historie-accent);
  box-shadow: 0 0 0 4px rgba(208, 2, 27, 0.22);
  animation: historiePulse 2.4s ease-in-out infinite;
}

@keyframes historiePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(208, 2, 27, 0.22); }
  50%      { box-shadow: 0 0 0 9px rgba(208, 2, 27, 0); }
}

.historie-hero-title {
  margin: 0 0 28px 0;
  font-size: clamp(3.6rem, 11vw, 11rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.04em;
  text-transform: none;
}

.historie-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.historie-line > span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition:
    transform 1.1s var(--historie-easing),
    opacity 0.9s var(--historie-easing);
}

.historie-line > span.is-revealed {
  transform: translateY(0);
  opacity: 1;
}

.historie-line:nth-child(2) > span { transition-delay: 0.18s; }

.historie-hero-lead {
  max-width: 540px;
  margin-bottom: 64px;
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.historie-hero-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--color-white);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.historie-hero-scroll:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.historie-hero-scroll-line {
  position: relative;
  width: 1px;
  height: 56px;
  background-color: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.historie-hero-scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 1px;
  height: 50%;
  background: linear-gradient(180deg, transparent, var(--historie-gold), transparent);
  animation: historieScrollDot 2.2s ease-in-out infinite;
}

@keyframes historieScrollDot {
  0%   { top: -50%; }
  100% { top: 100%; }
}

.historie-hero-meta {
  position: absolute;
  right: 32px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: right center;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.historie-hero-meta-separator {
  width: 28px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.4);
}

/* =========================
   INTRO SECTION
========================= */

.historie-intro {
  position: relative;
  padding: clamp(96px, 14vh, 180px) 32px clamp(96px, 12vh, 160px) 32px;
  background-color: var(--historie-cream);
}

.historie-intro-inner {
  max-width: 980px;
  margin: 0 auto;
}

.historie-intro-meta,
.historie-meta-index {
  font-family: "Courier New", Courier, monospace;
}

.historie-intro-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--historie-ink);
}

.historie-meta-index {
  font-size: 0.96rem;
  color: var(--historie-accent);
}

.historie-meta-line {
  flex: 0 0 56px;
  height: 1px;
  background-color: var(--historie-ink);
  opacity: 0.6;
}

.historie-intro-title {
  margin: 0 0 36px 0;
  font-size: clamp(2.4rem, 5.2vw, 4.8rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--historie-ink);
}

.historie-intro-title em {
  position: relative;
  font-style: italic;
  color: var(--historie-accent);
  font-weight: 800;
}

.historie-intro-title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.12em;
  background: linear-gradient(90deg, var(--historie-gold), transparent);
  opacity: 0.55;
}

.historie-intro-text {
  max-width: 720px;
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  line-height: 1.7;
  color: rgba(14, 14, 16, 0.74);
}

/* =========================
   REVEAL ANIMATIONS
========================= */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--historie-easing),
    transform 0.9s var(--historie-easing);
}

[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-words] .historie-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  transition:
    opacity 0.7s var(--historie-easing),
    transform 0.8s var(--historie-easing);
}

[data-reveal-words].is-revealed .historie-word {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   TIMELINE WRAPPER
========================= */

.historie-timeline {
  position: relative;
  padding: 0 32px 120px 32px;
  background-color: var(--historie-cream);
}

.historie-timeline::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--historie-line), transparent);
}

.historie-timeline-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 64px;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  align-items: start;
}

/* ----- Sticky rail / indicator ----- */

.historie-sticky-rail {
  position: sticky;
  top: 120px;
  align-self: start;
}

.historie-sticky-card {
  position: relative;
  padding: 32px 28px;
  border: 1px solid var(--historie-line);
  border-radius: 4px;
  background-color: var(--historie-cream);
  box-shadow: 0 2px 0 var(--historie-line-soft);
}

.historie-sticky-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background-color: var(--historie-accent);
}

.historie-sticky-eyebrow {
  display: block;
  margin-bottom: 22px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(14, 14, 16, 0.6);
}

.historie-sticky-year {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(2.8rem, 4vw, 3.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--historie-ink);
  font-variant-numeric: tabular-nums;
  transition: color 0.4s var(--historie-easing-soft);
}

.historie-sticky-title {
  display: block;
  margin-bottom: 28px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(14, 14, 16, 0.78);
  transition: opacity 0.4s var(--historie-easing-soft);
}

.historie-sticky-progress {
  position: relative;
  width: 100%;
  height: 2px;
  margin-bottom: 18px;
  background-color: var(--historie-line);
  overflow: hidden;
}

.historie-sticky-progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--historie-accent), var(--historie-gold));
  transition: width 0.4s var(--historie-easing-soft);
}

.historie-sticky-counter {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(14, 14, 16, 0.6);
}

.historie-sticky-counter-divider {
  color: rgba(14, 14, 16, 0.3);
}

[data-sticky-current] {
  color: var(--historie-accent);
  font-size: 1rem;
}

/* =========================
   CHAPTERS
========================= */

.historie-chapters {
  display: flex;
  flex-direction: column;
  gap: clamp(120px, 14vh, 200px);
  padding-bottom: 40px;
}

.historie-chapter {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: 32px;
  scroll-margin-top: 100px;
}

.historie-chapter-header {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--historie-ink);
}

.historie-chapter-number {
  color: var(--historie-accent);
}

.historie-chapter-header-line {
  flex: 0 0 48px;
  height: 1px;
  background-color: var(--historie-ink);
  opacity: 0.5;
}

.historie-chapter-year-display {
  position: relative;
  margin: 4px 0 8px 0;
  font-size: clamp(4.5rem, 12vw, 9.5rem);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: var(--historie-ink);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.historie-chapter-year-display .historie-year-stroke {
  -webkit-text-stroke: 1.5px var(--historie-ink);
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0.18;
}

.historie-chapter-title {
  max-width: 760px;
  margin: 0 0 24px 0;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--historie-ink);
}

.historie-chapter-text {
  max-width: 620px;
  margin: 0 0 36px 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(14, 14, 16, 0.72);
}

.historie-chapter-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px 14px 22px;
  border: 1px solid var(--historie-ink);
  border-radius: 999px;
  background-color: transparent;
  color: var(--historie-ink);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition:
    background-color 0.4s var(--historie-easing-soft),
    color 0.4s var(--historie-easing-soft),
    transform 0.4s var(--historie-easing-soft);
}

.historie-chapter-button:hover,
.historie-chapter-button:focus-visible {
  background-color: var(--historie-ink);
  color: var(--color-white);
  transform: translateY(-2px);
  outline: none;
}

.historie-chapter-button-arrow {
  display: inline-block;
  transition: transform 0.4s var(--historie-easing-soft);
}

.historie-chapter-button:hover .historie-chapter-button-arrow {
  transform: translateX(4px);
}

/* ----- Chapter media ----- */

.historie-chapter-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--historie-cream-deep);
  box-shadow: 0 22px 60px rgba(14, 14, 16, 0.12);
}

.historie-chapter-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
  transition: transform 1.2s var(--historie-easing);
  will-change: transform;
}

.historie-chapter.is-revealed .historie-chapter-image {
  transform: scale(1.0);
}

.historie-chapter-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: var(--historie-ink);
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 1.2s var(--historie-easing);
}

.historie-chapter.is-revealed .historie-chapter-media::before {
  transform: scaleX(0);
  transform-origin: right center;
}

.historie-chapter-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(4rem, 8vw, 7rem);
  color: rgba(14, 14, 16, 0.18);
  background:
    repeating-linear-gradient(
      45deg,
      var(--historie-cream-deep),
      var(--historie-cream-deep) 12px,
      var(--historie-cream) 12px,
      var(--historie-cream) 24px
    );
}

.historie-chapter-media-tag {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 3;
  padding: 6px 12px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--historie-ink);
}

/* ----- Chapter alternate layout (every other) ----- */

@media (min-width: 900px) {
  .historie-chapter {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 56px 64px;
    align-items: start;
  }

  .historie-chapter-textblock {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    padding-top: 40px;
  }

  .historie-chapter-media {
    grid-column: 2;
    grid-row: 1 / span 2;
    aspect-ratio: 4 / 5;
    align-self: stretch;
  }

  .historie-chapter:nth-child(even) .historie-chapter-textblock {
    grid-column: 2;
    order: 2;
  }

  .historie-chapter:nth-child(even) .historie-chapter-media {
    grid-column: 1;
    order: 1;
  }
}

/* =========================
   OUTRO
========================= */

.historie-outro {
  position: relative;
  padding: clamp(120px, 16vh, 200px) 32px clamp(120px, 16vh, 200px) 32px;
  background-color: var(--historie-ink);
  color: var(--color-white);
  overflow: hidden;
  isolation: isolate;
}

.historie-outro::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 0%, rgba(208, 2, 27, 0.22), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(242, 201, 76, 0.14), transparent 50%);
}

.historie-outro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.08;
  mix-blend-mode: overlay;
}

.historie-outro-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.historie-outro .historie-meta-index {
  display: block;
  margin-bottom: 36px;
  font-size: 1.4rem;
  color: var(--historie-gold);
}

.historie-outro-title {
  margin: 0 0 28px 0;
  font-size: clamp(2.4rem, 5.6vw, 5.2rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--color-white);
}

.historie-outro-text {
  max-width: 620px;
  margin: 0 auto 56px auto;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

.historie-outro-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.historie-outro-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  background-color: var(--historie-accent);
  color: var(--color-white);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition:
    background-color 0.4s var(--historie-easing-soft),
    border-color 0.4s var(--historie-easing-soft),
    transform 0.4s var(--historie-easing-soft);
}

.historie-outro-button:hover {
  background-color: #b80218;
  transform: translateY(-2px);
}

.historie-outro-button.is-ghost {
  background-color: transparent;
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--color-white);
}

.historie-outro-button.is-ghost:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

.historie-outro-button-arrow {
  display: inline-block;
  transition: transform 0.4s var(--historie-easing-soft);
}

.historie-outro-button:hover .historie-outro-button-arrow {
  transform: translateX(4px);
}

/* =========================
   DIALOG
========================= */

.historie-dialog {
  width: min(720px, 92vw);
  max-height: min(86vh, 880px);
  margin: auto;
  padding: 0;
  border: none;
  border-radius: 6px;
  background-color: var(--historie-cream);
  color: var(--historie-ink);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.historie-dialog::backdrop {
  background-color: rgba(14, 14, 16, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.historie-dialog[open] {
  animation: historieDialogIn 0.5s var(--historie-easing);
}

@keyframes historieDialogIn {
  0%   { opacity: 0; transform: translateY(20px) scale(0.98); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}

.historie-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--historie-ink);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.historie-dialog-close:hover {
  background-color: var(--color-white);
  transform: scale(1.06);
}

.historie-dialog-content {
  display: flex;
  flex-direction: column;
  max-height: min(86vh, 880px);
  overflow-y: auto;
}

.historie-dialog-event {
  display: flex;
  flex-direction: column;
}

.historie-dialog-image {
  width: 100%;
  height: clamp(220px, 38vh, 360px);
  object-fit: cover;
  object-position: center;
}

.historie-dialog-body {
  padding: 36px 36px 40px 36px;
}

.historie-dialog-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.historie-dialog-year {
  color: var(--historie-accent);
}

.historie-dialog-meta-line {
  flex: 0 0 36px;
  height: 1px;
  background-color: var(--historie-ink);
  opacity: 0.4;
}

.historie-dialog-title {
  margin: 0 0 18px 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.historie-dialog-text {
  font-size: 1.02rem;
  line-height: 1.7;
  color: rgba(14, 14, 16, 0.78);
}

.historie-empty-message {
  padding: 80px 24px;
  text-align: center;
  font-size: 1rem;
  color: rgba(14, 14, 16, 0.6);
}

/* =========================
   SECTION HEADER (shared)
========================= */

.historie-section-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--historie-ink);
}

.historie-section-title {
  margin: 0 0 18px 0;
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--historie-ink);
}

.historie-section-lead {
  max-width: 680px;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.7;
  color: rgba(14, 14, 16, 0.72);
}

.historie-section-header {
  margin-bottom: 72px;
  max-width: 880px;
}

.historie-timeline-header {
  max-width: var(--layout-max-width);
  margin: 0 auto clamp(64px, 8vh, 96px) auto;
  padding-top: clamp(96px, 12vh, 140px);
}

/* =========================
   STATS SECTION
========================= */

.historie-stats {
  position: relative;
  padding: clamp(96px, 12vh, 160px) 32px;
  background-color: var(--historie-cream-deep);
  overflow: hidden;
  isolation: isolate;
}

.historie-stats::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 90% 10%, rgba(208, 2, 27, 0.06), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(242, 201, 76, 0.08), transparent 45%);
}

.historie-stats-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
}

.historie-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--historie-line);
}

.historie-stat {
  position: relative;
  padding: 44px 28px 28px 28px;
  border-bottom: 1px solid var(--historie-line);
}

.historie-stat:not(:last-child) {
  border-right: 1px solid var(--historie-line);
}

.historie-stat:first-child { padding-left: 0; }
.historie-stat:last-child  { padding-right: 0; }

.historie-stat-marker {
  position: absolute;
  top: -1px;
  left: 0;
  width: 36px;
  height: 3px;
  background-color: var(--historie-accent);
}

.historie-stat:first-child .historie-stat-marker  { left: 0; }
.historie-stat:nth-child(2) .historie-stat-marker { background-color: var(--historie-gold); left: 28px; }
.historie-stat:nth-child(3) .historie-stat-marker { background-color: var(--historie-accent); left: 28px; }
.historie-stat:nth-child(4) .historie-stat-marker { background-color: var(--historie-gold); left: 28px; }

.historie-stat-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 16px;
  font-size: clamp(3rem, 6vw, 5.4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--historie-ink);
  font-variant-numeric: tabular-nums;
}

.historie-stat-suffix {
  font-size: 0.6em;
  color: var(--historie-accent);
  font-weight: 800;
}

.historie-stat-label {
  display: block;
  margin-bottom: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--historie-ink);
}

.historie-stat-note {
  display: block;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(14, 14, 16, 0.55);
}

/* =========================
   PULL QUOTE SECTION
========================= */

.historie-quote {
  position: relative;
  padding: clamp(120px, 16vh, 200px) 32px;
  background-color: var(--historie-ink);
  color: var(--color-white);
  overflow: hidden;
  isolation: isolate;
}

.historie-quote-grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.historie-quote::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 30% 30%, rgba(208, 2, 27, 0.18), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(242, 201, 76, 0.10), transparent 55%);
}

.historie-quote-inner {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.historie-quote-marks {
  display: block;
  margin: 0 auto 20px auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(8rem, 16vw, 14rem);
  line-height: 0.7;
  color: var(--historie-accent);
  opacity: 0.85;
  user-select: none;
}

.historie-quote-text {
  margin: 0 auto 56px auto;
  max-width: 820px;
  padding: 0;
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.015em;
  color: var(--color-white);
  font-style: italic;
  transition: opacity 0.6s var(--historie-easing);
}

.historie-quote-text.is-changing { opacity: 0; }

.historie-quote-footer {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 56px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  transition: opacity 0.6s var(--historie-easing);
}

.historie-quote-footer.is-changing { opacity: 0; }

.historie-quote-author { color: var(--historie-gold); }

.historie-quote-divider {
  width: 36px; height: 1px;
  background-color: rgba(255, 255, 255, 0.4);
}

.historie-quote-controls {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.historie-quote-control {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background-color: transparent;
  color: var(--color-white);
  font-size: 1rem;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.historie-quote-control:hover {
  background-color: var(--historie-accent);
  border-color: var(--historie-accent);
  transform: translateY(-2px);
}

.historie-quote-counter {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  font-variant-numeric: tabular-nums;
}

.historie-quote-counter-divider { color: rgba(255, 255, 255, 0.4); }

[data-quote-current] {
  color: var(--historie-gold);
  font-size: 1rem;
}

/* =========================
   PEOPLE SECTION
========================= */

.historie-people {
  position: relative;
  padding: clamp(120px, 16vh, 200px) 32px;
  background-color: var(--historie-cream);
}

.historie-people-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
}

.historie-people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.historie-person-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--historie-cream-deep);
  border: 1px solid var(--historie-line);
  overflow: hidden;
  transition:
    transform 0.5s var(--historie-easing-soft),
    box-shadow 0.5s var(--historie-easing-soft),
    border-color 0.5s var(--historie-easing-soft);
}

.historie-person-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 60px rgba(14, 14, 16, 0.16);
  border-color: var(--historie-ink);
}

.historie-person-image-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: var(--historie-cream);
}

.historie-person-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: grayscale(0.4) contrast(1.02);
  transition: transform 1s var(--historie-easing), filter 0.6s var(--historie-easing-soft);
}

.historie-person-card:hover .historie-person-image {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1.05);
}

.historie-person-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(3rem, 5vw, 4rem);
  color: rgba(14, 14, 16, 0.18);
  background:
    repeating-linear-gradient(
      -45deg,
      var(--historie-cream-deep),
      var(--historie-cream-deep) 10px,
      var(--historie-cream) 10px,
      var(--historie-cream) 20px
    );
}

.historie-person-period {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  font-family: "Courier New", Courier, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--historie-ink);
}

.historie-person-body {
  padding: 24px 22px 26px 22px;
}

.historie-person-name {
  margin: 0 0 6px 0;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--historie-ink);
}

.historie-person-role {
  display: block;
  margin-bottom: 12px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--historie-accent);
}

.historie-person-bio {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(14, 14, 16, 0.7);
}

/* =========================
   ARCHIVE / BILDERWAND
========================= */

.historie-archive {
  position: relative;
  padding: clamp(120px, 16vh, 200px) 32px;
  background-color: var(--historie-cream-deep);
  overflow: hidden;
}

.historie-archive::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--historie-line), transparent);
}

.historie-archive-inner {
  max-width: var(--layout-max-width);
  margin: 0 auto;
}

.is-archive-header { margin-bottom: 56px; }

.historie-archive-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
}

.historie-archive-tile {
  position: relative;
  overflow: hidden;
  background-color: var(--historie-cream);
  border: 1px solid var(--historie-line);
  transition: transform 0.5s var(--historie-easing-soft);
}

.historie-archive-tile:hover { transform: translateY(-3px); }

.historie-archive-tile.is-size-lg { grid-column: span 4; grid-row: span 2; }
.historie-archive-tile.is-size-md { grid-column: span 2; grid-row: span 2; }
.historie-archive-tile.is-size-sm { grid-column: span 2; grid-row: span 1; }

.historie-archive-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(0.2);
  transition: transform 1s var(--historie-easing), filter 0.5s var(--historie-easing-soft);
}

.historie-archive-tile:hover .historie-archive-image {
  transform: scale(1.05);
  filter: grayscale(0);
}

.historie-archive-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(14, 14, 16, 0.45);
  background:
    repeating-linear-gradient(
      45deg,
      var(--historie-cream),
      var(--historie-cream) 14px,
      var(--historie-cream-deep) 14px,
      var(--historie-cream-deep) 28px
    );
  text-align: center;
  padding: 16px;
}

.historie-archive-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 18px 18px 14px 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.78) 100%);
  color: var(--color-white);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s var(--historie-easing-soft),
    transform 0.4s var(--historie-easing-soft);
  pointer-events: none;
}

.historie-archive-tile:hover .historie-archive-overlay {
  opacity: 1;
  transform: translateY(0);
}

.historie-archive-tile.is-placeholder .historie-archive-overlay { display: none; }

.historie-archive-caption {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.historie-archive-year {
  display: block;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--historie-gold);
}

/* =========================
   MILESTONES (kompakt)
========================= */

.historie-milestones {
  position: relative;
  padding: clamp(120px, 16vh, 200px) 32px;
  background-color: var(--historie-cream);
}

.historie-milestones-inner {
  max-width: 980px;
  margin: 0 auto;
}

.historie-milestone-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.historie-milestone-list::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px;
  left: 78px;
  width: 1px;
  background-color: var(--historie-line);
}

.historie-milestone {
  position: relative;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--historie-line-soft);
  transition: padding 0.4s var(--historie-easing-soft);
}

.historie-milestone:last-child { border-bottom: none; }

.historie-milestone:hover { padding-left: 8px; }

.historie-milestone-year {
  position: relative;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--historie-accent);
  align-self: start;
  padding-top: 4px;
}

.historie-milestone-year::after {
  content: "";
  position: absolute;
  top: 12px;
  right: -32px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background-color: var(--historie-cream);
  border: 2px solid var(--historie-accent);
  transition:
    background-color 0.4s var(--historie-easing-soft),
    transform 0.4s var(--historie-easing-soft);
}

.historie-milestone:hover .historie-milestone-year::after {
  background-color: var(--historie-accent);
  transform: scale(1.25);
}

.historie-milestone-body {
  padding-left: 24px;
}

.historie-milestone-title {
  margin: 0 0 6px 0;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--historie-ink);
}

.historie-milestone-text {
  font-size: 0.96rem;
  line-height: 1.6;
  color: rgba(14, 14, 16, 0.7);
}

/* =========================
   TOP SCROLL PROGRESS BAR
========================= */

.historie-progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 3px;
  background-color: rgba(14, 14, 16, 0.06);
  pointer-events: none;
}

.historie-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--historie-accent) 0%, var(--historie-gold) 100%);
  box-shadow: 0 0 12px rgba(208, 2, 27, 0.4);
  transform-origin: left center;
  transition: width 0.08s linear;
}

/* =========================
   HERO MOUSE-FOLLOW SPOTLIGHT
========================= */

.historie-hero-spotlight {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(
      circle 320px at var(--hero-mx, 50%) var(--hero-my, 50%),
      rgba(208, 2, 27, 0.22) 0%,
      rgba(242, 201, 76, 0.08) 30%,
      transparent 70%
    );
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.6s var(--historie-easing);
}

.historie-hero:hover .historie-hero-spotlight,
.historie-hero.is-pointer-active .historie-hero-spotlight {
  opacity: 1;
}

/* =========================
   MARQUEE RIBBON
========================= */

.historie-marquee {
  position: relative;
  width: 100%;
  padding: 22px 0;
  background-color: var(--historie-ink);
  color: var(--color-white);
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  isolation: isolate;
}

.historie-marquee::before,
.historie-marquee::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.historie-marquee::before {
  left: 0;
  background: linear-gradient(90deg, var(--historie-ink), transparent);
}

.historie-marquee::after {
  right: 0;
  background: linear-gradient(270deg, var(--historie-ink), transparent);
}

.historie-marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 56px;
  white-space: nowrap;
  animation: historieMarqueeSlide 38s linear infinite;
  will-change: transform;
}

.historie-marquee.is-reverse .historie-marquee-track {
  animation-direction: reverse;
  animation-duration: 44s;
}

.historie-marquee:hover .historie-marquee-track {
  animation-play-state: paused;
}

.historie-marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: "Courier New", Courier, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.86);
  flex-shrink: 0;
}

.historie-marquee-item em {
  font-style: normal;
  color: var(--historie-accent);
  font-size: 1.2em;
  line-height: 1;
}

.historie-marquee.is-reverse .historie-marquee-item em {
  color: var(--historie-gold);
}

@keyframes historieMarqueeSlide {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* =========================
   3D TILT (chapters & people)
========================= */

.historie-chapter-media,
.historie-person-image-wrap {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.6s var(--historie-easing-soft);
}

.historie-chapter-media[data-tilt],
.historie-person-card[data-tilt] {
  --tilt-rx: 0deg;
  --tilt-ry: 0deg;
  transform: perspective(1000px) rotateX(var(--tilt-rx)) rotateY(var(--tilt-ry));
}

.historie-chapter-media[data-tilt] .historie-chapter-image,
.historie-chapter-media[data-tilt] .historie-chapter-image-placeholder {
  transform: translateZ(20px) scale(1.0);
}

.historie-chapter-media[data-tilt] .historie-chapter-media-tag {
  transform: translateZ(40px);
}

/* =========================
   MAGNETIC BUTTONS
========================= */

.historie-chapter-button,
.historie-outro-button,
.historie-quote-control {
  --magnet-x: 0px;
  --magnet-y: 0px;
}

.historie-chapter-button[data-magnetic],
.historie-outro-button[data-magnetic],
.historie-quote-control[data-magnetic] {
  transform: translate3d(var(--magnet-x), var(--magnet-y), 0);
  transition: transform 0.25s var(--historie-easing-soft),
              background-color 0.4s var(--historie-easing-soft),
              color 0.4s var(--historie-easing-soft),
              border-color 0.4s var(--historie-easing-soft);
}

/* =========================
   FLOATING MUSIC NOTES (outro)
========================= */

.historie-floating-notes {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.historie-floating-note {
  position: absolute;
  bottom: -10%;
  left: var(--n-x, 50%);
  font-size: calc(2.4rem * var(--n-s, 1));
  color: rgba(242, 201, 76, 0.18);
  text-shadow: 0 0 24px rgba(208, 2, 27, 0.18);
  animation: historieFloatNote var(--n-r, 10s) ease-in-out infinite;
  animation-delay: var(--n-d, 0s);
  user-select: none;
  will-change: transform, opacity;
}

@keyframes historieFloatNote {
  0% {
    transform: translateY(0) translateX(0) rotate(-10deg);
    opacity: 0;
  }
  10% { opacity: 0.8; }
  50% {
    transform: translateY(-50vh) translateX(20px) rotate(8deg);
    opacity: 0.6;
  }
  90% { opacity: 0.4; }
  100% {
    transform: translateY(-110vh) translateX(-20px) rotate(-6deg);
    opacity: 0;
  }
}

/* =========================
   STAT REVEAL (staggered)
========================= */

.historie-stat[data-reveal] {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  transition:
    opacity 0.9s var(--historie-easing),
    transform 0.9s var(--historie-easing);
}

.historie-stat[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.historie-stats-grid .historie-stat:nth-child(1) { transition-delay: 0s; }
.historie-stats-grid .historie-stat:nth-child(2) { transition-delay: 0.12s; }
.historie-stats-grid .historie-stat:nth-child(3) { transition-delay: 0.24s; }
.historie-stats-grid .historie-stat:nth-child(4) { transition-delay: 0.36s; }

/* People stagger */
.historie-people-grid .historie-person-card[data-reveal]:nth-child(1) { transition-delay: 0s; }
.historie-people-grid .historie-person-card[data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.historie-people-grid .historie-person-card[data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.historie-people-grid .historie-person-card[data-reveal]:nth-child(4) { transition-delay: 0.24s; }
.historie-people-grid .historie-person-card[data-reveal]:nth-child(5) { transition-delay: 0.32s; }
.historie-people-grid .historie-person-card[data-reveal]:nth-child(6) { transition-delay: 0.40s; }

/* =========================
   CHAPTER ENTRANCE (zusätzliche Animation)
========================= */

.historie-chapter {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s var(--historie-easing),
    transform 1.1s var(--historie-easing);
}

.historie-chapter.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.historie-chapter-textblock > * {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s var(--historie-easing),
    transform 0.9s var(--historie-easing);
}

.historie-chapter.is-revealed .historie-chapter-textblock > * {
  opacity: 1;
  transform: translateY(0);
}

.historie-chapter.is-revealed .historie-chapter-textblock > *:nth-child(1) { transition-delay: 0.20s; }
.historie-chapter.is-revealed .historie-chapter-textblock > *:nth-child(2) { transition-delay: 0.30s; }
.historie-chapter.is-revealed .historie-chapter-textblock > *:nth-child(3) { transition-delay: 0.40s; }
.historie-chapter.is-revealed .historie-chapter-textblock > *:nth-child(4) { transition-delay: 0.48s; }
.historie-chapter.is-revealed .historie-chapter-textblock > *:nth-child(5) { transition-delay: 0.56s; }

/* =========================
   ANIMATED UNDERLINE on text-buttons
========================= */

.historie-chapter-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.historie-chapter-button > span {
  position: relative;
  z-index: 2;
}

.historie-chapter-button::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 100%;
  background-color: var(--historie-accent);
  transform: translateY(101%);
  transition: transform 0.5s var(--historie-easing-soft);
  z-index: 1;
}

.historie-chapter-button:hover::after {
  transform: translateY(0);
}

.historie-chapter-button:hover {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--historie-accent);
}

/* =========================
   ARCHIVE TILE — extra cursor-hint
========================= */

.historie-archive-tile:not(.is-placeholder) {
  cursor: zoom-in;
}

.historie-archive-tile:not(.is-placeholder)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background:
    radial-gradient(
      circle 80px at var(--tile-mx, 50%) var(--tile-my, 50%),
      rgba(208, 2, 27, 0.32) 0%,
      transparent 100%
    );
  opacity: 0;
  transition: opacity 0.4s var(--historie-easing-soft);
  pointer-events: none;
  mix-blend-mode: multiply;
}

.historie-archive-tile:not(.is-placeholder):hover::before {
  opacity: 1;
}

/* =========================
   HERO TITLE — letter rotation entrance
========================= */

.historie-hero-title .historie-line > span::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background-color: var(--historie-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s var(--historie-easing) 1.4s;
}

.historie-hero-title .historie-line > span.is-revealed::before {
  transform: scaleX(1);
}

.historie-hero-title .historie-line > span {
  position: relative;
}

/* =========================
   STICKY-RAIL ENTRANCE GLOW
========================= */

.historie-sticky-card::after {
  content: "";
  position: absolute;
  top: -1px; left: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, transparent 30%, rgba(208, 2, 27, 0.18) 50%, transparent 70%) border-box;
  -webkit-mask:
    linear-gradient(#000 0 0) padding-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
  animation: historieRailShimmer 6s linear infinite;
}

@keyframes historieRailShimmer {
  0%   { background-position: -100% 0; }
  100% { background-position: 200% 0; }
}

/* =========================
   COUNTER GLOW (when active)
========================= */

[data-stat-target] {
  position: relative;
}

[data-stat-target]::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, rgba(208, 2, 27, 0.06), transparent);
  transition: height 1.6s var(--historie-easing);
  pointer-events: none;
  z-index: -1;
}

[data-stat-target].is-revealed::before {
  height: 100%;
}

/* =========================
   OUTRO — accent ring on title
========================= */

.historie-outro-inner {
  position: relative;
  z-index: 2;
}

.historie-outro::before {
  animation: historieOutroPulse 8s ease-in-out infinite;
}

@keyframes historieOutroPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
  .historie-people-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .historie-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .historie-stat:nth-child(2),
  .historie-stat:nth-child(4) { border-right: none; }

  .historie-archive-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .historie-archive-tile.is-size-lg { grid-column: span 4; grid-row: span 2; }
  .historie-archive-tile.is-size-md { grid-column: span 2; grid-row: span 1; }
  .historie-archive-tile.is-size-sm { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 900px) {
  .historie-timeline-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .historie-sticky-rail {
    position: sticky;
    top: 84px;
    margin-bottom: 32px;
    z-index: 5;
  }

  .historie-sticky-card {
    padding: 18px 20px;
  }

  .historie-sticky-year {
    font-size: 2.2rem;
  }

  .historie-sticky-title {
    margin-bottom: 14px;
    font-size: 0.96rem;
  }

  .historie-sticky-progress {
    margin-bottom: 10px;
  }

  .historie-chapters {
    gap: 96px;
  }

  .historie-chapter-year-display {
    font-size: clamp(3.6rem, 16vw, 6rem);
  }

  .historie-chapter-media {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 640px) {
  .historie-hero-content {
    padding: 0 22px 72px 22px;
  }

  .historie-hero-meta {
    display: none;
  }

  .historie-hero-lead {
    margin-bottom: 44px;
  }

  .historie-intro {
    padding: 80px 22px 80px 22px;
  }

  .historie-intro-meta {
    margin-bottom: 36px;
  }

  .historie-meta-line {
    flex-basis: 32px;
  }

  .historie-timeline {
    padding: 0 22px 80px 22px;
  }

  .historie-outro {
    padding: 96px 22px;
  }

  .historie-dialog-body {
    padding: 28px 24px 32px 24px;
  }
}

/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {
  .historie-hero-image,
  .historie-line > span,
  [data-reveal],
  [data-reveal-words] .historie-word,
  .historie-chapter-image,
  .historie-chapter-media::before,
  .historie-hero-eyebrow-dot,
  .historie-hero-scroll-line::after,
  .historie-marquee-track,
  .historie-floating-note,
  .historie-chapter,
  .historie-chapter-textblock > *,
  .historie-stat[data-reveal],
  .historie-outro::before,
  .historie-sticky-card::after {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  .historie-floating-notes { display: none; }
  .historie-hero-spotlight { display: none; }
}
