:root {
  --fondo: #f4efe9;
  --carta: #fffdfb;
  --testo: #1d1916;
  --tenue: #8a8079;
  --linea: rgba(29, 25, 22, 0.1);
  --accento: #a2482f;
  --accento-chiaro: #f6e3db;
  --ombra: 0 1px 2px rgba(48, 30, 20, 0.06), 0 22px 48px -24px rgba(48, 30, 20, 0.32);
  --raggio: 22px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }

.palco {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(10px, 3vmin, 40px);
  background: radial-gradient(120% 90% at 30% 20%, #fbf7f2 0%, var(--fondo) 60%);
}

/* ---- the lookbook ---- */
.libro {
  position: relative;
  width: min(1020px, 92vw);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(14px, 2.6vw, 34px);
  padding: clamp(10px, 1.6vw, 16px);
  border-radius: var(--raggio);
  background: var(--carta);
  box-shadow: var(--ombra);
}

.foto {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: min(78vh, 560px);
  border-radius: 16px;
  overflow: hidden;
  background: #e9e1d8;
  isolation: isolate;
}
.lastra { position: absolute; inset: 0; }
.lastra img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.lastra:nth-child(1) img { object-position: 42% 40%; }
.lastra:nth-child(2) img { object-position: 30% 40%; }
.lastra:nth-child(3) img { object-position: 46% 30%; }
.lastra:nth-child(4) img { object-position: 52% 40%; }

.foto__velo {
  position: absolute; inset: 0; z-index: 900; pointer-events: none;
  background: linear-gradient(to top, rgba(20, 12, 8, 0.48) 0%, rgba(20, 12, 8, 0) 34%);
}
.foto__luce {
  position: absolute; inset: 0; z-index: 901; pointer-events: none; opacity: 0;
  background: radial-gradient(40% 32% at var(--x, 50%) var(--y, 30%), rgba(255, 244, 232, 0.32), transparent 70%);
  mix-blend-mode: soft-light;
}
.foto__etichetta {
  position: absolute; z-index: 902; left: 14px; right: 14px; bottom: 12px;
  display: flex; align-items: center; gap: 8px;
  color: #fff; font-size: clamp(10.5px, min(1.2vw, 1.9vh), 13px); font-weight: 560; letter-spacing: 0.02em;
}
.foto__etichetta i { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.45); }
.foto__etichetta em { font-style: normal; font-weight: 450; opacity: 0.82; }

/* ---- the text side ---- */
.testo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(4px, 1vw, 12px) clamp(2px, 1vw, 14px) clamp(4px, 1vw, 12px) 0;
}
.sopra {
  display: flex; align-items: center; gap: 7px;
  font-size: clamp(10px, min(1.15vw, 1.9vh), 14px); font-weight: 560; letter-spacing: 0.04em; color: var(--tenue);
}
.sopra svg { width: 16px; height: 16px; fill: none; stroke: var(--accento); stroke-width: 1.5; stroke-linecap: round; }

.scelte {
  position: relative;
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  margin: clamp(12px, 2.4vh, 24px) 0 clamp(14px, 3vh, 30px);
  padding: 4px;
  border-radius: 999px;
  background: #f1ebe5;
  box-shadow: inset 0 1px 2px rgba(48, 30, 20, 0.08);
}
.scelte__segno {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: 60px;
  border-radius: 999px;
  background: var(--carta);
  box-shadow: 0 1px 1px rgba(48, 30, 20, 0.08), 0 4px 10px -4px rgba(48, 30, 20, 0.28);
}
.scelta {
  position: relative; z-index: 1;
  padding: clamp(6px, 1.2vh, 9px) clamp(10px, 1.6vw, 16px);
  border-radius: 999px;
  font-size: clamp(11.5px, min(1.45vw, 2.3vh), 16px);
  font-weight: 520;
  font-variation-settings: 'wdth' 100;
  color: var(--tenue);
  transition: color 0.25s ease;
}
.scelta[aria-selected="true"] { color: var(--testo); font-weight: 640; }
.scelta:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }
@media (hover: hover) {
  .scelta:hover { color: var(--testo); }
}

/* a line that rolls: the visible text and the next one stacked */
.riga { position: relative; display: inline-block; overflow: hidden; vertical-align: top; }
.riga > span { display: inline-block; white-space: nowrap; }
.riga > span + span { position: absolute; left: 0; top: 0; }

.nome {
  font-size: clamp(24px, min(5vw, 7.4vh), 64px);
  font-weight: 640;
  font-variation-settings: 'wdth' 92;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
.nome .riga { padding-bottom: 0.08em; }
.nota {
  margin-top: clamp(6px, 1.2vh, 10px);
  font-size: clamp(12px, min(1.5vw, 2.4vh), 17px);
  color: var(--tenue);
}

.dati {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr;
  gap: 10px;
  margin: clamp(14px, 3vh, 30px) 0 clamp(14px, 3vh, 28px);
  padding-top: clamp(10px, 2vh, 16px);
  border-top: 1px solid var(--linea);
}
.dato dt { font-size: clamp(10px, min(1.15vw, 1.9vh), 13px); color: var(--tenue); letter-spacing: 0.02em; }
.dato dd { margin-top: 5px; font-size: clamp(13px, min(1.8vw, 2.8vh), 20px); font-weight: 600; letter-spacing: -0.01em; }
.persona { display: flex; align-items: center; gap: 7px; }
.viso {
  flex: none;
  display: grid; place-items: center;
  width: clamp(20px, 3.4vh, 26px); height: clamp(20px, 3.4vh, 26px);
  border-radius: 50%;
  background: var(--accento-chiaro); color: var(--accento);
  font-size: clamp(8.5px, 1.3vh, 10px); font-weight: 700; letter-spacing: 0.02em;
}

/* ---- Book this look ---- */
.prenota {
  position: relative;
  align-self: stretch;
  display: flex; align-items: center; justify-content: space-between;
  height: clamp(42px, 7.8vh, 60px);
  padding: 0 clamp(14px, 2vw, 20px);
  border-radius: 999px;
  background: var(--testo);
  color: #fff;
  font-size: clamp(13px, min(1.6vw, 2.5vh), 17px);
  font-weight: 600;
  overflow: hidden;
  box-shadow: 0 10px 22px -12px rgba(29, 25, 22, 0.6);
}
.prenota:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }
.prenota__luce {
  position: absolute; top: 0; bottom: 0; left: -40%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
}
.prenota__scritte { position: relative; display: block; height: 1.3em; flex: 1; text-align: left; overflow: hidden; }
.prenota__scritta { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 7px; white-space: nowrap; line-height: 1.3em; }
.prenota__scritta--fatto { opacity: 0; }
.prenota__scritta svg { width: 15px; height: 15px; fill: none; stroke: #f0c6b6; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.prenota__freccia { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.puntatore {
  position: fixed; left: 0; top: 0; z-index: 50;
  width: 22px; height: 22px;
  fill: #fff; stroke: #1d1916; stroke-width: 1.4; stroke-linejoin: round;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
  pointer-events: none; opacity: 0;
}

/* ---- narrow and short boxes: photo on top, details below ---- */
@media (max-width: 640px) {
  .libro { grid-template-columns: 1fr; gap: 10px; width: min(440px, 94vw); padding: 9px; }
  .foto { aspect-ratio: auto; height: min(36vh, 60vw); max-height: none; }
  .testo { padding: 0 4px 2px; }
  .sopra { display: none; }
  .scelte { margin: 0 0 clamp(8px, 1.8vh, 14px); }
  .nome { font-size: clamp(20px, min(6.4vw, 5.4vh), 30px); }
  .nota { margin-top: 3px; }
  .dati { margin: clamp(8px, 1.8vh, 14px) 0 clamp(8px, 1.8vh, 14px); padding-top: clamp(7px, 1.4vh, 12px); }
}
@media (max-height: 520px) and (min-width: 641px) {
  .foto { max-height: 82vh; }
}

@media (prefers-reduced-motion: reduce) {
  .scelta { transition: none; }
}
