/* The photos on a cylinder that turns as you scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #f3f1ec;
  --inchiostro: #191816;
  --tenue: #8b867d;
  --accento: #c4572f;
  --cornice: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--fondo); }
body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.corsa { position: relative; height: 460vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 46%, #fbfaf7 0%, rgba(251, 250, 247, 0) 70%),
    var(--fondo);
}

/* the studio header */
.testata {
  position: absolute;
  left: clamp(14px, 3vw, 32px);
  right: clamp(14px, 3vw, 32px);
  top: clamp(12px, 2.6vh, 26px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(11px, 1.5vh, 13px);
  z-index: 5;
}
.testata__marchio { display: inline-flex; align-items: center; gap: 7px; font-weight: 640; letter-spacing: 0.005em; }
.testata__marchio svg { width: 15px; height: 15px; fill: none; stroke: var(--accento); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.testata__voce { color: var(--tenue); font-weight: 480; }

/* the 3D stage: its size and perspective are set in pixels by the script */
.scena {
  position: absolute;
  left: 50%;
  top: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.cilindro {
  position: absolute;
  left: 0;
  top: 0;
  transform-style: preserve-3d;
}
.ombra {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(40, 32, 22, 0.22), rgba(40, 32, 22, 0));
  pointer-events: none;
}

/* one print: GSAP moves .stampa, the frame and the photo live in its children */
.stampa {
  position: absolute;
  left: 0;
  top: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}
.stampa__cornice {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #ddd8cf;
  box-shadow:
    0 0 0 1px rgba(25, 24, 22, 0.06),
    0 14px 30px -14px rgba(40, 30, 18, 0.35),
    0 2px 6px rgba(40, 30, 18, 0.08);
}
.stampa img {
  position: absolute;
  top: 0;
  height: 100%;
  display: block;
  object-fit: cover;
  max-width: none;
}
/* a thin inner line, like the edge of a printed photo */
.stampa__bordo {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
/* a sheen that slides across as the print turns */
.stampa__riflesso {
  position: absolute;
  inset: -20% -60%;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0) 62%);
  pointer-events: none;
  mix-blend-mode: soft-light;
}
.stampa__buio {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: #15120e;
  opacity: 0;
  pointer-events: none;
}

/* the caption of the print in front */
.didascalia {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 4;
  pointer-events: none;
}
.didascalia__nome,
.didascalia__luogo { overflow: hidden; }
.didascalia__nome span,
.didascalia__luogo span { display: inline-block; }
.didascalia__nome {
  font-size: clamp(15px, 2.6vh, 22px);
  font-weight: 620;
  font-stretch: 92%;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.didascalia__luogo {
  margin-top: 3px;
  font-size: clamp(11px, 1.6vh, 13px);
  color: var(--tenue);
  line-height: 1.3;
}

.invito {
  position: absolute;
  left: 50%;
  bottom: clamp(10px, 2.4vh, 24px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tenue);
  z-index: 4;
}
.invito svg { width: 10px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) {
  .invito { display: none; }
}
