/* I capitoli di colore */
:root {
  --inchiostro: #1B1814;
  --latte: #F7F1E7;
  --tenue: #5E554B;
  --margine: clamp(18px, 4vw, 56px);
  --alto: 100vh;
}
@supports (height: 100svh) {
  :root { --alto: 100svh; }
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
}
body {
  background: var(--latte);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
}

/* ---- l’apertura e la chiusura ---- */
.apertura {
  display: grid;
  align-content: end;
  min-height: calc(var(--alto) * 0.78);
  padding: var(--margine);
}
.apertura__titolo {
  max-width: 12ch;
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 1.4rem + 5vw, 6.4rem);
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 0.94;
}
.apertura__testo {
  max-width: 40ch;
  margin: 0;
  color: var(--tenue);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.5;
}
.chiusura {
  display: grid;
  place-items: center;
  min-height: calc(var(--alto) * 0.7);
  padding: var(--margine);
}
.chiusura__testo {
  max-width: 20ch;
  margin: 0;
  font-size: clamp(1.6rem, 1rem + 2.4vw, 3rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.05;
  text-align: center;
}

/* ---- la giornata: a sinistra i momenti che scorrono, a destra il pannello fermo ---- */
.giornata {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
}
.giornata__momenti {
  padding: 0 var(--margine);
}
.capitolo {
  display: grid;
  gap: calc(var(--alto) * 0.16);
  align-content: start;
  min-height: calc(var(--alto) * 1.5);
  padding: calc(var(--alto) * 0.22) 0 calc(var(--alto) * 0.1);
}
.capitolo__titolo {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.momento {
  width: min(100%, 440px);
  margin: 0;
}
.momento:nth-of-type(even) {
  justify-self: end;
}
.momento__quadro {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
/* il disegno è più grande della cornice: così può scorrere dentro senza mostrare i bordi */
.momento__disegno {
  display: block;
  width: 100%;
  height: 100%;
  transform: scale(1.2);
}
.momento__testo {
  margin-top: 0.9rem;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.4;
}
.momento__ora {
  margin-right: 0.35em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pannello {
  position: sticky;
  top: 0;
  align-self: start;
  height: var(--alto);
  background: #F3C6A1;
  color: var(--inchiostro);
}
.pannello__dentro {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  padding-bottom: calc(var(--alto) * 0.18);
}
.pannello__segno {
  width: min(62%, 360px);
  height: auto;
}
.pannello__voce {
  position: absolute;
  left: var(--margine);
  right: var(--margine);
  bottom: calc(var(--margine) * 1.4);
}
.pannello__nome {
  margin: 0 0 0.55rem;
  font-size: clamp(2.4rem, 1.3rem + 3.2vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
}
.pannello__frase {
  max-width: 26ch;
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.25rem);
  line-height: 1.4;
}

/* ---- la barra del telefono ---- */
.barra {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: none;
  align-items: center;
  gap: 0.7rem;
  height: 58px;
  padding: 0 var(--margine);
  background: #F3C6A1;
  color: var(--inchiostro);
  font-weight: 620;
  transform: translateY(-100%);
}
.barra__segno {
  width: 30px;
  height: 30px;
}
.barra__nome {
  display: inline-block;
  font-size: 1.05rem;
}

@media (max-width: 760px) {
  .giornata {
    grid-template-columns: 1fr;
  }
  .pannello {
    display: none;
  }
  .barra {
    display: flex;
  }
  .capitolo {
    min-height: 0;
    gap: calc(var(--alto) * 0.1);
    padding-top: calc(var(--alto) * 0.14);
  }
  .momento:nth-of-type(even) {
    justify-self: start;
  }
}
