/* The product page of the headphones that silence the noise as you scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #0d0e10;
  --fondo-alto: #1b1d21;
  --inchiostro: #f1f0ec;
  --secondario: #8f9096;
  --linea: rgba(255, 255, 255, 0.1);
  --rumore: #8b8d93;
  --accento: #b9e3c6;
  /* the finish of the shells, written by script.js while it changes */
  --g1: #4b4f56;
  --g2: #1e2125;
  --c1: #2c2f34;
  --c2: #17191c;
  --b1: #2a2d32;
}

* { 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: 360vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 5vw, 76px);
  padding: clamp(10px, 3vh, 40px) clamp(12px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 32% 52%, var(--fondo-alto), transparent 70%),
    var(--fondo);
}
/* a faint grain over the whole stage */
.palco::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scena {
  position: relative;
  flex: 0 0 auto;
  width: min(48vw, 78vh, 580px);
  aspect-ratio: 1;
}
.scena svg { display: block; width: 100%; height: 100%; overflow: hidden; }

.anello line { stroke-linecap: round; stroke-width: 1.1; }
.ombra { fill: rgba(0, 0, 0, 0.7); }
.arco { fill: none; stroke-width: 12; stroke-linecap: round; }
.arco-luce { fill: none; stroke: rgba(255, 255, 255, 0.18); stroke-width: 1.2; stroke-linecap: round; }
.canopia { fill: none; stroke: var(--c1); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 0.6 1.4; opacity: 0.9; }
.tacche { stroke: rgba(0, 0, 0, 0.35); stroke-width: 0.5; }
.cucitura { fill: none; stroke: rgba(255, 255, 255, 0.28); stroke-width: 0.35; stroke-dasharray: 1.3 1.1; }
.piega { stroke: rgba(0, 0, 0, 0.18); stroke-width: 3; stroke-linecap: round; }
.bordo { fill: none; stroke: rgba(255, 255, 255, 0.16); stroke-width: 1; }
.riflesso { fill: none; stroke: #fff; stroke-opacity: 0.4; stroke-width: 1.6; stroke-linecap: round; }
.microfono { stroke: rgba(0, 0, 0, 0.45); stroke-width: 0.8; stroke-linecap: round; }
.corona-righe { stroke: rgba(0, 0, 0, 0.3); stroke-width: 0.4; }
.lucido { opacity: 0; mix-blend-mode: soft-light; }

.info {
  position: relative;
  flex: 0 1 auto;
  width: min(36ch, 40vw);
  display: flex;
  flex-direction: column;
}
.tipo {
  display: flex;
  gap: 10px;
  font-size: clamp(10px, 1.5vh, 12px);
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--secondario);
}
.tipo__marca { color: var(--inchiostro); }
.nome {
  margin-top: clamp(2px, 0.8vh, 8px);
  font-size: clamp(30px, min(8vw, 11vh), 96px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-weight: 300;
  font-stretch: 112%;
  font-variation-settings: 'wght' var(--peso, 300);
}
.fatto {
  margin-top: clamp(4px, 1.2vh, 12px);
  font-size: clamp(12px, 1.9vh, 15px);
  color: var(--secondario);
}

.righe { list-style: none; margin-top: clamp(10px, 3.4vh, 34px); }
.riga {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: clamp(7px, 1.7vh, 14px) 2px;
  outline: none;
  opacity: 0;
}
/* the hairline above every row, drawn by script.js */
.riga::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), var(--linea) 60%, transparent);
  transform-origin: 0 50%;
  transform: scaleX(var(--filo, 0));
}
.riga > svg {
  flex: 0 0 auto;
  width: clamp(16px, 2.6vh, 20px);
  height: clamp(16px, 2.6vh, 20px);
  margin-top: 1px;
  fill: none;
  stroke: var(--secondario);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.35s ease, transform 0.5s cubic-bezier(.34, 1.56, .64, 1);
}
.riga > svg .pieno { fill: var(--secondario); stroke: none; transition: fill 0.35s ease; }
.riga__testo { display: flex; flex-direction: column; gap: 3px; transition: transform 0.5s cubic-bezier(.34, 1.56, .64, 1); }
.riga b { font-weight: 600; font-size: clamp(13px, 2.1vh, 16px); letter-spacing: -0.01em; font-stretch: 100%; transition: font-stretch 0.4s ease; }
.riga b em { display: inline-block; font-style: normal; font-variant-numeric: tabular-nums; color: var(--accento); }
.riga [data-finitura] { min-width: 0; }
.riga__testo > span { font-size: clamp(11px, 1.8vh, 14px); color: var(--secondario); }
.riga.attiva > svg { stroke: var(--accento); }
.riga.attiva > svg .pieno { fill: var(--accento); }
.riga:focus-visible .riga__testo { transform: translateX(3px); }
@media (hover: hover) {
  .riga:hover > svg { stroke: var(--accento); transform: translateY(-1px) rotate(-4deg); }
  .riga:hover .riga__testo { transform: translateX(3px); }
  .riga:hover b { font-stretch: 108%; }
}

/* the three finishes */
.campioni { position: relative; display: flex; gap: 8px; margin-top: 4px; }
.campione {
  position: relative;
  width: clamp(14px, 2.4vh, 18px);
  height: clamp(14px, 2.4vh, 18px);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 2px rgba(0, 0, 0, 0.35), 0 2px 5px rgba(0, 0, 0, 0.5);
  transition: transform 0.45s cubic-bezier(.34, 1.56, .64, 1);
}
.campione[data-campione="0"] { background: linear-gradient(135deg, #5a5f67, #1e2125); }
.campione[data-campione="1"] { background: linear-gradient(135deg, #c2cfba, #6f806b); }
.campione[data-campione="2"] { background: linear-gradient(135deg, #f0e6d7, #b5a387); }
.campione:active { transform: scale(0.88); }
@media (hover: hover) { .campione:hover { transform: translateY(-1px) scale(1.08); } }
.campioni__anello {
  position: absolute;
  left: 0; top: 0;
  width: clamp(14px, 2.4vh, 18px);
  height: clamp(14px, 2.4vh, 18px);
  margin: -3px 0 0 -3px;
  box-sizing: content-box;
  border: 1px solid var(--accento);
  padding: 2px;
  border-radius: 50%;
  pointer-events: none;
}

.compra {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(10px, 3vh, 30px);
  opacity: 0;
}
.prezzo { display: flex; flex-direction: column; font-size: clamp(15px, 2.4vh, 19px); font-weight: 560; font-variant-numeric: tabular-nums; }
.prezzo small { font-size: clamp(10px, 1.5vh, 12px); font-weight: 450; color: var(--secondario); }
.pillola {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: clamp(32px, 5.4vh, 42px);
  padding: 0 clamp(14px, 2.4vh, 20px);
  border: 0;
  background: none;
  color: #101113;
  font: inherit;
  font-size: clamp(12px, 1.9vh, 14px);
  font-weight: 600;
  font-stretch: 100%;
  cursor: pointer;
  transition: font-stretch 0.45s cubic-bezier(.34, 1.56, .64, 1);
}
.pillola__fondo {
  position: absolute; inset: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #dcdcd8);
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 26px -12px rgba(185, 227, 198, 0.55);
  transition: transform 0.55s cubic-bezier(.34, 1.56, .64, 1);
}
.pillola__testo, .pillola__spunta { position: relative; }
.pillola__spunta { width: 0; height: 14px; fill: none; stroke: #2f6b45; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; overflow: visible; transition: width 0.4s cubic-bezier(.34, 1.56, .64, 1); }
.pillola.fatta .pillola__spunta { width: 14px; }
.pillola:active .pillola__fondo { transform: scale(0.96); }
@media (hover: hover) {
  .pillola:hover { font-stretch: 112%; }
  .pillola:hover .pillola__fondo { transform: scale(1.04, 1.08); }
}

.fine {
  padding: 28px 20px 36px;
  text-align: center;
  font-size: 12px;
  color: var(--secondario);
}

/* tall and narrow: the headphones on top, the words under them */
@media (max-aspect-ratio: 1/1) {
  .palco { flex-direction: column; gap: clamp(4px, 1.4vh, 20px); background: radial-gradient(80% 50% at 50% 28%, var(--fondo-alto), transparent 70%), var(--fondo); }
  .scena { width: min(84vw, 44vh, 520px); }
  .info { width: min(92vw, 420px); }
  .nome { font-size: clamp(26px, min(9vw, 6.4vh), 64px); }
  .righe { margin-top: clamp(6px, 1.6vh, 20px); }
  .riga { padding: clamp(5px, 1.1vh, 12px) 2px; }
  .compra { margin-top: clamp(6px, 1.6vh, 20px); }
}
@media (max-aspect-ratio: 1/1) and (max-height: 520px) {
  .fatto { display: none; }
  .riga__testo > span:not(.campioni) { display: none; }
  .tipo { display: none; }
}
