/* Booster Labs — pagina "în curând"
   Palette (solo questi quattro colori):
   inchiostro #14201A · carta #F1EDE2 · lime #C8F03C (accento) · metallo #8E9893 (linee) */

@font-face {
  font-family: "Big Shoulders";
  src: url("fonts/BigShoulders-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/DMMono-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #14201A;
  --paper: #F1EDE2;
  --lime: #C8F03C;
  --metal: #8E9893;
  --display: "Big Shoulders", Impact, "Arial Narrow", sans-serif;
  --mono: "DM Mono", ui-monospace, Consolas, "Courier New", monospace;
  --pop: cubic-bezier(.18, 1.25, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  overflow-x: clip;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nw { white-space: nowrap; }

.page {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem) 1.75rem;
}

/* =====================================================================
   Scena: il sigillo al centro, bustine e carte intorno
   ===================================================================== */
.stage {
  position: relative;
  container-type: size;
  height: clamp(24rem, 70svh, 40rem);
  display: grid;
  place-items: center;
}

.brand { position: relative; z-index: 2; width: min(88cqw, 35rem); }

.seal {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.seal:focus-visible { outline: 2px solid var(--ink); outline-offset: 10px; }
.logo { display: block; width: 100%; height: auto; overflow: visible; }

.lot {
  position: absolute;
  top: 100%;
  left: -1rem;
  right: -1rem;
  margin: .8rem 0 0;
  text-align: center;
  font-size: .6875rem;
  line-height: 1.6;
  letter-spacing: .28em;
  text-transform: uppercase;
}

/* --- il sigillo che si strappa --------------------------------------- */
.logo .half, .logo .inside { opacity: 0; }
.logo .half, .logo .inside { transform-box: view-box; transform-origin: 24px 96px; }

.stage.play .seal      { animation: wiggle .5s .35s; }
.stage.play .whole     { animation: gone 1.7s .9s; }
.stage.play .inside    { animation: beam 1.7s .9s; }
.stage.play .half-top  { animation: open-top 1.7s .9s; }
.stage.play .half-bot  { animation: open-bot 1.7s .9s; }

@keyframes wiggle {
  0%, 100% { rotate: 0deg; }
  20% { rotate: -1.6deg; }
  40% { rotate: 1.4deg; }
  60% { rotate: -1.1deg; }
  80% { rotate: .7deg; }
}
@keyframes gone { from, to { opacity: 0; } }
/* il cuneo lime: la luce che esce dalla bustina */
@keyframes beam {
  0%   { opacity: 1; transform: scaleY(0); }
  15%  { transform: scaleY(1.25); }
  24%  { transform: scaleY(1); }
  66%  { transform: scaleY(1); }
  84%  { transform: scaleY(0); }
  100% { opacity: 1; transform: scaleY(0); }
}
@keyframes open-top {
  0%   { opacity: 1; transform: rotate(0deg); }
  15%  { transform: rotate(-7.5deg); }
  24%  { transform: rotate(-6deg); }
  66%  { transform: rotate(-6deg); }
  86%  { transform: rotate(.7deg); }
  100% { opacity: 1; transform: rotate(0deg); }
}
@keyframes open-bot {
  0%   { opacity: 1; transform: rotate(0deg); }
  15%  { transform: rotate(7.5deg); }
  24%  { transform: rotate(6deg); }
  66%  { transform: rotate(6deg); }
  86%  { transform: rotate(-.7deg); }
  100% { opacity: 1; transform: rotate(0deg); }
}

/* --- bustine e carte -------------------------------------------------- */
.items { position: absolute; inset: 0; pointer-events: none; }
.item {
  --w: clamp(3.4rem, min(11cqw, 18cqh), 6.75rem);
  pointer-events: auto;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: var(--w);
  margin: calc(var(--w) * -.75) 0 0 calc(var(--w) * -.5);
  translate: calc(var(--x) * 1cqw) calc(var(--y) * 1cqh);
  rotate: var(--r);
  scale: var(--s);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.par {
  display: block;
  transform: translate3d(calc(var(--px, 0) * var(--depth, 10) * 1px), calc(var(--py, 0) * var(--depth, 10) * 1px), 0);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.item svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  animation: bob var(--t, 6s) ease-in-out var(--o, 0s) infinite alternate;
}
@keyframes bob {
  from { transform: translateY(-6px) rotate(-2.2deg); }
  to   { transform: translateY(7px) rotate(2.6deg); }
}

/*        posizione (x,y in % della scena)  rotazione   grandezza   profondità  ritmo */
.i1  { --x: -37; --y: -23; --r: -14deg; --s: 1.15; --depth: 20; --t: 6.5s; --o: -1s;   --i: 0; z-index: 3; }
.i2  { --x: -21; --y: -35; --r: 9deg;   --s: .8;   --depth: 9;  --t: 5.4s; --o: -3s;   --i: 3; }
.i3  { --x: -3;  --y: -37; --r: -6deg;  --s: .86;  --depth: 13; --t: 7.2s; --o: -2s;   --i: 6; }
.i4  { --x: 15;  --y: -34; --r: 8deg;   --s: .8;   --depth: 8;  --t: 6.1s; --o: -4s;   --i: 1; }
.i5  { --x: 33;  --y: -27; --r: 16deg;  --s: .92;  --depth: 16; --t: 5.8s; --o: -.5s;  --i: 8; }
.i6  { --x: 43;  --y: 3;   --r: -10deg; --s: .8;   --depth: 11; --t: 6.8s; --o: -2.5s; --i: 4; }
.i7  { --x: 34;  --y: 31;  --r: 12deg;  --s: 1.08; --depth: 22; --t: 6.2s; --o: -3.5s; --i: 2; z-index: 3; }
.i8  { --x: 14;  --y: 37;  --r: -8deg;  --s: .82;  --depth: 10; --t: 5.6s; --o: -1.5s; --i: 9; }
.i9  { --x: -10; --y: 36;  --r: 6deg;   --s: .9;   --depth: 14; --t: 7s;   --o: -4.5s; --i: 5; }
.i10 { --x: -29; --y: 32;  --r: -12deg; --s: .78;  --depth: 8;  --t: 5.2s; --o: -2.2s; --i: 10; }
.i11 { --x: -44; --y: 6;   --r: 11deg;  --s: .8;   --depth: 12; --t: 6.4s; --o: -3.2s; --i: 7; }

/* con lo script attivo: nascosti finché il sigillo non si apre */
.js .item { opacity: 0; }
.js .stage.play .item {
  animation: burst .95s var(--pop) both;
  animation-delay: calc(1s + var(--i) * 55ms);
}
@keyframes burst {
  0%   { translate: 9cqw 0; rotate: calc(var(--r) - 220deg); scale: .1; opacity: 0; }
  10%  { opacity: 1; }
  100% { translate: calc(var(--x) * 1cqw) calc(var(--y) * 1cqh); rotate: var(--r); scale: var(--s); opacity: 1; }
}

/* coriandoli: i dentini della saldatura che saltano via */
.bit {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 12px;
  height: 11px;
  margin: -6px;
  background: var(--ink);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.bit.b1 { background: var(--lime); }
.bit.b2 { background: var(--metal); }

/* =====================================================================
   Testi
   ===================================================================== */
main { text-align: center; }

.hint {
  display: none;
  margin: 1rem 0 clamp(1.25rem, 4vw, 2.25rem);
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.js .hint { display: block; }

h1, h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}
h1 { font-size: clamp(3.4rem, 14.5vw, 8rem); line-height: 1.08; }
.hl {
  display: inline-block;
  padding: 0 .16em;
  background: var(--lime);
  rotate: -2deg;
}

.lead {
  max-width: 40rem;
  margin: clamp(1.75rem, 5vw, 2.75rem) auto 0;
  font-size: clamp(1rem, 2.3vw, 1.125rem);
}

.trio {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 3vw, 2.25rem);
  max-width: 56rem;
  margin: clamp(2.5rem, 7vw, 4rem) auto 0;
  padding: 0;
}
.trio li {
  padding: 1.6rem 1.1rem 1.4rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
  rotate: -1.4deg;
  transition: rotate .25s var(--pop), translate .25s var(--pop), box-shadow .25s var(--pop);
}
.trio li:nth-child(2) { rotate: 1.2deg; margin-top: .9rem; margin-bottom: -.9rem; }
.trio li:nth-child(3) { rotate: -.7deg; }
.trio li:hover { rotate: 0deg; translate: -3px -5px; box-shadow: 11px 13px 0 var(--ink); }
.trio svg {
  display: block;
  width: 4.75rem;
  height: auto;
  margin: 0 auto 1rem;
  overflow: visible;
  transition: rotate .35s var(--pop), scale .35s var(--pop);
}
.trio li:hover svg { rotate: -8deg; scale: 1.12; }
.trio h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1; letter-spacing: .03em; }
.trio p { margin: .55rem 0 0; font-size: .875rem; line-height: 1.55; }

.contact { margin-top: clamp(3rem, 8vw, 4.75rem); }
.contact p { margin: 0 0 1.1rem; }
.cta {
  position: relative;
  display: inline-block;
  padding: 1rem 2.4rem 1rem 1.6rem;
  background: var(--ink);
  color: var(--paper);
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  letter-spacing: .03em;
  text-decoration: none;
  transition: rotate .25s var(--pop), scale .25s var(--pop);
}
.cta::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: .8rem;
  height: 1.3rem;
  margin-top: -.65rem;
  background: var(--lime);
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  transition: width .25s var(--pop);
}
.cta:hover { rotate: -1.6deg; scale: 1.05; }
.cta:hover::after { width: 1.3rem; }
.cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.en {
  max-width: 40rem;
  margin: clamp(3.5rem, 10vw, 6rem) auto 0;
  padding-top: clamp(2rem, 6vw, 3rem);
  border-top: 2px solid var(--ink);
}
.en h2 { font-size: clamp(2rem, 7vw, 3rem); line-height: 1; }
.en p { margin: 1rem 0 0; }
.eyebrow {
  margin: 0 0 .5rem !important;
  font-size: .75rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .22em;
}
.en a:hover, footer a:hover { background: var(--lime); }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* comparsa mentre si scorre (solo con lo script attivo) */
.js [data-reveal] { opacity: 0; translate: 0 1.75rem; transition: opacity .6s ease, translate .7s var(--pop), rotate .25s var(--pop), box-shadow .25s var(--pop); }
.js [data-reveal].in { opacity: 1; translate: 0 0; }
.js .trio li:nth-child(2) { transition-delay: .09s; }
.js .trio li:nth-child(3) { transition-delay: .18s; }
.js .trio li.in:hover { translate: -3px -5px; transition-delay: 0s; }

/* --- Piede ----------------------------------------------------------- */
footer {
  margin-top: clamp(3.5rem, 10vw, 6rem);
  padding-top: 1rem;
  border-top: 1px solid var(--metal);
  font-size: .75rem;
  line-height: 1.7;
  text-align: center;
}
footer p { margin: 0 auto .5rem; max-width: 46rem; }
footer a { text-decoration-thickness: 1px; }

/* =====================================================================
   Telefono
   ===================================================================== */
@media (max-width: 40rem) {
  .stage { height: clamp(24rem, 62svh, 31rem); }
  .lot { font-size: .59rem; letter-spacing: .12em; white-space: nowrap; }
  .i1  { --x: -34; --y: -26; }
  .i2  { --x: -12; --y: -38; }
  .i3  { --x: 12;  --y: -27; }
  .i4  { --x: 36;  --y: -36; }
  .i5  { --x: 37;  --y: -15; --s: .8; }
  .i6  { --x: 38;  --y: 21; }
  .i7  { --x: 15;  --y: 37; }
  .i8  { --x: -10; --y: 25; }
  .i9  { --x: -34; --y: 39; }
  .i10 { --x: -37; --y: 19; }
  .i11 { --x: -37; --y: -9; --s: .7; display: none; }

  .trio { grid-template-columns: 1fr; max-width: 24rem; gap: 1.4rem; }
  .trio li { display: flex; align-items: center; gap: 1.1rem; padding: 1.1rem 1.1rem 1.1rem 1.2rem; text-align: left; }
  .trio li:nth-child(2) { margin: 0; }
  .trio svg { flex: none; width: 3.5rem; margin: 0; }
}

/* =====================================================================
   Chi preferisce meno movimento: tutto fermo, tutto visibile
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .item { opacity: 1; }
  .js [data-reveal] { opacity: 1; translate: 0 0; }
  .hint { display: none !important; }
}
