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

html,
body {
  height: 100%;
  background: #000;
  overflow: hidden;
}

::selection {
  background: rgba(80, 130, 180, .4);
}

img {
  display: block;
}

/* ---- pulsanti condivisi: una base + modificatori, mai per-ID ---- */

.film-btn {
  transition: background .3s ease, border-color .3s ease, color .3s ease, opacity .5s ease;
}

.film-btn:hover {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .7);
}

.film-btn--mute {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #f5f2ec;
  font-family: 'Hanken Grotesk', sans-serif;
  padding: 6px 11px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.film-btn--mute .note {
  font-size: 15px;
  line-height: 1;
}

.film-btn--mute.is-muted {
  opacity: .65;
}

.mute-state {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.film-btn--cta {
  cursor: pointer;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .45);
  color: #f5f2ec;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 16px 38px;
  border-radius: 999px;
}

.film-btn--again {
  opacity: 0;
  transition: opacity .9s ease, background .3s ease, border-color .3s ease;
}

.home-btn {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #f5f2ec;
  font-family: 'Hanken Grotesk', sans-serif;
  padding: 6px 11px;
  border-radius: 999px;
  text-decoration: none;
  opacity: 0.65;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.home-btn:hover {
  cursor: pointer;
  opacity: 1;
}

span.home {
  font-size: 20px;
  line-height: 21px;
  margin-top: -2px;
}

.scroll-mouse {
  --sm-color: #8c867b;
  --sm-w: 23px;
  --sm-h: 38px;
  --sm-border: 1.5px;
  --sm-opacity: .7;
  --sm-speed: 1.6s;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: var(--sm-w);
  height: var(--sm-h);
  padding-top: 7px;
  border: var(--sm-border) solid var(--sm-color);
  border-radius: 13px;
  opacity: var(--sm-opacity);
  box-sizing: border-box;
}

.scroll-mouse > i {
  display: block;
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: var(--sm-color);
  animation: sm-drop var(--sm-speed) cubic-bezier(.5, 0, .3, 1) infinite;
}

@keyframes sm-drop {
  0% {
    transform: translateY(0);
    opacity: 0;
  }

  25% {
    opacity: 1;
  }

  55% {
    transform: translateY(12px);
    opacity: 0;
  }

  100% {
    transform: translateY(12px);
    opacity: 0;
  }
}

/* ---- skeleton statico della pagina gallery ---- */

.film-root {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  font-family: 'Hanken Grotesk', sans-serif;
}

.film-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.film-scenes {
  position: absolute;
  inset: 0;
}

.film-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(130% 100% at 50% 46%, rgba(0, 0, 0, 0) 54%, rgba(0, 0, 0, .5) 100%);
}

.bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  background: #000;
  z-index: 3;
}

.bar--top {
  top: 0;
}

.bar--bot {
  bottom: 0;
}

.card-outro {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vw;
  opacity: 0;
  pointer-events: none;
}

.outro-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 46px);
  color: #f5f2ec;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .6);
}

.outro-divider {
  width: 40px;
  height: 1px;
  background: #b9cfe4;
  margin: 28px 0;
}

.outro-small {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: #b9cfe4;
}

.film-caps {
  position: absolute;
  inset: 0;
}

.film-timeline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 88px;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(0deg, rgba(4, 7, 11, .74) 0%, rgba(4, 7, 11, 0) 100%);
}

.film-track {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 22px;
  height: 2px;
  background: rgba(255, 255, 255, .18);
  border-radius: 2px;
}

.film-prog {
  height: 100%;
  width: 0%;
  background: #e7eef5;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(231, 238, 245, .55);
}

.film-thumbs {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 22px;
  height: 0;
}

.film-controls {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 6;
  display: flex;
  gap: 10px;
  opacity: 0;
  transition: opacity .8s ease;
  pointer-events: none;
}

.film-credit {
  display: none;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  color: #f5f2ec;
  font-family: 'Hanken Grotesk', sans-serif;
  padding: 6px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  max-width: 260px;
}

.film-credit-text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.film-scrollhint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 23vh;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .7s ease;
}

.film-scrollhint .label {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(245, 242, 236, .72);
  text-shadow: 0 1px 14px rgba(0, 0, 0, .6);
  padding-top: 15px;
  padding-bottom: 15px;
}

.film-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8vw;
  background: radial-gradient(120% 120% at 50% 40%, #0c1118 0%, #050709 100%);
}

.film-panel--start {
  z-index: 20;
}

.film-panel--replay {
  z-index: 22;
  display: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.cover-kicker {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: #8aa6c2;
  margin-bottom: 26px;
}

.cover-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(42px, 6.6vw, 98px);
  line-height: 1.02;
  color: #f5f2ec;
  margin-bottom: 14px;
}

.film-sub {
  font-weight: 300;
  font-size: 15px;
  letter-spacing: .04em;
  color: rgba(245, 242, 236, .6);
  max-width: 440px;
  margin-bottom: 40px;
  transition: opacity .6s ease;
  height: 40px;
  align-self: center;
  padding-top: 15px;
  padding-bottom: 15px;
}

/* ---- scene e miniature generate a runtime da gallery.js ---- */
/* Qui gli elementi si ripetono (una scena per foto, una miniatura per scena):
   niente ID possibile per definizione, quindi tutto lo stile fisso vive qui su
   classi; gallery.js applica solo className + le poche coordinate calcolate
   (posizione, percentuali, opacita' animata) che cambiano per istanza/frame. */

.scene {
  position: absolute;
  left: 0;
  right: 0;
  opacity: 0;
  will-change: opacity;
}

.scene-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 50%;
  will-change: transform, filter;
}

.scene-cap {
  position: absolute;
  bottom: 104px;
  z-index: 4;
  max-width: 320px;
  opacity: 0;
  pointer-events: none;
}

.scene-cap--left {
  left: 6vw;
  text-align: left;
}

.scene-cap--right {
  right: 6vw;
  text-align: right;
}

.scene-kick-row {
  display: flex;
  align-items: baseline;
  gap: .6em;
  margin-bottom: 7px;
  justify-content: flex-start;
}

.scene-cap--right .scene-kick-row {
  justify-content: flex-end;
}

.scene-kick-num {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .36em;
  text-transform: uppercase;
  color: #b9cfe4;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .7);
}

.scene-kick-title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #f5f2ec;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .7);
}

.scene-cap-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 1.55vw, 21px);
  line-height: 1.4;
  color: #f5f2ec;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .9);
}

.thumb-wrap {
  position: absolute;
  bottom: -4px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transition: opacity .7s ease;
}

.thumb-frame {
  width: 56px;
  height: 35px;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .55);
  margin-bottom: 11px;
  opacity: .42;
  transform: translateY(2px) scale(1);
  transition: opacity .45s ease, transform .45s ease, border-color .45s ease;
}

.thumb-wrap:hover .thumb-frame:not(.is-active) {
  opacity: .78;
}

.thumb-frame.is-active {
  opacity: 1;
  transform: translateY(-3px) scale(1.08);
  border-color: rgba(231, 238, 245, .95);
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #90a6bc;
  box-shadow: 0 0 0 3px #060a0f;
  transition: background .45s ease, transform .45s ease;
}

.thumb-dot.is-active {
  background: #e7eef5;
  transform: scale(1.3);
}
