/* The detail zoom of a product page on scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #f3eee7;
  --inchiostro: #1f1a15;
  --secondario: #7a6f63;
  --spento: #b8ad9f;
  --linea: rgba(31, 26, 21, 0.12);
  --accento: #a8642a;
  --carta: #fffdf9;
}

* { 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: 420vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4.5vw, 64px);
  padding: clamp(10px, 3vh, 40px) clamp(12px, 5vw, 64px);
  overflow: hidden;
}

/* ---- the photo ---- */
.foto-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.8vh, 18px);
  width: min(54vw, 118vh, 720px);
  flex: none;
}
.cornice {
  position: relative;
  width: 100%;
  aspect-ratio: 1024 / 610;
  border-radius: clamp(10px, 1.6vw, 18px);
  overflow: hidden;
  background: #cdbfae;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 2px 4px rgba(60, 38, 18, 0.08), 0 24px 48px -28px rgba(60, 38, 18, 0.55);
  isolation: isolate;
}
/* GSAP moves this one (translate + scale from the top left corner) */
.immagine {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.immagine img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* the soft vignette and the depth blur at the edges, stronger the closer the camera gets */
.vignetta {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 62% at 50% 50%, rgba(20, 12, 6, 0) 52%, rgba(20, 12, 6, 0.42) 100%);
  opacity: 0;
}
.fuoco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(var(--sfocatura, 3px));
  backdrop-filter: blur(var(--sfocatura, 3px));
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, transparent 55%, #000 100%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, transparent 55%, #000 100%);
  opacity: 0;
}
.grana {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- the labels: a ring on the point, a hairline, a small card ---- */
.segni { position: absolute; inset: 0; pointer-events: none; }
.segno { position: absolute; left: 0; top: 0; opacity: 0; }
.segno__punto {
  position: absolute;
  left: 0; top: 0;
  width: clamp(14px, 1.8vw, 20px);
  height: clamp(14px, 1.8vw, 20px);
  margin: calc(clamp(14px, 1.8vw, 20px) / -2) 0 0 calc(clamp(14px, 1.8vw, 20px) / -2);
  border-radius: 50%;
  border: 1.5px solid var(--carta);
  box-shadow: 0 0 0 1px rgba(31, 26, 21, 0.18), 0 2px 8px rgba(20, 12, 6, 0.35);
}
.segno__punto::after {
  content: '';
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--carta);
}
.segno__filo {
  position: absolute;
  left: 0; top: 0;
  height: 1px;
  background: var(--carta);
  box-shadow: 0 0 2px rgba(20, 12, 6, 0.4);
  transform-origin: 0 50%;
}
.segno__etichetta {
  position: absolute;
  left: 0; top: 0;
  display: grid;
  gap: 2px;
  padding: clamp(6px, 1vh, 9px) clamp(8px, 1.1vw, 12px);
  border-radius: 9px;
  background: rgba(255, 253, 249, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 8px 22px -10px rgba(20, 12, 6, 0.55);
  white-space: nowrap;
  font-size: clamp(9px, min(1.2vw, 2vh), 13px);
  line-height: 1.2;
  color: var(--secondario);
}
.segno__etichetta b { color: var(--inchiostro); font-weight: 640; font-stretch: 108%; letter-spacing: -0.005em; }

/* ---- the detail names under the photo ---- */
.dettagli {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(31, 26, 21, 0.06);
}
.dettagli__pillola {
  position: absolute;
  top: 3px; left: 0;
  height: calc(100% - 6px);
  width: 0;
  border-radius: 999px;
  background: var(--carta);
  box-shadow: 0 1px 2px rgba(31, 26, 21, 0.12), 0 4px 10px -6px rgba(31, 26, 21, 0.4);
  opacity: 0;
}
.dettaglio {
  position: relative;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: clamp(10px, min(1.3vw, 2.1vh), 13px);
  font-weight: 560;
  color: var(--secondario);
  padding: clamp(4px, 0.8vh, 7px) clamp(10px, 1.4vw, 16px);
  border-radius: 999px;
  transition: color 0.3s ease, font-stretch 0.35s cubic-bezier(.34, 1.56, .64, 1);
}
.dettaglio.acceso { color: var(--inchiostro); }
.dettaglio:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }
@media (hover: hover) {
  .dettaglio:hover { color: var(--inchiostro); font-stretch: 112%; }
}

/* ---- the text column ---- */
.info { width: min(30vw, 320px); flex: none; }
.marca {
  font-size: clamp(10px, min(1.3vw, 2vh), 13px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accento);
}
.marca span { color: var(--spento); font-weight: 500; }
.nome {
  margin-top: clamp(4px, 1vh, 10px);
  font-size: clamp(22px, min(4.6vw, 7.4vh), 56px);
  line-height: 0.98;
  font-weight: 660;
  font-stretch: 118%;
  letter-spacing: -0.03em;
}
.riga {
  margin-top: clamp(6px, 1.4vh, 14px);
  font-size: clamp(11px, min(1.4vw, 2.2vh), 15px);
  line-height: 1.45;
  color: var(--secondario);
}
.compra {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 16px);
  margin-top: clamp(10px, 2.4vh, 26px);
}
.prezzo {
  font-size: clamp(18px, min(2.6vw, 4.2vh), 30px);
  font-weight: 620;
  font-stretch: 108%;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.prezzo__valuta { font-size: 0.62em; vertical-align: 0.42em; margin-right: 1px; color: var(--secondario); }
.scorri {
  margin-top: clamp(8px, 2vh, 20px);
  font-size: clamp(9px, min(1.2vw, 1.9vh), 12px);
  color: var(--spento);
  letter-spacing: 0.02em;
}

/* the elastic pill of the site */
.pillola {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: clamp(32px, 5.4vh, 42px);
  padding: 0 clamp(14px, 2.4vh, 20px);
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  font-size: clamp(12px, min(1.4vw, 2.2vh), 14px);
  font-weight: 600;
  color: var(--carta);
  transition: font-stretch 0.45s cubic-bezier(.34, 1.56, .64, 1);
}
.pillola__fondo {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #2b231c, #18130f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 22px -12px rgba(168, 100, 42, 0.7);
  transition: transform 0.55s cubic-bezier(.34, 1.56, .64, 1);
}
.pillola__testo, .pillola__spunta { position: relative; }
.pillola__spunta { width: 0; height: 14px; fill: none; stroke: #f3d4a8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; transition: width 0.4s cubic-bezier(.34, 1.56, .64, 1); }
.pillola.fatta .pillola__spunta { width: 14px; }
.pillola:active .pillola__fondo { transform: scale(0.96); }
@media (hover: hover) {
  .pillola:hover { font-stretch: 112%; }
  .pillola:hover .pillola__fondo { transform: scale(1.04, 1.08); }
}

.fine {
  padding: 28px 20px 36px;
  text-align: center;
  font-size: 12px;
  color: var(--spento);
}

/* ---- phone and narrow boxes: the photo on top, the text under it ---- */
@media (max-width: 720px), (max-aspect-ratio: 1/1) {
  .palco { flex-direction: column; gap: clamp(8px, 2vh, 18px); }
  .foto-col { width: min(92vw, 110vh); }
  .info { width: min(92vw, 110vh); display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 12px; }
  .marca { grid-column: 1 / -1; }
  .nome { grid-column: 1; font-size: clamp(20px, min(7vw, 6vh), 34px); margin-top: 2px; }
  .riga { display: none; }
  .compra { grid-column: 2; grid-row: 2; margin-top: 0; }
  .scorri { grid-column: 1 / -1; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .pillola, .pillola__fondo, .pillola__spunta, .dettaglio { transition: none; }
}
