/* The title wrapped on a cylinder: the opening of a made-up magazine about clay. A warm paper page; in a tall
   section a stage stays still while you scroll, with the title wrapped on a cylinder of letters and clay bands.
   Further down a dark section, the kiln, holds the second title. */
:root {
  --paper: #f1e9dc;        /* the paper of the page */
  --ink: #2a1d15;          /* the text on the paper */
  --muted: #7d6858;        /* the small text */
  --glaze: #b5441d;        /* the title letters where the light hits them */
  --glaze-shade: #3a180b;  /* the title letters in the shade and at the back */
  --slip: #e4d3bb;         /* the clay bands of the cylinder in the light */
  --slip-shade: #8a6748;   /* the clay bands in the shade */
  --kiln: #1b120d;         /* the dark of the kiln section */
  --ember: #f29a4a;        /* the second title in the light */
  --ember-shade: #4c1d08;  /* the second title in the shade */
  --kiln-slip: #4a3224;    /* the bands of the second cylinder */
  --kiln-ink: #f1e4d2;     /* the text in the kiln section */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Instrument Sans Variable', 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.nascosto {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- the masthead */
.testata {
  position: fixed;
  z-index: 5;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px);
  mix-blend-mode: difference;
  color: #f1e9dc;
}

.testata__marchio {
  color: inherit;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 26px;
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.testata__uscita {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.testata__nav {
  display: flex;
  gap: 22px;
}

/* a link whose word rolls up on a little drum, with the same word coming in from below */
.rullo {
  display: inline-block;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none;
}

.rullo span {
  position: relative;
  display: inline-block;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rullo span::after {
  position: absolute;
  top: 100%;
  left: 0;
  content: attr(data-t);
  font-style: italic;
}

@media (hover: hover) {
  .rullo:hover span {
    transform: translateY(-100%);
  }
}

.rullo:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

/* ---------------------------------------------------------------- the stages */
.giro {
  position: relative;
  height: 380lvh;
}

.forno {
  position: relative;
  height: 300lvh;
  background: var(--kiln);
  color: var(--kiln-ink);
}

.palco {
  position: sticky;
  top: 0;
  height: 100lvh;
  overflow: hidden;
}

.occhiello {
  position: absolute;
  top: 17%;
  right: 16px;
  left: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-align: center;
  text-transform: uppercase;
}

.occhiello--forno {
  color: color-mix(in srgb, var(--kiln-ink) 60%, transparent);
}

.cilindro {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  pointer-events: none;
}

.anello {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.lettera,
.fascia {
  position: absolute;
  top: 0;
  left: 0;
  backface-visibility: visible;
  transform-style: preserve-3d;
}

.lettera {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 50, 'WONK' 0;
  font-weight: 760;
  line-height: 1;
  white-space: pre;
}

.lettera__in {
  display: block;
}

.fascia {
  border-radius: 2px;
}

/* the lines under the title, once it lies flat */
.sommario {
  position: absolute;
  top: 66%;
  left: 50%;
  width: min(560px, calc(100% - 32px));
  transform: translateX(-50%);
  text-align: center;
}

.sommario p {
  margin: 0;
}

.sommario__testo {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(17px, 1.6vw, 22px);
  font-style: italic;
  font-variation-settings: 'opsz' 24, 'SOFT' 100;
  line-height: 1.35;
}

.sommario__firma {
  margin-top: 14px !important;
  color: var(--muted);
  font-size: 13px;
}

.invito {
  position: absolute;
  bottom: 28px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateX(-50%);
  white-space: nowrap;
  transition: opacity 0.4s;
}

.invito svg {
  width: 10px;
  height: 15px;
}

/* ---------------------------------------------------------------- the article */
.pezzo {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  max-width: 1120px;
  margin: 0 auto;
  padding: 18vh clamp(16px, 5vw, 64px) 22vh;
}

.pezzo__testo p {
  margin: 0 0 1.2em;
  font-size: 17px;
  line-height: 1.65;
}

.pezzo__primo::first-letter {
  float: left;
  margin: 0.06em 0.1em 0 0;
  color: var(--glaze);
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: 4.2em;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-weight: 760;
  line-height: 0.8;
}

.citazione {
  margin: 1.6em 0;
  padding: 0;
}

.pezzo__testo .citazione p {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(24px, 2.6vw, 34px);
  font-style: italic;
  font-variation-settings: 'opsz' 72, 'SOFT' 100;
  line-height: 1.2;
}

.vaso {
  margin: 0;
  color: var(--glaze);
  text-align: center;
}

.vaso svg {
  width: min(100%, 300px);
  height: auto;
}

.vaso figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------------------------------------------------------------- the kiln */
.forno__nota {
  position: absolute;
  top: 66%;
  left: 50%;
  width: min(480px, calc(100% - 32px));
  margin: 0;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(17px, 1.6vw, 21px);
  font-style: italic;
  font-variation-settings: 'opsz' 24, 'SOFT' 100;
  line-height: 1.35;
  text-align: center;
  transform: translateX(-50%);
}

/* ---------------------------------------------------------------- the footer */
.piede {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 18vh 16px 16vh;
  text-align: center;
}

.piede p {
  margin: 0;
}

.piede__marchio {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-size: clamp(64px, 12vw, 160px);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.9;
}

.piede__testo {
  color: var(--muted);
}

/* the subscribe pill: the words widen a little and the clay swells with a bounce */
.pillola {
  position: relative;
  display: inline-grid;
  place-items: center;
  margin-top: 8px;
  padding: 15px 30px;
  color: var(--paper);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.pillola__fondo {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--glaze);
  transition: transform 0.7s cubic-bezier(0.34, 1.8, 0.5, 1), background-color 0.3s;
}

.pillola__scritta {
  position: relative;
  transition: letter-spacing 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .pillola:hover .pillola__fondo {
    transform: scale(1.08, 1.16);
    background-color: var(--glaze-shade);
  }

  .pillola:hover .pillola__scritta {
    letter-spacing: 0.06em;
  }
}

.pillola:active .pillola__fondo {
  transform: scale(0.94);
}

.pillola:focus-visible {
  outline: 2px solid var(--glaze);
  outline-offset: 4px;
  border-radius: 999px;
}

@media (max-width: 720px) {
  .testata__uscita {
    display: none;
  }

  .testata__nav {
    gap: 14px;
  }

  .rullo {
    font-size: 13px;
  }

  .pezzo {
    grid-template-columns: 1fr;
    padding-top: 12vh;
  }

  .vaso svg {
    width: 200px;
  }

  .occhiello {
    top: 19%;
    font-size: 11px;
  }

  .sommario {
    top: 62%;
  }
}
