:root {
  --carta: #f8f1e7;          /* the page and the loader */
  --carta-chiara: #fffaf3;   /* blossom petals, the cut face */
  --inchiostro: #3a1f1c;     /* type, leaves, stems */
  --accento: #e8642c;        /* the only colour: fruit, panel, counter fill */
  --accento-scuro: #c94f1f;  /* mandarins, the rind of the slice */
  --accento-chiaro: #f4a774; /* lemons, the segments */
  --polpa-chiara: #fbe3cc;   /* pith and the light side of a cut orange */
  --linea: rgba(58, 31, 28, .18);
  --filo: rgba(255, 246, 236, .78); /* the cream hairline on the panel */
}

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

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

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---- the loader ---- */
.carico {
  position: fixed;
  inset: 0;
  z-index: 2;
  background: var(--carta);
  overflow: hidden;
}

.frutti { position: absolute; inset: 0; }

.frutto {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.frutto svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 2px 3px rgba(58, 31, 28, .14)) drop-shadow(0 8px 14px rgba(58, 31, 28, .06));
}

.conta {
  position: absolute;
  left: 50%;
  top: 38%;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: clamp(6px, 1.2vmin, 12px);
  pointer-events: none;
}

.conta__etichetta {
  font-size: clamp(10px, 1.5vmin, 13px);
  font-weight: 560;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .62;
}

.conta__numero {
  display: flex;
  align-items: flex-start;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-weight: 380;
  font-size: min(18vw, 19vh, 150px);
  line-height: .9;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums lining-nums;
}

.conta__per {
  font-size: .34em;
  margin: .16em 0 0 .06em;
  color: var(--accento);
}

.conta__pista {
  position: relative;
  width: min(34vw, 30vh, 200px);
  height: 1px;
  background: var(--linea);
  overflow: hidden;
}

.conta__riempi {
  position: absolute;
  inset: 0;
  background: var(--inchiostro);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---- the panel that rises ---- */
.sipario {
  position: fixed;
  inset: 0;
  z-index: 3;
  background: var(--accento);
  visibility: hidden;
  pointer-events: none;
}

.sipario__filo {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--filo);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---- the page underneath ---- */
.pagina {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 6vmin;
  text-align: center;
}

.pagina__in {
  display: grid;
  justify-items: center;
  gap: clamp(12px, 3vmin, 26px);
  max-width: 760px;
}

.marchio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(11px, 1.6vmin, 14px);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.marchio__fiore { width: clamp(22px, 3.4vmin, 30px); height: auto; }
.marchio__petali { fill: none; stroke: var(--inchiostro); stroke-width: 2; transform-origin: 20px 20px; }
.marchio__cuore { fill: var(--accento); }

.titolo {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  font-weight: 360;
  font-size: min(9.4vw, 10.5vh, 92px);
  line-height: 1.02;
  letter-spacing: -.025em;
}

.titolo em {
  font-style: italic;
  color: var(--accento);
}

.riga {
  display: block;
  overflow: hidden;
  padding: 0 .06em .08em;
}

.riga__in { display: block; }

.frase {
  max-width: 34ch;
  font-size: clamp(13px, 2vmin, 17px);
  line-height: 1.5;
  opacity: .72;
}

.azioni {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 14px;
}

.pulsante {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 6px 0 20px;
  border-radius: 999px;
  background: var(--inchiostro);
  color: var(--carta);
  text-decoration: none;
  font-size: 14px;
  font-weight: 560;
  font-stretch: 100%;
  transition: font-stretch .45s cubic-bezier(.34, 1.56, .64, 1), background-color .3s;
}

.pulsante__freccia {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accento);
}

.pulsante__freccia svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--carta);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
}

.rifai {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--inchiostro);
  font: inherit;
  font-size: 13px;
  font-weight: 540;
  opacity: .66;
  cursor: pointer;
  transition: opacity .25s, background-color .25s;
}

.rifai svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1);
}

@media (hover: hover) {
  .pulsante:hover { font-stretch: 112%; }
  .pulsante:hover .pulsante__freccia svg { transform: translateX(2px); }
  .rifai:hover { opacity: 1; background: rgba(58, 31, 28, .06); }
  .rifai:hover svg { transform: rotate(-200deg); }
}

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

@media (max-width: 520px) {
  .conta { top: 34%; }
  .frase { max-width: 28ch; }
  .pulsante { height: 40px; font-size: 13px; }
  .rifai { height: 40px; }
}
