/* The hotel photo behind shutters that open as you scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #f4efe6;
  --inchiostro: #1d1c1a;
  --tenue: #8c867c;
  --persiana: #2f5d57;
  --muro: #e9e1d4;
}

* { 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: 360vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(8px, 2.5vh, 32px) clamp(8px, 3vw, 36px);
  overflow: hidden;
}

/* the artboard is drawn at 640 x 420 and scaled to fit the stage on both width and height */
.spazio { position: relative; flex: none; }
.tavola.is-stretta { width: 500px; }
.is-stretta .finestra { left: 100px; }
.tavola {
  position: absolute;
  left: 0;
  top: 0;
  width: 640px;
  height: 420px;
  transform-origin: 0 0;
}

.testata {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: var(--inchiostro);
  z-index: 4;
}
.testata__marchio { display: inline-flex; align-items: center; gap: 7px; font-weight: 640; }
.testata__marchio svg { width: 15px; height: 15px; fill: none; stroke: var(--persiana); stroke-width: 1.8; stroke-linecap: round; }
.testata__voce { color: var(--tenue); font-weight: 480; }

/* ---------- the window: a plaster reveal, the photo inside, two shutters on hinges ---------- */
.finestra {
  position: absolute;
  left: 170px;
  top: 36px;
  width: 300px;
  height: 262px;
  perspective: 1100px;
  perspective-origin: 50% 46%;
}
.finestra__vano {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 2px;
  /* the thickness of the wall, seen as a soft inner shadow */
  box-shadow: inset 0 0 0 1px rgba(29, 28, 26, 0.08);
  background: #cbbfae;
}
.foto { position: absolute; inset: -8px; transform-origin: 50% 58%; }
.foto img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 14% 50%; }
.foto__grana {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* the shadows of the slats on the photo, while the light comes through in stripes */
.strisce {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: repeating-linear-gradient(176deg, rgba(20, 30, 32, 0) 0 9px, rgba(20, 30, 32, 0.34) 9px 16px);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.davanzale {
  position: absolute;
  left: -14px;
  right: -14px;
  bottom: -9px;
  height: 9px;
  border-radius: 2px;
  background: linear-gradient(#efe8dc, #d9cfbf);
  box-shadow: 0 6px 12px -6px rgba(60, 45, 30, 0.35);
}

.ante { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.anta {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  transform-style: preserve-3d;
  backface-visibility: visible;
}
.anta--sx { left: 0; transform-origin: 0 50%; }
.anta--dx { right: 0; transform-origin: 100% 50%; }
.anta__telaio {
  position: absolute;
  inset: 0;
  background: transparent;
  border-radius: 1.5px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 0 0 7px var(--persiana), 0 1px 2px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
/* the stiles darken a touch, as painted wood in the shade */
.anta__telaio::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5px;
  box-shadow: inset 0 0 0 7px rgba(0, 0, 0, 0.12), inset 0 0 0 8px rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 3;
}
.lamelle { position: absolute; left: 7px; right: 7px; top: 9px; bottom: 9px; }
.lamella {
  position: absolute;
  left: 0;
  right: 0;
  transform-origin: 50% 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.02) 40%, rgba(0, 0, 0, 0.16) 100%), var(--persiana);
  border-radius: 1px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}
.traversa {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  background: var(--persiana);
  z-index: 2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 -1px 0 rgba(0, 0, 0, 0.14);
}
.cardine {
  position: absolute;
  width: 3px;
  height: 14px;
  border-radius: 1.5px;
  background: #6d6a63;
  z-index: 4;
}

/* ---------- the name under the window ---------- */
.nome {
  position: absolute;
  left: 0;
  right: 0;
  top: 316px;
  text-align: center;
}
.nome__titolo {
  font-size: 46px;
  line-height: 1;
  font-weight: 620;
  font-stretch: 112%;
  letter-spacing: -0.02em;
}
.nome__titolo .lettera { display: inline-block; will-change: transform; }
.nome__riga {
  display: block;
  width: 120px;
  height: 1.5px;
  margin: 12px auto 9px;
  background: var(--persiana);
  transform-origin: 50% 50%;
}
.nome__sotto { font-size: 13px; color: var(--tenue); font-weight: 460; }

.invito {
  position: absolute;
  left: 0;
  right: 0;
  top: 350px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--tenue);
}
.invito svg { width: 10px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
