:root {
  --carta: #f5eee9;          /* the rosy paper of the panel */
  --bianco: #fbf8f6;         /* the warm white of the type over the photo */
  --verde: #373f1d;          /* the dark green of the type on the paper */
  --oliva: #5c6e21;          /* the only accent: olive, for the trail and the «Opening 2027» tag */
  --salvia: #a5a593;         /* the sage of the small labels */
  --beige: #e3e1d4;          /* the hairlines on the paper */
  --notte: #14170c;          /* the colour the page goes towards behind the panel */
  --ombra: 0 40px 90px -30px rgba(20, 23, 12, .55), 0 14px 34px -16px rgba(20, 23, 12, .35); /* the panel's soft shadow */
}

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

html, body { height: 100%; }

body {
  background: var(--notte);
  color: var(--bianco);
  font-family: 'Inter Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.solo-lettore {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

.palco {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  --margine: clamp(8px, 1.1vw, 14px);
  --lato: clamp(18px, 3vw, 40px);
  --alto-bottone: clamp(46px, min(7vw, 10vh), 70px);
}

.piccolo, .occhiello, .apri, .chiedi, .lodge__titolo, .scheda__nota, .secondarie a {
  font-size: clamp(10px, min(1vw, 1.7vh), 12.5px);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 450;
}

/* ---- the page behind ---- */
.pagina { position: absolute; inset: 0; }

.eroe { position: absolute; inset: 0; overflow: hidden; }
.eroe__foto {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
  display: block;
  will-change: transform;
}
.eroe__velo {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(20, 23, 12, .42), rgba(20, 23, 12, 0) 26%),
    linear-gradient(to top, rgba(20, 23, 12, .62), rgba(20, 23, 12, 0) 58%);
}

.eroe__testo {
  position: absolute;
  left: var(--lato); right: var(--lato);
  bottom: clamp(18px, 6vh, 64px);
}
.occhiello { opacity: .82; margin-bottom: clamp(8px, 1.6vh, 18px); }
.titolo {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 220;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(30px, min(8.2vw, 13vh), 132px);
  line-height: .96;
  letter-spacing: -.025em;
}
.sotto {
  margin-top: clamp(10px, 2vh, 22px);
  font-size: clamp(11.5px, min(1.2vw, 2vh), 15px);
  line-height: 1.45;
  max-width: 34ch;
  opacity: .86;
}

.testa {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--alto-bottone);
  margin-top: var(--margine);
  padding: 0 var(--lato);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.marchio {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: .55em;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 300;
  font-size: clamp(14px, min(1.6vw, 2.6vh), 20px);
  letter-spacing: .01em;
  white-space: nowrap;
}
.marchio__segno { width: 1.7em; height: .85em; }
.chiedi { display: inline-flex; align-items: center; gap: .6em; }
.chiedi svg { width: 1.2em; height: 1.2em; transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
@media (hover: hover) { .chiedi:hover svg { transform: translateX(3px); } }

/* ---- the backdrop that darkens the page ---- */
.velo {
  position: absolute; inset: 0;
  background: rgba(20, 23, 12, .58);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}
.is-aperto .velo { pointer-events: auto; cursor: pointer; }

/* ---- the panel: GSAP writes width and height, the inside keeps its size and is only uncovered ---- */
.pannello {
  position: absolute;
  top: var(--margine); left: var(--margine);
  width: 0; height: 0;
  overflow: hidden;
  background: var(--carta);
  color: var(--verde);
  border-radius: 3px;
  box-shadow: var(--ombra);
  z-index: 6;
  visibility: hidden;
}
.pannello__dentro {
  position: absolute; top: 0; left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(150px, 17vw, 236px);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "principali lodge" "piede lodge";
  column-gap: clamp(20px, 3vw, 44px);
  padding: calc(var(--alto-bottone) + clamp(8px, 3vh, 34px)) var(--lato) var(--lato);
}

.principali {
  grid-area: principali;
  display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-start;
  min-height: 0;
}
.voce {
  --w: 280;
  position: relative;
  display: inline-flex; align-items: center; gap: .3em;
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: var(--w);
  font-variation-settings: 'opsz' 96;
  font-size: clamp(26px, min(5vw, 7.4vh), 68px);
  line-height: 1.12;
  letter-spacing: -.02em;
  white-space: nowrap;
  will-change: transform, filter;
}
.voce__testo { display: inline-block; }
.voce__orma {
  width: .82em; height: .22em;
  color: var(--oliva);
  overflow: visible;
}
.voce__orma path { stroke-dasharray: 1 2; stroke-dashoffset: 1; stroke-linecap: butt; }
.voce:focus-visible { outline: 1px solid var(--oliva); outline-offset: 4px; }

.piede { grid-area: piede; padding-top: clamp(10px, 2.4vh, 26px); }
.piede__riga { display: block; height: 1px; background: var(--beige); transform-origin: 0 50%; margin-bottom: clamp(10px, 1.8vh, 18px); }
.secondarie { display: flex; flex-wrap: wrap; gap: .4em clamp(14px, 2vw, 28px); }
.maschera { display: block; overflow: hidden; padding-bottom: 1px; }
.secondarie a { display: block; color: var(--verde); opacity: .72; transition: opacity .3s; }
@media (hover: hover) { .secondarie a:hover { opacity: 1; } }
.secondarie a:focus-visible { outline: 1px solid var(--oliva); outline-offset: 2px; opacity: 1; }

.lodge {
  grid-area: lodge;
  display: flex; flex-direction: column;
  gap: clamp(10px, 1.8vh, 18px);
  min-height: 0;
}
.lodge__titolo { color: var(--salvia); }
.scheda {
  flex: 1 1 0;
  min-height: 0;
  display: flex; flex-direction: column; gap: .55em;
  will-change: filter, opacity;
}
.scheda__foto {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--beige);
  box-shadow: 0 10px 24px -16px rgba(20, 23, 12, .5);
}
.scheda__foto img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}
.scheda__riga { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; }
.scheda__nome {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 340;
  font-size: clamp(13px, min(1.3vw, 2.2vh), 17px);
  white-space: nowrap;
}
.scheda__nota { color: var(--salvia); font-size: clamp(8.5px, min(.8vw, 1.4vh), 10.5px); white-space: nowrap; }
.scheda__nota--presto {
  color: var(--oliva);
  border: 1px solid currentColor;
  border-radius: 99px;
  padding: .25em .7em .2em;
}
.scheda:focus-visible { outline: 1px solid var(--oliva); outline-offset: 3px; }
.scheda:active .scheda__foto { transform: scale(.985); transition: transform .15s; }

/* ---- the Menu / Close button, above the panel ---- */
.apri {
  position: absolute;
  top: var(--margine);
  left: calc(var(--margine) + var(--lato) - 6px);
  height: var(--alto-bottone);
  padding: 0 6px;
  display: inline-flex; align-items: center; gap: .7em;
  background: none; border: 0;
  color: var(--bianco);
  font-family: inherit;
  cursor: pointer;
  z-index: 7;
  transition: color .35s ease;
  -webkit-tap-highlight-color: transparent;
}
.apri.is-scuro { color: var(--verde); }
.apri:focus-visible { outline: 1px solid currentColor; outline-offset: -8px; border-radius: 2px; }
.apri__segno { width: 1.9em; height: 1.9em; overflow: visible; }
.apri__parole { display: inline-grid; overflow: hidden; line-height: 1.25; padding: 0 1px; }
.apri__parola { grid-area: 1 / 1; display: block; white-space: nowrap; }
.lettera { display: inline-block; will-change: transform; }
.apri:active .apri__segno { transform: scale(.9); transition: transform .12s; }

/* ---- phone: the panel covers the whole box and the lodges become a row ---- */
@media (max-width: 699px) {
  .marchio__nome { display: none; }
  .marchio__segno { width: 2.2em; height: 1.1em; }
  .pannello__dentro {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas: "principali" "piede" "lodge";
    padding-top: calc(var(--alto-bottone) + 2px);
    padding-bottom: 16px;
  }
  .voce { font-size: clamp(22px, min(8.4vw, 6.6vh), 40px); line-height: 1.1; }
  .piede { padding-top: clamp(8px, 1.6vh, 14px); }
  .lodge { flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 10px; padding-top: clamp(12px, 2.6vh, 22px); }
  .lodge__titolo { flex: 0 0 100%; }
  .scheda { flex: 1 1 0; min-width: 0; }
  .scheda__foto { flex: none; aspect-ratio: 4 / 3; max-height: 22vh; }
  .scheda__riga { flex-direction: column; align-items: flex-start; gap: .25em; }
  .scheda__nome { font-size: clamp(11px, 3.4vw, 14px); }
  .scheda__nota { font-size: 8.5px; letter-spacing: .08em; }
  .scheda__nota--presto { padding: .15em .5em .1em; }
}
@media (max-width: 699px) and (max-height: 470px) {
  .lodge__titolo { display: none; }
}
