/* La lavatrice */
:root {
  --fondo: #E4EEF0;
  --alone: #F6FAF8;
  --testo: #14262E;
  --tenue: #4E6670;
  --accento: #E8505B;
  --accento-chiaro: #F27A82;
  --bianco: #FDFDFB;
  --bianco-ombra: #D9E2E5;
  --linea: #C5D2D6;
  --cromo: #9DACB3;
  --cromo-chiaro: #E9EFF1;
  --guarnizione: #3B4A52;
  --cestello: #22323B;
  --cestello-chiaro: #4B5F69;
  --foro: #16232A;
  --display: #10222A;
  --display-testo: #8DF0C4;
  --acqua: #4C9BE0;
  --schiuma: #FFFFFF;
  --pavimento: #C9D8DC;
  --legno: #C98B4B;
  --legno-scuro: #8F5A2A;
  --filo: #6C7F87;
  --rosso: #E8505B;
  --rosso-scuro: #B8343F;
  --giallo: #F5B83D;
  --giallo-scuro: #C98A17;
  --blu: #3457A6;
  --blu-chiaro: #5D7FCB;
  --verde: #2FA37A;
  --verde-scuro: #1F7556;
  --margine: clamp(18px, 4vw, 64px);
  --alto: 100vh;
}
@supports (height: 100svh) {
  :root { --alto: 100svh; }
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  height: 100%;
}
body {
  background: var(--fondo);
  color: var(--testo);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow: hidden;
}

.banco {
  position: relative;
  height: var(--alto);
  display: grid;
  grid-template-columns: minmax(280px, 32%) 1fr;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse 60% 70% at 64% 50%, var(--alone), transparent 70%), var(--fondo);
}

/* ---- il testo della lavanderia ---- */
.testo {
  position: relative;
  z-index: 2;
  padding: 0 0 0 var(--margine);
  max-width: 420px;
}
.marchio {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 650;
  font-stretch: 112%;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accento);
}
.titolo {
  margin: 0;
  font-size: clamp(32px, 4.2vw, 60px);
  line-height: 1.02;
  font-weight: 750;
  font-stretch: 92%;
  letter-spacing: -0.02em;
}
.frase {
  margin: 20px 0 30px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--tenue);
  max-width: 34ch;
}
.ora {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--tenue);
}
.ora__etichetta {
  font-weight: 600;
  font-stretch: 110%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  margin-right: 6px;
}
.ora__nome {
  display: inline-block;
  color: var(--testo);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* il pulsante: la pillola si gonfia con un rimbalzo e la manopola fa uno scatto */
.programma {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 14px 18px;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  font-stretch: 100%;
  cursor: pointer;
  transition: font-stretch 0.5s cubic-bezier(0.34, 1.8, 0.5, 1);
  -webkit-tap-highlight-color: transparent;
}
.programma__fondo {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--accento);
  transition: transform 0.6s cubic-bezier(0.34, 1.8, 0.5, 1), background-color 0.3s;
}
.programma__manopola,
.programma__scritta { position: relative; }
.programma__manopola {
  width: 20px;
  height: 20px;
  transition: transform 0.7s cubic-bezier(0.34, 1.8, 0.5, 1);
}
.programma:active .programma__fondo { transform: scale(0.94); transition-duration: 0.12s; }
.programma:focus-visible { outline: none; }
.programma:focus-visible .programma__fondo { box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--testo); }
@media (hover: hover) {
  .programma:hover { font-stretch: 112%; }
  .programma:hover .programma__fondo { transform: scale(1.06, 1.12); background-color: var(--accento-chiaro); }
  .programma:hover .programma__manopola { transform: rotate(72deg); }
}

/* ---- la scena ---- */
.palco {
  position: relative;
  height: 100%;
  min-height: 0;
}
.scena {
  position: absolute;
  inset: 5% 3% 5% 0;
  width: 97%;
  height: 90%;
  overflow: visible;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pavimento { fill: var(--pavimento); }
.piastrelle { stroke: var(--fondo); stroke-width: 2; }
.palo { fill: var(--legno); }
.palo-testa { fill: var(--legno-scuro); }
.filo { fill: none; stroke: var(--filo); stroke-width: 2.4; stroke-linecap: round; }
.molletta { fill: var(--legno); stroke: var(--legno-scuro); stroke-width: 1.4; }
.ombra { fill: rgba(20, 38, 46, 0.18); }
.sbuffo { fill: var(--bianco); stroke: var(--linea); stroke-width: 1.5; }

.piede { fill: var(--guarnizione); }
.corpo { stroke: var(--linea); stroke-width: 2; }
.linea { fill: none; stroke: var(--linea); stroke-width: 2; }
.targa {
  fill: var(--cromo);
  font-size: 12px;
  font-weight: 700;
  font-stretch: 120%;
  letter-spacing: 0.32em;
  text-anchor: middle;
}
.cassetto { fill: var(--bianco); stroke: var(--linea); stroke-width: 2; }
.cassetto-presa { fill: var(--linea); }
.display { fill: var(--display); }
.display__testo { fill: var(--display-testo); font-variant-numeric: tabular-nums; }
.display__programma { font-size: 10px; font-weight: 650; font-stretch: 112%; letter-spacing: 0.08em; }
.display__tempo { font-size: 21px; font-weight: 700; font-stretch: 90%; }
.display__fase { font-size: 10px; font-weight: 700; font-stretch: 115%; letter-spacing: 0.1em; text-anchor: end; }
.manopola-fondo { fill: var(--bianco-ombra); }
.manopola { fill: url(#g-cromo); stroke: var(--cromo); stroke-width: 2; }
.manopola-segno { fill: var(--accento); }

.incavo { fill: var(--bianco-ombra); }
.guarnizione { fill: var(--guarnizione); }
.foro { fill: var(--foro); }
.pala { fill: var(--cestello-chiaro); stroke: var(--foro); stroke-width: 2; }
.getto { fill: none; stroke: var(--acqua); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 14 9; }
.acqua { fill: var(--acqua); fill-opacity: 0.55; }
.bolla { fill: none; stroke: #fff; stroke-width: 1.6; }
.schiuma { fill: var(--schiuma); }

.anello { fill: none; stroke-width: 20; }
.anello-dentro { fill: none; stroke: var(--guarnizione); stroke-width: 4; }
.vetro { fill: #BFE3F2; fill-opacity: 0.16; stroke: #fff; stroke-opacity: 0.35; stroke-width: 2; }
.riflesso { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; opacity: 0.55; }
.maniglia { fill: var(--cromo); }
.cerniera { fill: var(--cromo); }

/* i panni */
.p-rosso { fill: var(--rosso); }
.p-rosso-scuro { fill: none; stroke: var(--rosso-scuro); stroke-width: 3; stroke-linecap: round; }
.p-giallo { fill: var(--giallo); }
.p-giallo-scuro { fill: var(--giallo-scuro); }
.p-blu { fill: var(--blu); }
.p-blu-chiaro { fill: var(--blu-chiaro); }
.p-verde { fill: var(--verde); }
.p-verde-scuro { fill: none; stroke: var(--verde-scuro); stroke-width: 2; stroke-linecap: round; }
.p-bianco { fill: #fff; }
.p-cucito { fill: none; stroke: #fff; stroke-width: 1.4; stroke-dasharray: 3 3; opacity: 0.7; }

/* ---- telefono e finestre strette: il testo sopra, la scena sotto ---- */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .banco {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    background: radial-gradient(ellipse 90% 50% at 50% 66%, var(--alone), transparent 70%), var(--fondo);
  }
  .testo {
    padding: calc(var(--margine) + 10px) var(--margine) 0;
    max-width: none;
  }
  .marchio { margin-bottom: 12px; }
  .titolo { font-size: clamp(30px, 8.6vw, 52px); }
  .frase { margin: 12px 0 18px; font-size: 15px; }
  .ora { margin-top: 12px; font-size: 13px; }
  .scena { inset: 2% 0 3%; width: 100%; height: 95%; }
}

/* movimento ridotto: il pulsante cambia solo colore */
@media (prefers-reduced-motion: reduce) {
  .programma,
  .programma__fondo,
  .programma__manopola { transition: background-color 0.3s; }
  .programma:active .programma__fondo { transform: none; }
  @media (hover: hover) {
    .programma:hover .programma__fondo,
    .programma:hover .programma__manopola { transform: none; }
  }
  @media (hover: hover) {
    .programma:hover { font-stretch: 100%; }
  }
}
