:root {
  --muro: #22505d;         /* the walls of the great hall */
  --muro-scuro: #15343e;   /* the shadows high up and the doorways */
  --pietra: #efe2c8;       /* the columns, the arches and the marble floor */
  --pietra-ombra: #c4ab83; /* the shade on the stone and the plinth */
  --osso: #f3e6c8;         /* the bones, old ivory */
  --osso-ombra: #b9966a;   /* the shade on the bones */
  --osso-linea: #6f5336;   /* the outline and the cracks of the bones */
  --velluto: #c63c2b;      /* the velvet rope and the banners */
  --ottone: #d9a441;       /* the brass posts, the plaque and the button */
  --luce: #ffe6a3;         /* the light from the skylight */
  --carta: #fff6e4;        /* the text */
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--muro);
  color: var(--carta);
  font-family: 'Bricolage Grotesque Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

p, h1 { margin: 0; }

/* ---------------------------------------------------------------- the hall */
.sala {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--muro);
  touch-action: pan-y;
  cursor: default;
}

.sala::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0 0 auto 0;
  height: clamp(90px, 22vh, 200px);
  background: linear-gradient(to bottom, rgba(13, 34, 41, .78), rgba(13, 34, 41, 0));
  pointer-events: none;
}

.testata, .testo { text-shadow: 0 2px 14px rgba(8, 24, 30, .45); }

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

/* ---------------------------------------------------------------- the words */
.testata {
  position: absolute;
  z-index: 3;
  top: clamp(12px, 3.2vh, 28px);
  left: clamp(16px, 4.5vw, 56px);
  right: clamp(16px, 4.5vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.marchio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 600;
  font-size: clamp(16px, 2.6vh, 21px);
  letter-spacing: .01em;
}

.marchio svg {
  width: 1.3em;
  height: 1.3em;
  fill: none;
  stroke: var(--ottone);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.sotto {
  font-size: clamp(10px, 1.5vh, 12px);
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .78;
  text-align: right;
}

.testo {
  position: absolute;
  z-index: 3;
  top: clamp(46px, 11vh, 110px);
  left: clamp(16px, 4.5vw, 56px);
  max-width: min(440px, 44vw);
}

.titolo {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 640;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  font-size: clamp(26px, min(5vw, 7.4vh), 64px);
  line-height: .98;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.titolo em {
  font-style: italic;
  font-weight: 420;
  color: var(--luce);
}

.riga {
  margin-top: clamp(8px, 1.6vh, 16px);
  font-size: clamp(12px, 1.9vh, 16px);
  line-height: 1.4;
  opacity: .86;
  max-width: 34ch;
}

.azioni {
  margin-top: clamp(10px, 2.2vh, 22px);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* the site's elastic pill: the words widen on the wdth axis, the fill swells with a bounce */
.pillola {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: clamp(34px, 5.4vh, 46px);
  padding: 0 clamp(16px, 2.4vh, 22px);
  border-radius: 999px;
  color: #2a1d0c;
  font-weight: 650;
  font-size: clamp(13px, 1.9vh, 15px);
  font-variation-settings: 'wdth' 90;
  text-decoration: none;
  isolation: isolate;
  transition: font-variation-settings .45s cubic-bezier(.3, 1.6, .5, 1);
}

.pillola::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--ottone);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 6px 18px rgba(0, 0, 0, .22);
  transition: transform .5s cubic-bezier(.3, 1.8, .5, 1);
}

@media (hover: hover) {
  .pillola:hover { font-variation-settings: 'wdth' 112; }
  .pillola:hover::before { transform: scale(1.06, 1.12); }
  .rifai:hover { background: rgba(255, 246, 228, .16); }
}

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

.rifai {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: clamp(34px, 5.4vh, 46px);
  padding: 0 14px;
  border: 1.5px solid rgba(255, 246, 228, .5);
  border-radius: 999px;
  background: rgba(255, 246, 228, .06);
  color: var(--carta);
  font: inherit;
  font-weight: 600;
  font-size: clamp(12px, 1.8vh, 14px);
  cursor: pointer;
  transition: background .25s;
}

.rifai[hidden] { display: none; }

.rifai svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- the skeleton on its plinth */
.rex {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(4px, 2vh, 24px);
  width: min(96vw, 128vh, 1080px);
  transform: translateX(-38%);
  pointer-events: none;
}

.rex__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.aiuto {
  position: absolute;
  z-index: 3;
  left: clamp(16px, 4.5vw, 56px);
  bottom: clamp(10px, 2.6vh, 26px);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(11px, 1.6vh, 13px);
  letter-spacing: .02em;
  opacity: .9;
  transition: opacity .4s;
}

.aiuto svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--luce);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aiuto__conta {
  font-variant-numeric: tabular-nums;
  color: var(--luce);
  margin-left: 4px;
}

/* ---------------------------------------------------------------- narrow and short screens */
@media (max-width: 720px) {
  .testo { max-width: 92vw; right: 16px; top: calc(clamp(12px, 3.2vh, 28px) + 34px); }
  .titolo { font-size: clamp(22px, min(7.4vw, 6.2vh), 40px); }
  .riga { max-width: 30ch; }
  .rex { width: min(100vw, 104vh); transform: translateX(-50%); bottom: clamp(30px, 6vh, 50px); }
  .aiuto { left: 16px; right: 16px; justify-content: center; }
}

@media (max-height: 520px) {
  .riga { display: none; }
  .sotto { display: none; }
}

@media (max-width: 720px) and (max-height: 520px) {
  .rex { width: min(100vw, 88vh); bottom: 26px; }
  .aiuto span:not(.aiuto__conta) { display: none; }
}
