/* Fotoverhaal — donkere achtergrond, automatische overgangen */

:root {
  --bg: #141210;
  --mat: #ede4d4;
  --mat-shadow: #c4b8a8;
  --rand: #4a3828;
  --ink: #f6f0e4;
  --ink-gedempt: rgba(246, 240, 228, 0.82);
  --accent: #8b3a3a;
  --overgang: 1.6s;
  --font-serif: "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --font-sans: "Segoe UI", system-ui, sans-serif;
}

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

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
}

.story-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #221e18 0%, var(--bg) 70%);
}

.story-stage__laag {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 5rem;
  opacity: 0;
  transition: opacity var(--overgang) ease-in-out;
  pointer-events: none;
}

.story-stage__laag.is-actief {
  opacity: 1;
}

/* Kartel — passe-partout groeit mee met de foto */
.kartel {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(92vw, 50rem);
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.kartel__kader {
  position: relative;
  display: inline-block;
  line-height: 0;
  padding: 1.15rem 1.2rem 1.25rem;
  background: var(--mat);
  box-shadow:
    0 2px 0 var(--mat-shadow),
    0 12px 40px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.kartel__kader::before {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border: 1px solid rgba(60, 48, 40, 0.2);
  pointer-events: none;
}

.kartel__hoek {
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid #3d342c;
  z-index: 2;
  pointer-events: none;
}

.kartel__hoek--tl {
  top: 0.5rem;
  left: 0.5rem;
  border-right: none;
  border-bottom: none;
}

.kartel__hoek--tr {
  top: 0.5rem;
  right: 0.5rem;
  border-left: none;
  border-bottom: none;
}

.kartel__hoek--bl {
  bottom: 0.5rem;
  left: 0.5rem;
  border-right: none;
  border-top: none;
}

.kartel__hoek--br {
  bottom: 0.5rem;
  right: 0.5rem;
  border-left: none;
  border-top: none;
}

.kartel__foto {
  display: block;
  max-width: min(85vw, 44rem);
  max-height: min(72vh, 40rem);
  width: auto;
  height: auto;
  vertical-align: top;
  filter: sepia(0.12) contrast(1.02);
  object-fit: contain;
}

.kartel__bijschrift {
  width: 100%;
  max-width: min(85vw, 44rem);
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.5rem 0;
  border-top: none;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--ink-gedempt);
  text-align: center;
  line-height: 1.4;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.story-ui {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.story-ui__text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 6rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.story-ui__text.is-zichtbaar {
  opacity: 1;
}

.story-ui__text--titel .story-ui__titel {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  margin: 0 0 0.6rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.8);
}

.story-ui__text--titel .story-ui__ondertitel {
  font-size: 1.15rem;
  color: var(--ink-gedempt);
  margin: 0;
}

.story-ui__text--hoofdstuk .story-ui__hoofdstuk-titel,
.story-ui__text--einde .story-ui__hoofdstuk-titel {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 400;
  margin: 0 0 1rem;
}

.story-ui__tekstblok {
  max-width: 32rem;
  padding: 1.75rem 2rem;
  background: rgba(20, 18, 15, 0.78);
  backdrop-filter: blur(8px);
  border-left: 3px solid var(--accent);
  text-align: left;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-gedempt);
}

.story-ui__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem 1rem;
  background: linear-gradient(transparent, rgba(10, 8, 6, 0.92));
}

.story-ui__knop {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(246, 240, 228, 0.35);
  border-radius: 4px;
  background: rgba(30, 26, 22, 0.9);
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
}

.story-ui__knop:hover {
  background: rgba(50, 42, 36, 0.95);
}

.story-ui__voortgang {
  flex: 1;
  height: 4px;
  background: rgba(246, 240, 228, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.story-ui__voortgang-vulling {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.15s linear;
}

.story-ui__teller {
  font-size: 0.75rem;
  color: var(--ink-gedempt);
  min-width: 4.5rem;
  text-align: right;
}

@media (prefers-reduced-motion: reduce) {
  .story-stage__laag,
  .story-ui__text {
    transition: none;
  }
}
