/* The sunburst background that opens like a fan: a warm white ground, hairline rays on a canvas behind everything and
   one accent, taken by the ray under the pointer. On top, the headline of a made-up lighting studio (Radia) in Mona
   Sans, with its weight and width axes. */
:root {
  --fondo: #f3f0e8;                     /* the ground */
  --inchiostro: #161512;                /* the headline, the horizon and the hub */
  --tenue: #8d887d;                     /* the small text */
  --raggio: rgba(22, 21, 18, 0.17);     /* the rays */
  --accento: #e0491c;                   /* the ray under the pointer */
  --elastico: cubic-bezier(0.34, 1.9, 0.45, 1);
  --schermo: 100vh;
}

@supports (height: 100lvh) {
  :root { --schermo: 100lvh; }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.pagina {
  --margine: clamp(16px, 4.4vw, 60px);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  height: var(--schermo);
  padding: clamp(16px, 3vw, 34px) var(--margine);
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.fondo {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------------------------------------------------------------- the masthead */
.testa {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.testa p {
  margin: 0;
}

.marchio {
  font-size: 19px;
  font-weight: 660;
  font-stretch: 82%;
  letter-spacing: -0.005em;
}

.testa__nota {
  color: var(--tenue);
  font-size: 13px;
  font-weight: 480;
}

/* ---------------------------------------------------------------- the headline, above the pivot of the rays */
.eroe {
  display: grid;
  place-items: center;
  padding-bottom: min(22vh, 150px);
}

.blocco {
  display: grid;
  justify-items: center;
  text-align: center;
}

.occhiello {
  margin: 0 0 min(2.4vh, 16px);
  color: var(--tenue);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.titolo {
  margin: 0;
  font-size: min(clamp(2.2rem, 1rem + 4.6vw, 5rem), 11.5vh);
  font-weight: 560;
  font-stretch: 86%;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.riga {
  display: block;
  overflow: hidden;
  padding: 0.04em 0.1em 0.12em;
  margin: -0.04em -0.1em -0.12em;
}

.riga__dentro {
  display: block;
}

.azione {
  margin-top: min(4vh, 30px);
}

/* ---------------------------------------------------------------- the elastic pill */
.pillola {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  color: var(--fondo);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
}

.pillola::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--inchiostro);
  transition: inset 0.6s var(--elastico);
}

.pillola__scritta {
  font-stretch: 86%;
  text-align: center;
  transition: font-stretch 0.6s var(--elastico);
}

.pillola__scritta::before {
  content: attr(data-testo);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-stretch: 100%;
}

.pillola__freccia {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.6s var(--elastico);
}

@media (hover: hover) and (pointer: fine) {
  .pillola:hover::before {
    inset: -2px -7px;
  }

  .pillola:hover .pillola__scritta {
    font-stretch: 100%;
  }

  .pillola:hover .pillola__freccia {
    transform: translateX(3px);
  }
}

.pillola:active::before {
  inset: 2px 3px;
}

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

@media (max-width: 560px) {
  .titolo {
    font-size: min(clamp(2.1rem, 11vw, 3rem), 11vh);
  }
}
