/* Halvor, the Arc table lamp: a product page on warm white, the Add to cart button that becomes the sticky bar */
:root {
  --carta: #f6f3ed;            /* the page, warm white */
  --inchiostro: #1d1b18;       /* type and the black pill */
  --grigio: #7b766d;           /* small type */
  --filo: rgba(29, 27, 24, .12); /* hairlines */
  --accento: #c46a43;          /* the one accent: the count in the bag and the tick */
  --l1: #c46a43;               /* the lamp colour (Clay), light side */
  --l2: #e09a75;               /* the lamp colour, highlight */
  --l3: #8f4425;               /* the lamp colour, shadow side */
  --bordo: clamp(16px, 4vw, 48px);
  --pillola: clamp(46px, 7.2vh, 58px);
  --mono: clamp(10px, 1.6vh, 12.5px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--carta);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  overflow-x: clip;
}
p, h1, blockquote, ul { margin: 0; padding: 0; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
.mono { font-size: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--grigio); font-weight: 500; }
.solo-lettore { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- header ---- */
.testa {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: clamp(12px, 2.4vh, 22px) var(--bordo);
}
.marchio { font-weight: 650; font-variation-settings: 'wdth' 112; letter-spacing: -.01em; font-size: clamp(15px, 2.4vh, 19px); }
.voci { display: flex; gap: 1.6em; font-size: clamp(12px, 1.7vh, 14px); color: var(--grigio); }
.voci a { transition: color .25s; }
@media (hover: hover) { .voci a:hover { color: var(--inchiostro); } }
.borsa { display: inline-flex; align-items: center; gap: 6px; font-size: clamp(12px, 1.7vh, 14px); font-weight: 600; }
.borsa svg { width: 18px; height: 18px; }
.borsa__finestra { display: inline-block; height: 1.2em; overflow: hidden; line-height: 1.2em; min-width: .7em; }
.borsa__num { display: block; color: var(--accento); }

/* ---- the product ---- */
.prodotto {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: clamp(16px, 4vw, 64px);
  padding: clamp(8px, 3vh, 40px) var(--bordo) clamp(24px, 7vh, 80px);
  min-height: min(100vh, 760px);
}
.scena {
  margin: 0; display: flex; align-items: center; justify-content: center;
  width: 100%; height: min(70vh, 560px, 44vw);
  background: radial-gradient(120% 90% at 60% 80%, #efe7da 0%, #ebe4d8 45%, #e6dfd2 100%);
  border-radius: clamp(14px, 2vw, 24px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 30px 60px -40px rgba(29, 27, 24, .35);
}
.scena__lampada { height: 74%; width: auto; max-width: 86%; overflow: visible; }
.info { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(8px, 1.8vh, 16px); }
.nome { font-weight: 560; font-variation-settings: 'wdth' 104; font-size: clamp(28px, min(5vw, 7vh), 60px); line-height: .98; letter-spacing: -.025em; }
.prezzo { font-size: clamp(16px, 2.6vh, 22px); font-variant-numeric: tabular-nums; }
.colori { display: flex; flex-direction: column; gap: 8px; }
.colore-nome { color: var(--inchiostro); margin-left: .6em; display: inline-block; }
.campioni { display: flex; gap: 10px; }
.campione {
  width: clamp(24px, 3.6vh, 30px); height: clamp(24px, 3.6vh, 30px); border-radius: 50%;
  background: var(--c); position: relative;
  box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .14), inset 0 2px 3px rgba(255, 255, 255, .35);
}
.campione::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid var(--inchiostro); opacity: 0; transform: scale(.8);
  transition: opacity .3s, transform .45s cubic-bezier(.34, 1.56, .64, 1);
}
.campione[aria-checked="true"]::after { opacity: 1; transform: scale(1); }
.nota { font-size: clamp(11px, 1.6vh, 13px); color: var(--grigio); }

/* ---- the pill buttons: an element for GSAP (the button), the child for the CSS (the ground) ---- */
.bottone {
  position: relative; display: inline-grid; place-items: center;
  height: var(--pillola); padding: 0 clamp(22px, 3vw, 34px);
  color: #fbf8f2; font-weight: 600; font-size: clamp(14px, 2vh, 16px);
  border-radius: 999px; isolation: isolate;
}
.bottone--grande { min-width: min(100%, 300px); }
.bottone__fondo {
  position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--inchiostro);
  box-shadow: 0 10px 24px -14px rgba(29, 27, 24, .7), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1), background .3s;
}
@media (hover: hover) { .bottone:hover .bottone__fondo { transform: scale(1.03, 1.06); background: #2b2824; } }
.bottone:active .bottone__fondo { transform: scale(.97); transition-duration: .12s; }
.bottone:focus-visible { outline: 2px solid var(--accento); outline-offset: 4px; }
.bottone__finestra { display: block; height: 1.3em; line-height: 1.3em; overflow: hidden; position: relative; }
.bottone__riga { display: flex; align-items: center; justify-content: center; gap: .4em; white-space: nowrap; }
.bottone__riga--b { position: absolute; inset: 0; visibility: hidden; }
.spunta { width: 1.05em; height: 1.05em; color: #f2b28f; }


/* ---- sections ---- */
.parte { padding: clamp(28px, 7vh, 72px) var(--bordo); border-top: 1px solid var(--filo); margin: 0 var(--bordo); padding-left: 0; padding-right: 0; }
.parte__titolo { margin-bottom: clamp(14px, 3vh, 28px); }
.righe { list-style: none; }
.righe li { display: flex; justify-content: space-between; gap: 1rem; padding: clamp(10px, 1.8vh, 16px) 0; border-bottom: 1px solid var(--filo); font-size: clamp(14px, 2vh, 18px); }
.righe li span:first-child { color: var(--grigio); }
.misure { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.misure div { display: flex; flex-direction: column; gap: 6px; }
.misura { font-size: clamp(24px, min(4.4vw, 6vh), 48px); font-weight: 520; letter-spacing: -.02em; font-variation-settings: 'wdth' 108; }
.voce { padding: clamp(10px, 2vh, 18px) 0; }
.voce p { font-size: clamp(18px, min(2.6vw, 3.6vh), 30px); line-height: 1.2; letter-spacing: -.01em; max-width: 26em; }
.voce footer { margin-top: 8px; }
.piede { padding: clamp(28px, 6vh, 60px) var(--bordo) calc(var(--pillola) + 60px); text-align: center; }

/* ---- the sticky bar ---- */
.barra {
  position: fixed; z-index: 20; left: 50%; bottom: clamp(10px, 2.4vh, 22px);
  width: min(620px, calc(100% - 20px)); height: calc(var(--pillola) + 12px);
  transform: translateX(-50%);
  display: flex; align-items: center; gap: clamp(8px, 1.6vw, 14px);
  padding: 6px 6px 6px 8px; pointer-events: none;
}
.barra.attiva { pointer-events: auto; }
.barra__fondo {
  position: absolute; inset: 0; z-index: -1; border-radius: 999px;
  background: rgba(252, 250, 246, .92);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 18px 40px -22px rgba(29, 27, 24, .45), 0 0 0 1px rgba(29, 27, 24, .07), inset 0 1px 0 #fff;
  transform-origin: 100% 50%; transform: scaleX(0); opacity: 0;
}
.barra__pezzo { opacity: 0; }
.barra__miniatura {
  flex: none; width: var(--pillola); height: var(--pillola); border-radius: 50%;
  background: radial-gradient(circle at 60% 75%, #efe7da, #e3dbcd);
  display: grid; place-items: center; overflow: hidden;
}
.barra__miniatura svg { width: 82%; height: 82%; }
.barra__testi { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.barra__nome { font-weight: 600; font-size: clamp(13px, 1.9vh, 15px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra__prezzo { font-size: clamp(12px, 1.7vh, 14px); color: var(--grigio); }
.barra__campione {
  flex: none; width: clamp(26px, 4vh, 32px); height: clamp(26px, 4vh, 32px); border-radius: 50%; overflow: hidden;
  position: relative; box-shadow: 0 0 0 1px rgba(29, 27, 24, .12), 0 0 0 4px rgba(252, 250, 246, 1), 0 0 0 5px rgba(29, 27, 24, .1);
}
.barra__campione:focus-visible { outline: 2px solid var(--accento); outline-offset: 5px; }
.barra__pila { position: absolute; inset: 0; display: flex; flex-direction: column; }
.barra__pila span { flex: none; width: 100%; height: 100%; background: var(--c); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .14), inset 0 2px 3px rgba(255, 255, 255, .35); }
.bottone--barra { flex: none; visibility: hidden; }

/* the button in flight, between the page and the bar */
.volo {
  position: fixed; z-index: 30; left: 0; top: 0; visibility: hidden;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--inchiostro); color: #fbf8f2; font-weight: 600; font-size: clamp(14px, 2vh, 16px);
  box-shadow: 0 10px 24px -14px rgba(29, 27, 24, .7), inset 0 1px 0 rgba(255, 255, 255, .12);
  white-space: nowrap; overflow: hidden; pointer-events: none;
}

/* ---- phone ---- */
@media (max-width: 700px) {
  .voci { display: none; }
  .prodotto { grid-template-columns: 1fr; gap: 14px; min-height: 0; padding-top: 4px; }
  .scena { height: min(38vh, 62vw); }
  .bottone--grande { width: 100%; }
  .misure { grid-template-columns: repeat(3, 1fr); }
  .barra__prezzo { display: none; }
  .bottone--barra { padding: 0 18px; }
}
@media (max-width: 380px) {
  .barra__campione { display: none; }
}
.spunta { --d: 1; }
