:root {
  --fondo: #f3eee5;
  --inchiostro: #1c1a16;
  --grigio: #857e72;
  --linea: rgba(28, 26, 22, 0.12);
  --pillola: #1c1a16;
  --pillola-testo: #f3eee5;
  --accento: #b4532e;
}

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

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.palco {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* the header */
.testa {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(12px, 3.2vmin, 26px) clamp(14px, 4vmin, 36px);
}

.marchio {
  color: inherit;
  text-decoration: none;
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: -0.01em;
  font-size: clamp(14px, 2.4vmin, 18px);
}

.nav {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--linea);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.nav__pillola {
  position: absolute;
  top: 3px;
  left: 0;
  height: calc(100% - 6px);
  width: 0;
  border-radius: 999px;
  background: var(--pillola);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.2), 0 6px 14px -8px rgba(28, 26, 22, 0.5);
}

.nav__voce {
  position: relative;
  z-index: 1;
  padding: clamp(5px, 1.2vmin, 8px) clamp(11px, 2.4vmin, 16px);
  border-radius: 999px;
  font-size: clamp(12px, 1.9vmin, 14px);
  font-weight: 520;
  transition: color 0.3s ease;
}

.nav__voce[aria-current='page'] { color: var(--pillola-testo); }

@media (hover: hover) {
  .nav__voce:not([aria-current='page']):hover { color: var(--accento); }
}

.nav__voce:focus-visible,
.avanti:focus-visible { outline: 2px solid var(--accento); outline-offset: 2px; }

/* the pages */
.pagina {
  position: absolute;
  inset: 0;
}

.pagina[hidden] { display: none; }

.cornice {
  position: absolute;
  border-radius: 4px;
}

.didascalia {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
}

.riga { display: block; overflow: hidden; padding-bottom: 0.08em; }
.riga__in { display: inline-block; will-change: transform; }

.didascalia__titolo {
  font-size: clamp(20px, 4.6vmin, 40px);
  font-weight: 650;
  font-stretch: 118%;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.didascalia__sotto {
  margin-top: 0.35em;
  color: var(--grigio);
  font-size: clamp(11px, 1.8vmin, 14px);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.avanti {
  position: absolute;
  right: clamp(14px, 4vmin, 36px);
  bottom: clamp(12px, 3.2vmin, 26px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-size: clamp(12px, 1.9vmin, 14px);
  font-weight: 520;
}

.avanti svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.35s cubic-bezier(.2, .9, .3, 1.3); }

@media (hover: hover) {
  .avanti:hover svg { transform: translateX(3px); }
  .avanti:hover { color: var(--accento); }
}

.centro {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  width: 40%;
}

.centro__occhiello {
  color: var(--grigio);
  font-size: clamp(10px, 1.6vmin, 12px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.centro__nome {
  margin-top: 0.35em;
  font-size: clamp(15px, 3vmin, 26px);
  font-weight: 640;
  font-stretch: 116%;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.centro__anno {
  margin-top: 0.3em;
  color: var(--grigio);
  font-size: clamp(10px, 1.6vmin, 13px);
  font-variant-numeric: tabular-nums;
}

/* the photographs: one layer shared by both pages, so a photo can travel from one to the other */
.foto-strato {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.foto {
  position: absolute;
  left: 0;
  top: 0;
  border: 0;
  padding: 0;
  border-radius: 3px;
  background-size: cover;
  background-position: center;
  background-color: #d9d1c3;
  box-shadow: 0 1px 1px rgba(28, 26, 22, 0.06), 0 14px 30px -18px rgba(28, 26, 22, 0.55);
  pointer-events: none;
  will-change: transform;
  transform-origin: 50% 50%;
}

/* a hairline of light on the edge of the print, so the paler photos do not melt into the cream */
.foto::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(28, 26, 22, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.foto.is-cliccabile { pointer-events: auto; cursor: pointer; }

.foto:focus-visible { outline: 2px solid var(--accento); outline-offset: 3px; }

.puntatore {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.puntatore path { fill: #111; stroke: #fff; stroke-width: 1.3; stroke-linejoin: round; }
