/* ===========================================================
   S.L.O.V.O. — production site
   Refined minimalism · near-black ground · B&W photography
   =========================================================== */

:root {
  --ink:        #0a0908;   /* near-black ground */
  --paper:      #ece8e1;   /* warm off-white type */
  --paper-dim:  #8e8a83;   /* muted secondary */
  --paper-faint:#54514c;   /* faintest detail */
  --rule:       rgba(236, 232, 225, 0.14);

  --serif: "Bodoni Moda", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 6rem);
  --measure: 38rem;
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overscroll-behavior: none;
}

img { display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.04); }

::selection { background: var(--paper); color: var(--ink); }

/* ---- film grain overlay ---------------------------------- */
.grain {
  position: fixed; inset: 0; z-index: 9; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===========================================================
   1 — OPENING
   =========================================================== */
/* hero is the FIRST zoom panel — left-aligned content over the photo */
.zoom-panel--hero { justify-content: flex-start; padding: var(--gutter); }
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,9,8,.55) 0%, rgba(10,9,8,.15) 38%, rgba(10,9,8,.75) 100%);
}
.hero__content { position: relative; z-index: 2; max-width: 34rem; }

.wordmark {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3.2rem, 13vw, 9.5rem);
  line-height: 0.92; letter-spacing: 0.01em;
  text-shadow: 0 2px 40px rgba(0,0,0,.5);
  animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both;
}
.tagline {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.1rem, 3.2vw, 1.9rem); line-height: 1.3;
  color: var(--paper); margin-top: 1.4rem; opacity: .9;
  animation: rise 1.4s cubic-bezier(.2,.7,.2,1) .25s both;
}
@keyframes rise { from { opacity: 0; transform: translateY(1.4rem); } }

.scrollcue {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: clamp(1.5rem, 4vh, 3rem);
  z-index: 2; color: var(--paper-dim); line-height: 1; font-size: 1.7rem;
  animation: fadein 2s ease 1s both;
}
.scrollcue span { display: block; animation: bob 1.9s ease-in-out 1.2s infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(.45rem); } }
@keyframes fadein { from { opacity: 0; } }

/* ===========================================================
   2 — PROLOGUE  (assembly moment)
   =========================================================== */
.zoom-panel--prologue { background: var(--ink); }
.prologue__inner { max-width: 54rem; padding: var(--gutter); }
.prologue__text {
  font-family: var(--serif); font-size: clamp(1.6rem, 5.4vw, 3.4rem);
  line-height: 1.32; font-weight: 400;
}
.prologue__text span {
  display: inline-block; opacity: .08; filter: blur(4px);
  transition: opacity .7s ease, filter .7s ease;
}
.prologue__text span.lit { opacity: 1; filter: blur(0); }
.prologue__text span.em { font-style: italic; }
.prologue__final {
  margin-top: clamp(2.5rem, 8vh, 6rem);
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.8rem, 6vw, 3.8rem); line-height: 1.2;
  opacity: 0; transition: opacity 1.1s ease 1.4s;
}
[data-assemble].done .prologue__final { opacity: 1; }
[data-assemble].done .prologue__text span:not(.em) { opacity: .32; }

/* ===========================================================
   full-bleed photo plates
   =========================================================== */
.plate { height: 100svh; min-height: 32rem; overflow: hidden; position: relative; }
.plate img { transform: scale(1.06); transition: transform 1.6s cubic-bezier(.2,.7,.2,1); }
.plate.in img { transform: scale(1); }

/* ===========================================================
   3 — THE WORDS  (zoom through each word's first letter)
   =========================================================== */
.zoom-wrap { position: relative; height: 900vh; }
.zoom-pin {
  position: sticky; top: 0; height: 100dvh; overflow: hidden;
  background: var(--ink);
}

/* acronym indicator */
.acronym {
  position: absolute; top: clamp(1.4rem, 5vh, 3rem); left: 0; right: 0; z-index: 30;
  display: flex; justify-content: center; align-items: baseline; gap: .15em;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(.9rem, 2.4vw, 1.3rem); letter-spacing: .18em;
  pointer-events: none; color: var(--paper); text-shadow: 0 1px 14px rgba(0,0,0,.75);
}
.acronym span { opacity: .4; transition: opacity .5s ease, transform .5s ease; transform: translateY(0); }
.acronym i { opacity: .22; font-style: normal; }
.acronym span.on { opacity: 1; }

/* the zoom stack — panels scaled + faded by scroll */
.zoom-stage { position: absolute; inset: 0; z-index: 1; } /* contains panel z-indexes so the acronym stays visible */
.zoom-panel {
  position: absolute; inset: 0; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  transform-origin: 50% 50%; will-change: transform, opacity;
  overflow: hidden;
}
.zoom-panel--void { background: #050403; }
.zoom-bg {
  position: absolute; inset: 0; background-size: cover; background-position: 50% 38%;
  filter: grayscale(1) contrast(1.06);
}
.zoom-veil {
  position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 42%, rgba(10,9,8,.42) 0%, rgba(10,9,8,.85) 100%);
}
/* full-page letter watermark, filled with the photo */
.zoom-letter {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%) translateZ(0);
  z-index: 2; margin: 0;
  font-family: var(--serif); font-weight: 500; line-height: .72;
  font-size: 100vh; letter-spacing: 0;
  background-size: cover; background-position: 50% 40%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: grayscale(1) contrast(1.1);
  user-select: none; pointer-events: none;
}
.zoom-letter--outline {
  background: none;
  -webkit-text-stroke: 1px rgba(236,232,225,.16); filter: none;
}
.zoom-word {
  position: relative; z-index: 3;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 8vw, 5.5rem); line-height: 1; letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 2px 50px rgba(0,0,0,.85), 0 0 18px rgba(0,0,0,.6);
}
.leaf__num {
  position: absolute; bottom: clamp(1.4rem, 5vh, 3rem); right: var(--gutter); z-index: 4;
  font-family: var(--sans); font-size: .72rem; letter-spacing: .3em; color: var(--paper-dim);
}

/* OSAMĚLOST — semantic satiation on its page */
.satiation {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--serif); font-weight: 500; text-transform: uppercase;
  line-height: .9; user-select: none;
  opacity: 0; transition: opacity .45s ease;   /* only show on its own frame */
}
.satiation.go { opacity: 1; }
.satiation span {
  font-size: clamp(1.6rem, 7vw, 5rem); letter-spacing: .04em;
  opacity: 1; filter: blur(0);
  transition: opacity .9s ease, filter .9s ease, letter-spacing .9s ease;
}
.satiation.go span:nth-child(1){ opacity:1;   filter:blur(0); }
.satiation.go span:nth-child(2){ opacity:.8;  filter:blur(.5px); }
.satiation.go span:nth-child(3){ opacity:.58; filter:blur(1.5px); letter-spacing:.12em; }
.satiation.go span:nth-child(4){ opacity:.4;  filter:blur(3px);  letter-spacing:.2em; }
.satiation.go span:nth-child(5){ opacity:.26; filter:blur(5px);  letter-spacing:.3em; }
.satiation.go span:nth-child(6){ opacity:.15; filter:blur(8px);  letter-spacing:.42em; }
.satiation.go span:nth-child(7){ opacity:.07; filter:blur(12px); letter-spacing:.6em; }
.satiation.go span:nth-child(8){ opacity:.03; filter:blur(18px); letter-spacing:.8em; }

/* ===========================================================
   4 — THE PIECE
   =========================================================== */
.zoom-panel--piece { background: var(--ink); }
.piece__veil {
  position: absolute; inset: 0;
  background: radial-gradient(125% 95% at 50% 45%, rgba(10,9,8,.66) 0%, rgba(10,9,8,.92) 100%);
}
.piece__inner { position: relative; z-index: 2; max-width: 42rem; padding: 0 var(--gutter); text-align: center; }
.piece__body {
  font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.8rem); line-height: 1.4;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .75);
}
.piece__body + .piece__body { margin-top: clamp(.7rem, 2.4vh, 1.4rem); }
.piece__body em { font-style: italic; }

/* ===========================================================
   5 — CREDITS
   =========================================================== */
.zoom-panel--credits { background: var(--ink); }
.credits__inner { max-width: 62rem; padding: var(--gutter); text-align: center; }
.credits__group + .credits__group { margin-top: clamp(1.5rem, 4.2vh, 2.8rem); }
.credits__lead {
  font-size: .72rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--paper-faint); margin-bottom: .7rem;
}
.credits__director {
  font-family: var(--serif); font-size: clamp(1.8rem, 6vw, 3.4rem); font-weight: 500;
}
.credits__name {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.3rem, 4vw, 2.1rem);
}
.cast {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: .5rem clamp(1.4rem, 3.6vw, 3rem);
  font-family: var(--serif); font-size: clamp(1.05rem, 3.2vw, 1.7rem);
}
.cast li { position: relative; }
.cast li + li::before {
  content: "·"; position: absolute; left: clamp(-.95rem,-2vw,-1.9rem); color: var(--paper-faint);
}
.cast__name {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  position: relative; transition: opacity .3s ease;
}
.cast__name::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: 1px;
  background: var(--paper); opacity: .55;
  transform: scaleX(0); transform-origin: center;
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.cast__name:hover::after, .cast__name:focus-visible::after { transform: scaleX(1); }

/* ===========================================================
   6 — FOOTER / TICKETS
   =========================================================== */
.zoom-panel--foot { text-align: center; }
.signature {
  position: absolute; left: 50%; bottom: clamp(1rem, 3vh, 2rem); transform: translateX(-50%);
  z-index: 3; white-space: nowrap;
  font-family: var(--sans); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--paper-dim); text-decoration: none; transition: color .3s ease;
}
.signature:hover { color: var(--paper); }
.foot__slides { position: absolute; inset: 0; }
.foot__slide {
  position: absolute; inset: 0; background-size: cover; background-position: 50% 35%;
  filter: grayscale(1) contrast(1.05);
  opacity: 0; transition: opacity 2s ease;
}
.foot__slide.on { opacity: 1; }
.foot__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,9,8,.82) 0%, rgba(10,9,8,.6) 45%, rgba(10,9,8,.92) 100%);
}
.foot__inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(2.5rem, 9vh, 5rem);
}
.tickets {
  display: inline-flex; align-items: center; gap: 1rem;
  text-decoration: none; color: var(--ink); background: var(--paper);
  padding: 1.1rem 2.4rem; border-radius: 999px;
  font-size: .9rem; letter-spacing: .26em; text-transform: uppercase;
  transition: transform .4s cubic-bezier(.2,.7,.2,1), background .4s, color .4s;
}
.tickets:hover { transform: translateY(-3px); background: var(--paper-dim); }
.tickets__arrow { transition: transform .4s; }
.tickets:hover .tickets__arrow { transform: translateX(.4rem); }

/* ---- responsive ----------------------------------------- */
@media (max-width: 720px) {
  .zoom-wrap { height: 780vh; }
  .zoom-letter { font-size: 64vh; }
}

/* ---- reduced motion: zoom becomes a static stack -------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .prologue__text span { opacity: 1; filter: none; }
  .prologue__final { opacity: 1; }
  .satiation, .satiation span { opacity: 1; filter: none; }

  .zoom-wrap { height: auto !important; }
  .zoom-pin { position: static !important; height: auto !important; }
  .acronym, .book__hint { display: none; }
  .zoom-stage { position: static; }
  .zoom-panel {
    position: relative !important; inset: auto; height: 86svh;
    opacity: 1 !important; transform: none !important; visibility: visible !important;
  }
  .zoom-letter { font-size: 60vh; }
}

/* ===========================================================
   actor viewer — full-screen portrait, zoom-in from the name,
   gentle cross-fade between people (no popup, no slide-peek)
   =========================================================== */
body.modal-open { overflow: hidden; }

.actor-view {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: #050403;                 /* solid: nothing peeks through */
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .5s ease, visibility 0s .5s;
}
/* when closed, cells keep inline visibility:visible (overriding the parent),
   so without pointer-events:none the invisible overlay would still eat clicks */
.actor-view.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .5s ease, visibility 0s 0s; }

/* the stage is a full-screen horizontal scroll-snap filmstrip of portraits */
.actor-stage {
  position: relative; width: 100%; height: 100%;
  overflow: hidden;
  opacity: 0; transition: opacity .5s ease;
}
.actor-view.open .actor-stage { opacity: 1; }
/* the actual scroll container: native horizontal scroll, snaps onto each cell */
.actor-stage__slides {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  gap: clamp(.7rem, 2.4vw, 1.6rem);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  touch-action: pan-x;                 /* horizontal = native scroll, vertical = swipe-up close */
  scrollbar-width: none; -ms-overflow-style: none;
}
.actor-stage__slides::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* one portrait cell; JS dims/scales each by distance from centre */
.actor-cell {
  position: relative; flex: 0 0 auto;
  width: min(62vh, 80vw); aspect-ratio: 3 / 4;
  scroll-snap-align: center;
  border-radius: clamp(.5rem, 1.4vw, 1.1rem); overflow: hidden;
  background: #141210; transform-origin: 50% 50%; will-change: transform, filter;
}
/* name only on the centred cell */
.actor-cell__name { opacity: 0; transition: opacity .35s ease; }
.actor-cell.is-center .actor-cell__name { opacity: 1; }
.actor-cell__img {
  position: absolute; inset: 0; background-size: cover; background-position: 50% 18%;
  filter: grayscale(1) contrast(1.05);
}
.actor-cell__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,9,8,.05) 45%, rgba(10,9,8,.85) 100%);
}
.actor-cell__name {
  position: absolute; left: 0; right: 0; bottom: clamp(1rem, 3vh, 1.8rem); z-index: 2;
  text-align: center; padding: 0 1rem;
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.4rem, 3.6vw, 2.2rem); letter-spacing: .02em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .85);
}
.actor-cell--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; text-align: center; padding: 1rem;
}
.actor-cell__pending {
  font-family: var(--sans); font-size: .7rem; letter-spacing: .26em;
  text-transform: uppercase; color: var(--paper-faint);
}

/* close button — plain × on the photo (no chip), matching the arrows */
.actor-stage__handle {
  position: absolute; top: clamp(.6rem, 2vh, 1.2rem); right: clamp(.6rem, 2.5vw, 1.4rem);
  z-index: 152; border: 0; background: none; cursor: pointer; padding: 0;
  width: clamp(2.6rem, 9vw, 3.2rem); height: clamp(2.6rem, 9vw, 3.2rem);
  display: flex; align-items: center; justify-content: center;
}
.actor-stage__bar { display: none; }
.actor-stage__x {
  color: var(--paper); font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1; opacity: .85;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .9), 0 0 4px rgba(0, 0, 0, .7);
  transition: opacity .25s ease;
}
.actor-stage__handle:hover .actor-stage__x,
.actor-stage__handle:focus-visible .actor-stage__x { opacity: 1; }
.actor-stage__count {
  position: absolute; top: 1.15rem; left: 1.2rem; z-index: 150;
  font-family: var(--sans); font-size: .66rem; letter-spacing: .28em; color: var(--paper);
  opacity: .85; text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}

.actor-view__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 150;
  display: flex; align-items: center; justify-content: center;
  width: clamp(2.6rem, 9vw, 3.4rem); height: clamp(2.6rem, 9vw, 3.4rem);
  border: 0; background: none; cursor: pointer; padding: 0; color: var(--paper);
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .9), 0 0 4px rgba(0, 0, 0, .7);
  opacity: .75; transition: opacity .3s ease;
}
.actor-view__arrow:hover, .actor-view__arrow:focus-visible { opacity: 1; }
.actor-view__arrow--prev { left: clamp(.6rem, 2.5vw, 2rem); }
.actor-view__arrow--next { right: clamp(.6rem, 2.5vw, 2rem); }

@media (prefers-reduced-motion: reduce) {
  .actor-view { transition: opacity .3s ease, visibility 0s .3s; }
  .actor-view.open { transition: opacity .3s ease, visibility 0s 0s; }
  .actor-stage { transition: opacity .3s ease; }
}
