/* The full-screen card zoom on scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #fffdfd;
  --inchiostro: #232323;
  --secondario: #6f6c69;
  --linea: rgba(35, 35, 35, 0.12);
  --accento: #bf5114;
  --mare: #10343c;
  --bianco: #ffffff;
}

* { 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: 340vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  overflow: hidden;
  --margine: clamp(16px, 4vw, 56px);
}

/* ---- the top line ---- */
.testa {
  position: absolute;
  top: clamp(14px, 3.2vh, 32px);
  left: var(--margine);
  right: var(--margine);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 3;
}
.marca {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-stretch: 112%;
  font-size: clamp(13px, 1.15vw, 16px);
  letter-spacing: -0.01em;
}
.marca svg { width: 1.35em; height: 1.35em; color: var(--accento); }
.etichetta {
  font-family: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(9.5px, 0.8vw, 11.5px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondario);
}

/* ---- the title ---- */
.titolo-blocco {
  position: absolute;
  left: var(--margine);
  right: var(--margine);
  top: clamp(46px, 13vh, 132px);
  z-index: 1;
  transform-origin: 0 0;
}
.titolo {
  font-weight: 500;
  font-stretch: 88%;
  font-size: min(10.5vw, 15vh, 168px);
  line-height: 0.86;
  letter-spacing: -0.045em;
}
.riga { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.riga__in { display: inline-block; transform-origin: 0 100%; }
.riga:last-child .riga__in { color: var(--inchiostro); }
.sotto {
  margin-top: clamp(10px, 2.2vh, 22px);
  max-width: 30ch;
  font-size: clamp(12.5px, min(1.2vw, 2vh), 17px);
  line-height: 1.4;
  color: var(--secondario);
}

/* ---- the card that becomes the whole screen ---- */
.fondo {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--mare);
  will-change: clip-path;
}
.media {
  position: absolute;
  inset: 0;
  will-change: transform;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 24% 50%;
  display: block;
}
.velo {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 24, 28, 0.62), rgba(8, 24, 28, 0) 46%), linear-gradient(to bottom, rgba(8, 24, 28, 0.28), rgba(8, 24, 28, 0) 22%);
}
.grana {
  position: absolute;
  inset: -50%;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
}

/* the hairline around the card, it goes with the corners */
.bordo {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: 0 1px 0 rgba(35, 35, 35, 0.05), 0 18px 40px -18px rgba(16, 52, 60, 0.55);
  pointer-events: none;
}

/* the labels that ride on the card */
.tessera {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  color: var(--bianco);
  pointer-events: none;
}
.tempo, .guarda {
  position: absolute;
  font-family: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(9px, 0.78vw, 11px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tempo { top: 10px; right: 12px; font-variant-numeric: tabular-nums; opacity: 0.85; }
.guarda {
  left: 12px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.guarda svg { width: 11px; height: 11px; color: #ffb685; }

/* ---- the spec lines over the sea ---- */
.dati {
  position: absolute;
  z-index: 4;
  left: var(--margine);
  right: var(--margine);
  bottom: clamp(18px, 6vh, 56px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 2.5vw, 40px);
  color: var(--bianco);
  pointer-events: none;
}
.dato {
  border-top: 1px solid rgba(255, 255, 255, 0.38);
  padding-top: clamp(6px, 1.2vh, 12px);
  overflow: hidden;
}
.dato dt, .dato dd { display: block; overflow: hidden; }
.dato dt span, .dato dd span { display: inline-block; }
.dato dt {
  font-family: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, monospace;
  font-size: clamp(8.5px, 0.78vw, 11px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.72;
}
.dato dd {
  margin-top: 4px;
  font-weight: 500;
  font-stretch: 92%;
  font-size: clamp(17px, min(2.8vw, 5vh), 40px);
  letter-spacing: -0.03em;
}

/* with reduced motion: the open sea fades in over the closed card, nothing moves */
.pieno {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  opacity: 0;
  background: var(--mare);
}
.pieno img { width: 100%; height: 100%; object-fit: cover; object-position: 24% 50%; display: block; }
.ridotto .pieno { display: block; }

.fine {
  padding: 28px var(--margine, 24px) 40px;
  font-size: 12px;
  color: var(--secondario);
  text-align: center;
}

/* when the sea reaches the top line, the brand turns white */
.testa, .marca svg, .etichetta { transition: color 0.45s ease; }
.sul-mare .testa, .sul-mare .etichetta { color: var(--bianco); }
.sul-mare .marca svg { color: #ffb685; }
