:root {
  --fondo: #eeece8;        /* the light neutral grey behind the headphones */
  --fondo-alto: #e2dfd9;   /* the top of the background */
  --plastica: #b8ac98;     /* the matte sand plastic of the shells and the band */
  --alluminio: #c9cbcd;    /* the brushed aluminium of the yokes, sliders and caps */
  --pelle: #4b443d;        /* the protein leather of the cushions */
  --tessuto: #8a8276;      /* the knit of the headband */
  --accento: #2f5bd8;      /* the cobalt marks: the driver ring, the crosses, the fill */
  --inchiostro: #17171a;   /* the text */
}

* { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

p { margin: 0; }

/* ---------------------------------------------------------------- the stage */
.palco {
  position: relative;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 50% 56%, rgba(255, 255, 255, .7), transparent 62%),
    linear-gradient(to bottom, var(--fondo-alto), var(--fondo) 64%);
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.palco.preso { cursor: grabbing; }

.tela {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------------------------------------------------------------- the callouts on the parts */
.fili {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.fili line {
  stroke: var(--inchiostro);
  stroke-width: 1;
  stroke-opacity: .42;
}

/* the anchor on the part: a small cross, like the marks on a technical drawing */
.fili path {
  fill: none;
  stroke: var(--accento);
  stroke-width: 1.4;
  stroke-linecap: round;
}

.etichette {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.etichetta {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  font-size: clamp(10px, 1.05vw, 13px);
  line-height: 1.25;
  font-variation-settings: 'wdth' 82;
  /* a soft halo in the colour of the background, so the words read over the parts too */
  text-shadow: 0 0 4px var(--fondo), 0 0 8px var(--fondo), 0 0 12px var(--fondo);
  opacity: 0;
}

.etichetta b {
  display: block;
  font-weight: 650;
  font-size: 1.08em;
}

.etichetta span { opacity: .6; }

/* ---------------------------------------------------------------- the words */
.testata {
  position: absolute;
  top: clamp(12px, 3.2vh, 28px);
  left: clamp(16px, 4.4vw, 56px);
  right: clamp(16px, 4.4vw, 56px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.marchio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 700;
  font-variation-settings: 'wdth' 112;
}

.marchio svg {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.modello {
  font-size: clamp(11px, 1.1vw, 13px);
  opacity: .75;
}

.modello b {
  font-weight: 650;
  opacity: 1;
}

/* ---------------------------------------------------------------- the hint and the measure at the bottom */
.piede {
  position: absolute;
  left: 50%;
  bottom: clamp(12px, 3.4vh, 30px);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  pointer-events: none;
  width: max-content;
  max-width: calc(100% - 32px);
}

.invito {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 560;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 6px 18px -8px rgba(40, 32, 20, .35), 0 0 0 1px rgba(23, 23, 26, .06);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
}

.invito svg {
  width: 22px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.misura {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(10px, 1vw, 12px);
  font-variation-settings: 'wdth' 86;
  letter-spacing: .02em;
  opacity: 0;
}

.misura-nome { opacity: .62; }

.misura-nome em {
  font-style: normal;
  font-weight: 650;
  display: inline-block;
  min-width: 3.4ch;
}

/* a thin track with a tick every quarter, filled as far as the headphones are apart */
.binario {
  position: relative;
  width: clamp(90px, 14vw, 160px);
  height: 3px;
  border-radius: 3px;
  background:
    linear-gradient(to right, rgba(23, 23, 26, .25) 1px, transparent 1px) 0 0 / 25% 100%,
    rgba(23, 23, 26, .1);
}

.binario i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accento);
  transform-origin: left center;
  transform: scaleX(0);
}

.binario b {
  position: absolute;
  top: 50%;
  left: 0;
  width: 2px;
  height: 11px;
  margin: -5.5px 0 0 -1px;
  border-radius: 2px;
  background: var(--inchiostro);
}

/* ---------------------------------------------------------------- the drawn pointer of the autopilot */
.puntatore {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  margin: -3px 0 0 -5px;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
}

.puntatore path {
  fill: var(--inchiostro);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

@media (max-width: 560px) {
  .etichetta span { display: none; }
  .modello span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .palco { cursor: default; }
}
