/* The product page of the lamp that switches on as you scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #f4f1ec;
  --fondo-sera: #e7e1d8;
  --inchiostro: #1d1b18;
  --secondario: #7b746b;
  --spento: #b9b1a6;
  --linea: rgba(29, 27, 24, 0.12);
  --accento: #c9772a;
  --luce: #ffe6bd;
}

* { 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;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 5vw, 72px);
  padding: clamp(10px, 3vh, 40px) clamp(12px, 5vw, 64px);
  overflow: hidden;
  background: var(--fondo-ora, var(--fondo));
}
/* the warm glow on the wall around the shade, placed by script.js */
.alone {
  position: absolute;
  left: 0; top: 0;
  width: var(--alone, 400px);
  height: var(--alone, 400px);
  margin: calc(var(--alone, 400px) / -2) 0 0 calc(var(--alone, 400px) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--luce) 70%, transparent), color-mix(in srgb, var(--luce) 22%, transparent) 45%, transparent);
  opacity: 0;
  pointer-events: none;
}

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

.telaio { fill: #faf8f4; stroke: #d6cec2; stroke-width: 1.2; }
.sera { fill: #6f6a74; opacity: 0; }
.montante { stroke: #e2dbd0; stroke-width: 2.4; fill: none; }
.orlo { fill: #d9cfc1; stroke: #c8bcac; stroke-width: 0.6; }
.ombra-orlo { fill: rgba(60, 45, 30, 0.08); }
.cordino { stroke: #b7ab9b; stroke-width: 0.9; fill: none; }
.perlina { fill: #cfc2b0; stroke: #b3a592; stroke-width: 0.5; }
.davanzale { fill: #ebe5dc; stroke: #d6cec2; stroke-width: 0.8; }
.ombra-giorno { fill: #3b2f22; opacity: 0.07; }
.cono { opacity: 0; }
.pozza { mix-blend-mode: screen; }
.venature path { fill: none; stroke: #a98b66; stroke-width: 0.7; opacity: 0.8; }
.venature { opacity: 0; }
.filo { opacity: 0; }
.ombra-piano { fill: rgba(60, 45, 30, 0.06); }
.contatto { fill: rgba(40, 30, 20, 0.16); }
.base-cima { fill: #d9bd86; opacity: 0.55; }
.cavo-ombra { display: none; }
.collare { cursor: pointer; }
.paralume { stroke: rgba(120, 105, 85, 0.25); stroke-width: 0.6; }
.paralume-luce { opacity: 0; }
.riflesso { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; opacity: 0.85; }
.labbro { fill: #d1cbc1; }
.lampadina { fill: #fff8ea; opacity: 0; }
.lampada [data-testa] { cursor: pointer; }

.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: 340;
  font-stretch: 112%;
  font-variation-settings: 'wght' var(--peso, 340);
}
.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: var(--linea);
  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__testo { display: flex; flex-direction: column; gap: 2px; 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; min-width: 3.6ch; font-style: normal; color: var(--accento); }
.riga__testo span { font-size: clamp(11px, 1.8vh, 14px); color: var(--secondario); }
.riga.attiva svg { stroke: 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%; }
}

.compra {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: clamp(10px, 3vh, 30px);
  opacity: 0;
}
.prezzo { font-size: clamp(15px, 2.4vh, 19px); font-weight: 560; }
.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: #fffaf2;
  font: inherit;
  font-size: clamp(12px, 1.9vh, 14px);
  font-weight: 560;
  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, #2a2621, #171512);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 1px 2px rgba(0, 0, 0, 0.25), 0 10px 22px -12px rgba(201, 119, 42, 0.65);
  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: var(--luce); 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 lamp on top, the words under it */
@media (max-aspect-ratio: 1/1) {
  .palco { flex-direction: column; gap: clamp(6px, 1.6vh, 20px); }
  .scena { width: min(84vw, 46vh, 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 { display: none; }
}
