/* The holiday house arrival guide with the steps that open on scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #f3f1ec;
  --carta: #fffefb;
  --inchiostro: #181a19;
  --spento: #bdb9b0;
  --secondario: #75736d;
  --bordo: rgba(24, 26, 25, 0.09);
  --traccia: rgba(24, 26, 25, 0.1);
  --mare: #2f5d57;
  --mare-chiaro: #e6efec;
  --mare-tenue: rgba(47, 93, 87, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--fondo); }
body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.corsa { position: relative; height: 320vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.8vh, 18px);
  padding: clamp(8px, 2.6vh, 36px) clamp(10px, 4vw, 72px);
  overflow: hidden;
  text-align: center;
}

.occhiello {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 9px;
  border: 1px solid var(--bordo);
  border-radius: 999px;
  background: var(--carta);
  color: var(--secondario);
  font-size: clamp(9.5px, min(1.2vw, 2vh), 13px);
  font-weight: 520;
  box-shadow: 0 1px 2px rgba(24, 26, 25, 0.05);
  white-space: nowrap;
}
.occhiello svg { width: 1.2em; height: 1.2em; fill: none; stroke: var(--mare); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.occhiello__sep { color: var(--spento); }

.titolo {
  font-size: clamp(18px, min(4.2vw, 5.2vh), 52px);
  line-height: 1.04;
  font-weight: 640;
  font-stretch: 90%;
  letter-spacing: -0.025em;
}
.titolo__due { display: inline-block; color: var(--spento); font-variation-settings: 'wdth' var(--w, 80), 'wght' var(--g, 520); }

/* the guide card: a figure for GSAP, its look in CSS */
.guida {
  --tappa: clamp(26px, 5.6vh, 44px);
  width: min(660px, 100%, 82vh);
  background: var(--carta);
  border: 1px solid var(--bordo);
  border-radius: clamp(12px, 2vh, 18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 20px 44px -24px rgba(24, 26, 25, 0.38), 0 2px 6px rgba(24, 26, 25, 0.05);
  padding: clamp(8px, 1.8vh, 18px) clamp(10px, 2.4vh, 22px) clamp(8px, 1.8vh, 16px);
  text-align: left;
}
.guida__testa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: clamp(5px, 1.2vh, 11px);
  border-bottom: 1px solid var(--bordo);
  font-size: clamp(9.5px, min(1.2vw, 1.9vh), 13px);
  color: var(--secondario);
}
.guida__nome { color: var(--inchiostro); font-weight: 620; letter-spacing: 0.01em; }
.guida__stato { display: inline-block; overflow: hidden; height: 1.3em; line-height: 1.3em; white-space: nowrap; }
.guida__stato-in { display: inline-block; }

.passi { list-style: none; }
.passo {
  position: relative;
  display: grid;
  grid-template-columns: var(--tappa) 1fr auto;
  align-items: center;
  column-gap: clamp(8px, 1.6vh, 14px);
  padding: clamp(5px, 1.15vh, 10px) 0;
}
.passo::before {
  /* the soft light under the step being opened (opacity set by GSAP through --luce) */
  content: '';
  position: absolute;
  inset: 2px -8px;
  border-radius: 10px;
  background: var(--mare-tenue);
  opacity: var(--luce, 0);
  pointer-events: none;
}

/* the line from one stop to the next: the track in CSS, the fill moved by GSAP */
.tratto {
  position: absolute;
  left: calc(var(--tappa) / 2 - 1px);
  top: calc(clamp(5px, 1.15vh, 10px) + var(--tappa) + 3px);
  bottom: calc(-1 * clamp(5px, 1.15vh, 10px) + 3px);
  width: 2px;
  border-radius: 2px;
  background: var(--traccia);
  overflow: hidden;
}
.tratto__pieno { position: absolute; inset: 0; background: var(--mare); transform-origin: 50% 0; transform: scaleY(0); }

.tappa {
  position: relative;
  display: grid;
  place-items: center;
  width: var(--tappa);
  height: var(--tappa);
  border-radius: 50%;
  border: 1.5px solid var(--traccia);
  background: var(--carta);
  color: var(--spento);
}
.tappa svg { width: 54%; height: 54%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; grid-area: 1 / 1; }
.tappa__wifi circle { fill: currentColor; stroke: none; }
.tappa__spunta { opacity: 0; }
.tappa__spunta path { stroke-width: 1.8; stroke-dasharray: 16; stroke-dashoffset: 16; }

.passo__testo { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.passo__nome {
  display: inline-block;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  font-size: clamp(12.5px, min(2.1vw, 3vh), 23px);
  line-height: 1.15;
  white-space: nowrap;
}
.passo__in { display: inline-block; color: var(--spento); font-variation-settings: 'wdth' var(--w, 92), 'wght' var(--g, 420); letter-spacing: -0.01em; }
.passo__nota {
  font-size: clamp(9px, min(1.25vw, 1.8vh), 14px);
  color: var(--secondario);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* the chip with the code: a label and the value */
.gettone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(3px, 0.7vh, 6px) clamp(6px, 1vh, 10px);
  border-radius: 9px;
  background: #f4f3ef;
  border: 1px solid var(--bordo);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  white-space: nowrap;
  transition: border-color 0.25s, background-color 0.25s;
}
.gettone__etichetta { font-size: clamp(8px, min(0.95vw, 1.45vh), 10.5px); color: var(--secondario); letter-spacing: 0.04em; }
.gettone__valore, .cifre, .parola { font-size: clamp(12px, min(2vw, 2.9vh), 20px); font-weight: 640; color: var(--inchiostro); letter-spacing: 0.02em; }
.gettone--chiaro .gettone__valore { color: var(--mare); }

/* each digit is a strip of 0 to 9 twice, rolled by GSAP inside a one-line window */
.cifre { display: inline-flex; gap: 0.08em; }
.cifra { display: inline-block; height: 1.15em; line-height: 1.15em; overflow: hidden; width: 0.62em; text-align: center; }
.cifra__nastro { display: block; }
.cifra__nastro span { display: block; height: 1.15em; }
.cifra__nastro .cifra__vuota { color: var(--spento); }

/* the Wi-Fi key: a dot under every letter until the letter shows */
.parola { display: inline-flex; }
.lettera { position: relative; display: inline-block; min-width: 0.5em; text-align: center; }
.lettera__punto { position: absolute; left: 0; right: 0; top: 0; color: var(--spento); }
.lettera__vera { opacity: 0; }

@media (hover: hover) {
  .gettone:hover { border-color: rgba(47, 93, 87, 0.35); background: var(--mare-chiaro); }
  .passo:hover .passo__nota { color: var(--inchiostro); }
}

.guida__piede {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(4px, 0.8vh, 8px);
  padding-top: clamp(7px, 1.5vh, 13px);
  border-top: 1px solid var(--bordo);
}
.dentro { font-size: clamp(9.5px, min(1.15vw, 1.75vh), 13px); color: var(--secondario); }
.scrivi {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: clamp(6px, 1.2vh, 10px) clamp(11px, 1.7vh, 16px);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-size: clamp(10.5px, min(1.3vw, 1.95vh), 13.5px);
  font-weight: 600;
  white-space: nowrap;
  isolation: isolate;
}
.scrivi__fondo {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--inchiostro);
  box-shadow: 0 8px 18px -10px rgba(24, 26, 25, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  z-index: -1;
  transition: background-color 0.25s;
}
.scrivi svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
@media (hover: hover) { .scrivi:hover .scrivi__fondo { background: var(--mare); } }

.piede {
  padding: 28px 16px 40px;
  text-align: center;
  font-size: 12px;
  color: var(--secondario);
}

@media (max-width: 480px) {
  .dentro { display: none; }
  .guida__piede { justify-content: center; }
  .passo__nota { max-width: 44vw; }
}
