/* The transition from the case study to the next project through the row of work. Colours in :root (the Playground palette). */
:root {
  --sala: #e6e2da;        /* the room behind the pages, seen when they shrink into the row */
  --pagina: #fbfaf7;      /* the page */
  --inchiostro: #17150f;
  --secondario: #77726a;
  --filo: rgba(23, 21, 15, 0.1);
  --accento: #d4562b;     /* the only accent: the arrow of the next project and the studio mark */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--sala); }
body {
  background: var(--sala);
  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: 400vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  overflow: hidden;
  background: var(--sala);
}

/* ---- the bar above everything ---- */
.barra {
  position: absolute;
  z-index: 50;
  left: 0; right: 0; top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(10px, 2.6vh, 24px) clamp(14px, 4vw, 48px);
  font-size: clamp(10px, min(1.25vw, 2vh), 14px);
  pointer-events: none;
}
.marchio { display: inline-flex; align-items: center; gap: 0.5em; font-weight: 640; letter-spacing: -0.01em; }
.marchio svg { width: 1.2em; height: 1.2em; fill: none; stroke: var(--accento); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.didascalia { position: relative; height: 1.3em; overflow: hidden; color: var(--secondario); min-width: 9em; text-align: center; }
.didascalia span { display: block; line-height: 1.3em; }
.voci { display: inline-flex; gap: 1.4em; color: var(--secondario); }

/* ---- the row of work: every page is as big as the stage, GSAP moves and scales it ---- */
.fila { position: absolute; inset: 0; }
.lavoro {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.lavoro__dentro {
  position: absolute;
  left: 0; right: 0; top: 0;
  background: var(--pagina);
  padding: 0 clamp(14px, 4vw, 48px);
  box-shadow: 0 0 0 1px var(--filo);
  will-change: transform;
}
/* one screen of the page; the footer with the next project waits below it */
.pagina {
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(8px, 1.8vh, 18px);
  padding: clamp(40px, 9vh, 92px) 0 clamp(14px, 4vh, 40px);
}
/* the card clips the page; the veil and the rounded corners live on the card */
.lavoro { overflow: hidden; border-radius: var(--raggio, 0px); box-shadow: 0 var(--ombra-y, 0px) var(--ombra-b, 0px) rgba(30, 24, 12, var(--ombra-a, 0)); }
/* the dimming veil, for the pages that are not in the middle of the row */
.lavoro::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--sala);
  opacity: var(--velo, 0);
  pointer-events: none;
}

/* ---- the covers, drawn in CSS ---- */
.copertina {
  position: relative;
  flex: 0 0 auto;
  height: min(46vh, 52vw);
  border-radius: clamp(6px, 1.2vmin, 14px);
  overflow: hidden;
}
.copertina > span { position: absolute; display: block; }

.copertina--nord { background: linear-gradient(180deg, #213d63 0%, #1a3150 100%); }
.nord__sole { width: min(22vh, 22vw); aspect-ratio: 1; border-radius: 50%; left: 50%; top: 22%; margin-left: calc(min(22vh, 22vw) / -2); background: radial-gradient(circle at 40% 35%, #fbf6ea, #e9dcc0 70%); box-shadow: 0 0 60px rgba(251, 246, 234, 0.25); }
.nord__linea { left: 8%; right: 8%; top: 66%; height: 1.5px; background: rgba(251, 246, 234, 0.7); }
.nord__scritta { left: 0; right: 0; bottom: 10%; text-align: center; color: #fbf6ea; font-weight: 600; font-stretch: 125%; letter-spacing: 0.32em; font-size: clamp(8px, min(1.4vw, 2vh), 15px); }

.copertina--pell { background: #d8a24a; }
.pell__scatola { left: 50%; border-radius: 6px; background: #f6ead2; box-shadow: 0 6px 0 rgba(120, 72, 18, 0.18), inset 0 -2px 0 rgba(120, 72, 18, 0.12); }
.pell__scatola--a { width: 34%; height: 18%; bottom: 14%; margin-left: -17%; }
.pell__scatola--b { width: 28%; height: 16%; bottom: 34%; margin-left: -15%; transform: rotate(-3deg); }
.pell__scatola--c { width: 22%; height: 14%; bottom: 52%; margin-left: -10%; transform: rotate(4deg); background: #fbf3e2; }

.copertina--quiete { background: #9fb6a4; }
.quiete__telefono { width: min(12vh, 13vw); height: 70%; left: 50%; top: 15%; margin-left: calc(min(12vh, 13vw) / -2); border-radius: 14px; border: 2px solid rgba(23, 33, 26, 0.75); background: #b4c8b8; }
.quiete__luna { position: absolute; width: 46%; aspect-ratio: 1; left: 27%; top: 26%; border-radius: 50%; box-shadow: inset -0.45em 0.1em 0 0 #f4f1e6; transform: rotate(-20deg); font-size: min(2vh, 2vw); }

.copertina--sego { background: #efe5d3; }
.sego__lettera { left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-weight: 820; font-stretch: 75%; font-size: min(36vh, 34vw); line-height: 0.8; color: #6e4a2c; }

.copertina--ferro { background: #262523; }
.ferro__arco { width: 30%; height: 64%; left: 35%; bottom: 0; border-radius: 999px 999px 0 0; background: linear-gradient(180deg, #e2672f, #b9481c); }

/* ---- the text of the page ---- */
.testa { display: flex; align-items: flex-end; justify-content: space-between; gap: clamp(10px, 3vw, 40px); flex-wrap: wrap; }
.nome {
  font-size: clamp(30px, min(8.5vw, 11vh), 128px);
  font-weight: 640;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 0.92;
}
.riga { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.06em; }
.riga > span { display: inline-block; }
.dati { display: flex; gap: clamp(12px, 2.6vw, 34px); font-size: clamp(9px, min(1.1vw, 1.7vh), 13px); }
.dati dt { color: var(--secondario); margin-bottom: 0.2em; }
.dati dd { font-weight: 560; white-space: nowrap; }
.testo { max-width: 46ch; color: var(--secondario); font-size: clamp(10px, min(1.3vw, 2vh), 16px); line-height: 1.45; }

/* the footer of the case study, reached by scrolling inside the page */
.prossimo {
  display: flex;
  align-items: baseline;
  gap: 0.8em;
  padding: clamp(14px, 4vh, 40px) 0 clamp(18px, 5vh, 52px);
  border-top: 1px solid var(--filo);
  color: inherit;
  text-decoration: none;
}
.prossimo__eti { font-size: clamp(9px, min(1.1vw, 1.7vh), 13px); color: var(--secondario); }
.prossimo__nome { font-size: clamp(18px, min(4vw, 5.5vh), 56px); font-weight: 620; font-stretch: 108%; letter-spacing: -0.03em; }
.prossimo svg { width: clamp(16px, min(3vw, 4vh), 40px); height: auto; align-self: center; margin-left: auto; fill: none; stroke: var(--accento); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.piede { padding: 40px 20px; text-align: center; color: var(--secondario); font-size: 12px; }

@media (max-width: 560px) {
  .voci { display: none; }
  .testo { display: none; }
}
