/* Home: apertura scura con i 19 inverni che si disegnano uno dopo l'altro e si fermano sul
   peggiore, poi si esplorano anno per anno; sotto, le schermate vere del prodotto in una
   visita a schede. Il movimento segue sempre un gesto (passaggio, tocco, scelta di una
   scheda): niente animazioni all'ingresso delle sezioni. Script in /js/home.js. */

/* ---- Apertura ---- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(29, 78, 216, 0.38), transparent 70%), var(--navy);
  color: #ffffff;
}
/* luce che segue il puntatore: le coordinate le scrive home.js */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    36rem circle at var(--mx, 50%) var(--my, 30%),
    rgba(91, 127, 224, 0.16),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 400ms ease-out;
}
.hero.is-lit::before {
  opacity: 1;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0 0 var(--sp-5);
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: var(--fs-s);
  color: #c7d2e6;
}
/* sole e orizzonte del marchio, in piccolo */
.hero__eyebrow::before {
  content: '';
  width: 1rem;
  height: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect width='24' height='24' rx='6' fill='%231d4ed8'/%3E%3Ccircle cx='12' cy='10.5' r='4' fill='%23fff'/%3E%3Cpath d='M5 17h14' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
/* la schermata grande scende per metà sotto la fascia scura */
.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: clamp(5rem, 16vw, 15rem);
  background: var(--paper);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-7);
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
}
@media (min-width: 62rem) {
  .hero__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: var(--sp-8);
    align-items: center;
    padding-top: var(--sp-9);
  }
}
.hero h1 {
  color: #ffffff;
  font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: var(--sp-5);
}
.hero__lead {
  font-size: var(--fs-l);
  line-height: 1.55;
  color: #c7d2e6;
  max-width: 34em;
}
.hero__actions {
  margin-top: var(--sp-6);
}

/* Bottoni su fondo scuro */
.button--light {
  background: #ffffff;
  border-color: #ffffff;
  color: var(--navy);
}
.button--light:hover {
  background: var(--blue-tint);
  border-color: var(--blue-tint);
}
.button--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
  box-shadow: none;
}
.button--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ---- I 19 inverni ---- */
.winters {
  --plot-h: 11rem;
  --axis-w: 2.75rem;
  margin: 0;
  padding: var(--sp-5);
  background: #12204a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-l);
}
.winters figcaption {
  display: grid;
  gap: var(--sp-1);
  margin-bottom: var(--sp-3);
}
.winters__place {
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}
.winters__title {
  font-size: var(--fs-s);
  line-height: 1.45;
  color: #c7d2e6;
  text-wrap: pretty;
}
.winters__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-5);
  font-size: var(--fs-xs);
  color: #c7d2e6;
}
.winters__key {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.winters__key::before {
  content: '';
  display: inline-block;
}
.winters__key--worst::before {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  background: #f0605d;
}
.winters__plot {
  position: relative;
  padding-left: var(--axis-w);
}
/* asse dei giorni: linee guida leggere con l'etichetta a sinistra */
.winters__axis {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.winters__axis span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--t) * var(--plot-h));
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 0;
  color: #8193b8;
}
.winters__axis span::after {
  content: '';
  position: absolute;
  left: var(--axis-w);
  right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.winters__bar em {
  position: absolute;
  left: 50%;
  bottom: calc(var(--h) * 100% + 0.3rem);
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
  color: #ff8a80;
  animation: verdict-in 500ms ease-out 1.6s both;
}
.winters__years {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
  margin: 1.9rem 0 0 var(--axis-w);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: #8193b8;
}
.winters__years span:nth-child(2) {
  font-family: var(--font-sans);
  text-align: center;
}
.winters__bars {
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  align-items: end;
  gap: 3px;
  height: var(--plot-h);
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  touch-action: pan-y;
  border-radius: 2px;
}
.js .winters__bars {
  cursor: crosshair;
}
.winters__bars:focus-visible {
  outline: 2px solid #8aa4ee;
  outline-offset: 6px;
}
.winters__bar {
  position: relative;
  height: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: flex-end;
  transition: opacity 150ms ease-out;
}
/* esplorazione: l'anno scelto resta pieno, gli altri si attenuano */
.winters.is-exploring .winters__bar:not(.is-active) {
  opacity: 0.4;
}
.winters__bar.is-active i {
  background: #8aa4ee;
}
.winters__bar.is-active.is-worst i {
  background: #f0605d;
}
.winters__bar.is-active b {
  color: #ffffff;
}
.winters__mean {
  position: absolute;
  left: var(--axis-w);
  right: 0;
  bottom: calc(var(--m) * var(--plot-h));
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(199, 210, 230, 0.75) 0 6px,
    transparent 6px 10px
  );
  pointer-events: none;
}
.winters__mean span {
  position: absolute;
  right: 0;
  bottom: 0.25rem;
  padding: 0 0.25rem;
  border-radius: 3px;
  background: #12204a;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: #c7d2e6;
}
.winters__bar i {
  display: block;
  width: 100%;
  height: calc(var(--h) * 100%);
  border-radius: 3px 3px 0 0;
  background: #5b7fe0;
  transform-origin: bottom;
  animation: bar-grow 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(200ms + var(--i) * 55ms);
}
.winters__bar b {
  position: absolute;
  left: 50%;
  bottom: -1.5rem;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 400;
  color: #8193b8;
}
/* L'anno peggiore: dopo che gli anni si sono disegnati diventa rosso. */
.winters__bar.is-worst i {
  animation:
    bar-grow 700ms cubic-bezier(0.16, 1, 0.3, 1) both,
    bar-alert 500ms ease-out both;
  animation-delay: calc(200ms + var(--i) * 55ms), 1.6s;
}
.winters__bar.is-worst b {
  color: #ffffff;
  font-weight: 500;
}
.winters__verdict {
  margin: var(--sp-4) 0 var(--sp-2);
  font-size: var(--fs-l);
  color: #ffffff;
  animation: verdict-in 600ms cubic-bezier(0.16, 1, 0.3, 1) 1.8s both;
}
.winters__verdict strong {
  color: #ff8a80;
}
.winters__verdict.is-plain strong {
  color: #ffffff;
}
.winters__hint {
  display: none;
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xs);
  color: #8193b8;
}
.js .winters__hint {
  display: block;
}
.winters__note {
  margin: 0;
  font-size: var(--fs-s);
  color: #9fb0d0;
}
@keyframes bar-grow {
  from {
    transform: scaleY(0);
  }
}
@keyframes bar-alert {
  to {
    background: #f0605d;
  }
}
@keyframes verdict-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .winters__bar i,
  .winters__bar em,
  .winters__verdict {
    animation: none;
  }
  .winters__bar.is-worst i {
    animation: none;
    background: #f0605d;
  }
}

/* ---- Schermate del prodotto ---- */
.screen {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  border-radius: var(--radius-l);
  box-shadow:
    0 1px 3px rgba(16, 24, 40, 0.1),
    0 24px 48px -16px rgba(16, 24, 40, 0.28);
}
.screen__bar {
  display: flex;
  align-items: center;
  height: 2.25rem;
  padding: 0 var(--sp-4);
  background: var(--band);
  border-bottom: var(--rule);
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.screen__dots {
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 2.25rem;
  border-radius: 50%;
  background: var(--line-strong);
  box-shadow:
    0.875rem 0 0 var(--line-strong),
    1.75rem 0 0 var(--line-strong);
}
.screen img {
  display: block;
  width: 100%;
  height: auto;
}
.screen--hero {
  position: relative;
  z-index: 1;
}
/* il video completo del calcolatore, sopra la schermata */
.screen__play {
  position: absolute;
  left: 50%;
  top: 54%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  max-width: calc(100% - 2 * var(--sp-4));
  padding: var(--sp-3) var(--sp-6) var(--sp-3) var(--sp-3);
  font: inherit;
  text-align: left;
  color: #fff;
  background: rgb(11 21 48 / 0.9);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 40px -12px rgb(11 21 48 / 0.55);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition:
    transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 0.2s ease;
}
.screen__play:hover {
  background: var(--navy);
  transform: translate(-50%, -50%) scale(1.03);
}
.screen__play:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.screen__play-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  padding-left: 3px;
  border-radius: 50%;
  background: var(--blue);
}
.screen__play-text {
  display: grid;
  gap: 2px;
  font-size: var(--fs-s);
  line-height: 1.35;
  color: rgb(255 255 255 / 0.78);
}
.screen__play-text strong {
  font-size: var(--fs-m);
  font-weight: 600;
  color: #fff;
}
@media (max-width: 40rem) {
  .screen__play {
    gap: var(--sp-3);
    padding-right: var(--sp-4);
  }
  .screen__play-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  .screen__play-text span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .screen__play,
  .screen__play:hover {
    transition: none;
    transform: translate(-50%, -50%);
  }
}

/* ---- Il flusso di lavoro ---- */
.flow {
  padding-top: var(--sp-9);
}
.flow h2,
.proof h2 {
  font-size: clamp(var(--fs-2xl), 1.4rem + 1.6vw, 2.75rem);
  letter-spacing: -0.03em;
  max-width: 20em;
}
.flow__intro {
  font-size: var(--fs-l);
  color: var(--ink-2);
}
.flow__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-6);
  padding-top: var(--sp-8);
}
@media (min-width: 62rem) {
  .flow__row {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: var(--sp-8);
    align-items: center;
  }
  .flow__row--flip {
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  }
  .flow__row--flip .flow__text {
    order: 2;
  }
}
.flow__step {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: var(--sp-4);
  border-radius: 50%;
  background: var(--blue-tint);
  color: var(--blue);
  font-weight: 600;
}
.flow h3 {
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
}
.flow__row .screen {
  max-height: 34rem;
}

.checks {
  display: grid;
  gap: var(--sp-2);
  list-style: none;
  padding: 0;
}
.checks li {
  position: relative;
  padding-left: 1.75rem;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  background: var(--blue-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.2l2.6 2.6L13 6.4' fill='none' stroke='%231d4ed8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 100% no-repeat;
}

/* ---- Prove ---- */
.proof {
  padding-top: var(--sp-9);
}
.proof__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-6);
}
@media (min-width: 62rem) {
  .proof__grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: var(--sp-8);
    align-items: start;
  }
}
.catalog-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin: 0;
}
.catalog-counts div {
  padding: var(--sp-5);
  background: var(--band);
  border-radius: var(--radius-l);
}
.catalog-counts dt {
  font-size: var(--fs-s);
  color: var(--ink-2);
}
.catalog-counts dd {
  margin: 0;
  font-size: var(--fs-2xl);
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* ---- Invito finale, attaccato al piede ---- */
.cta-band {
  margin-top: var(--sp-9);
  background: var(--blue);
  color: #ffffff;
}
.cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  padding-top: var(--sp-8);
  padding-bottom: var(--sp-8);
}
.cta-band h2 {
  color: #ffffff;
  font-size: var(--fs-2xl);
  letter-spacing: -0.025em;
}
.cta-band p {
  margin: 0;
  color: #dbe5ff;
}
.cta-band .button--light {
  color: var(--blue);
}
main:has(> .cta-band:last-child) + .site-footer {
  margin-top: 0;
}

@media (max-width: 30rem) {
  .winters {
    padding: var(--sp-4);
  }
  .winters__bar b {
    display: none;
  }
  .winters__bar.is-worst b {
    display: block;
  }
  .winters {
    --plot-h: 9rem;
    --axis-w: 2.4rem;
  }
}

/* ---- Frecce che si spostano al passaggio ---- */
.arrow {
  flex: none;
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.button--arrow:hover .arrow,
.link-arrow:hover .arrow {
  transform: translateX(3px);
}
.link-arrow {
  font-weight: 600;
}
.link-arrow .arrow {
  margin-left: var(--sp-1);
  vertical-align: -0.15em;
}

/* ---- Visita a schede: senza JavaScript restano le tre righe una sotto l'altra ---- */
.tour__tabs {
  position: relative;
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-top: var(--sp-7);
  padding: 4px;
  background: var(--band);
  border-radius: 999px;
}
.tour__tabs[hidden] {
  display: none;
}
.tour__tabs button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 2.5rem;
  padding: 0 var(--sp-5);
  border: 0;
  border-radius: 999px;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 150ms ease-out;
}
.tour__tabs button:hover {
  color: var(--ink);
}
.tour__tabs button[aria-selected='true'] {
  color: var(--blue);
}
.tour__tabs button span {
  display: inline-grid;
  place-items: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: var(--paper);
  font-size: var(--fs-xs);
  color: var(--ink-2);
  transition:
    background-color 150ms ease-out,
    color 150ms ease-out;
}
.tour__tabs button[aria-selected='true'] span {
  background: var(--blue);
  color: #ffffff;
}
/* la pillola bianca scivola sotto la scheda scelta; posizione e larghezza da home.js */
.tour__thumb {
  position: absolute;
  top: 4px;
  left: 0;
  height: calc(100% - 8px);
  width: var(--tw, 0);
  transform: translateX(var(--tx, 0));
  border-radius: 999px;
  background: var(--paper);
  box-shadow:
    var(--shadow-s),
    0 4px 12px -4px rgba(16, 24, 40, 0.16);
  transition:
    transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1),
    width 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tour.is-ready .tour__panel:not(.is-active) {
  display: none;
}
.tour.is-ready .flow__row {
  padding-top: var(--sp-6);
}
.tour.is-ready .flow__step {
  display: none;
}
.tour.is-ready .screen {
  height: 22rem;
  max-height: none;
}
.tour.is-ready .screen img {
  height: calc(100% - 2.25rem);
  object-fit: cover;
  object-position: top left;
}
@media (min-width: 62rem) {
  .tour.is-ready .flow__row--flip {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  }
  .tour.is-ready .flow__row--flip .flow__text {
    order: 0;
  }
  .tour.is-ready .flow__row {
    min-height: 32rem;
  }
  .tour.is-ready .screen {
    height: 32rem;
  }
}
/* al cambio di scheda: il testo appare, la schermata sale di poco */
.tour__panel.is-entering .flow__text {
  animation: tour-text 260ms ease-out both;
}
.tour__panel.is-entering .screen {
  animation: tour-screen 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes tour-text {
  from {
    opacity: 0;
  }
}
@keyframes tour-screen {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
}
@media (max-width: 30rem) {
  .tour__tabs {
    width: 100%;
  }
  .tour__tabs button {
    flex: 1;
    padding: 0 var(--sp-2);
  }
}
/* sui telefoni più stretti (360 e 320 px) i numeri non ci stanno: restano i nomi delle fasi */
@media (max-width: 23rem) {
  .tour__tabs button {
    gap: 0;
  }
  .tour__tabs button span {
    display: none;
  }
}

/* ---- I tre impegni ---- */
.proof__catalog > p {
  margin-top: var(--sp-4);
}
.pillars {
  display: grid;
  gap: var(--sp-3);
  margin: 0;
}
.pillars div {
  padding: var(--sp-5);
  border: var(--rule);
  border-radius: var(--radius-l);
  transition: border-color 150ms ease-out;
}
.pillars div:hover {
  border-color: var(--line-strong);
}
.pillars dt {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  font-weight: 600;
}
.pillars dt::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--blue);
}
.pillars dd {
  margin: 0;
  color: var(--ink-2);
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    display: none;
  }
  .tour__panel.is-entering .flow__text,
  .tour__panel.is-entering .screen {
    animation: none;
  }
}

/* ---- Il racconto che segue lo scorrimento: tetto, inverter, batterie, casa, notte ----
   La scena resta ferma sullo schermo mentre scorrono le fasi; /js/storia.js muove la
   «telecamera» e accende i pezzi. Senza JavaScript la scena è completa, di giorno. */
.story {
  padding-top: var(--sp-9);
}
.story h2 {
  font-size: clamp(var(--fs-2xl), 1.4rem + 1.6vw, 2.75rem);
  letter-spacing: -0.03em;
  max-width: 20em;
}
.story__intro {
  font-size: var(--fs-l);
  color: var(--ink-2);
}
.story__grid {
  --stage-top: calc(var(--story-top, 4rem) + var(--sp-3));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-top: var(--sp-6);
}
.story__stage {
  position: sticky;
  top: var(--story-top, 4rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  height: 56svh;
  padding: var(--sp-3) 0;
  background: var(--paper);
}
.story__frame {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #1d4ed8;
  box-shadow:
    0 1px 3px rgba(16, 24, 40, 0.1),
    0 24px 48px -16px rgba(16, 24, 40, 0.28);
}
.story__svg {
  display: block;
  width: 100%;
  height: 100%;
}
.js .story__svg:not(.is-ready) {
  visibility: hidden;
}
.story__panel {
  transform-box: fill-box;
  transform-origin: center;
}
.story__tag text {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: #ffffff;
}
.story__nav {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-1);
  margin: 0;
  padding: 0;
  list-style: none;
}
.story__nav li {
  flex: 1;
  max-width: none;
  margin: 0;
}
.story__nav a {
  position: relative;
  display: block;
  padding: var(--sp-3) 0 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 200ms ease-out;
}
/* ogni fase ha la sua lineetta, che si riempie mentre la si attraversa */
.story__nav a::before,
.story__nav a::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  border-radius: 2px;
}
.story__nav a::before {
  right: 0;
  background: var(--line);
}
.story__nav a::after {
  width: 100%;
  background: var(--blue);
  transform: scaleX(var(--fill, 1));
  transform-origin: left;
}
.story__nav a:hover,
.story__nav a.is-active {
  color: var(--ink);
}
.story__steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.story__step {
  display: flex;
  align-items: center;
  min-height: 80svh;
  max-width: none;
  margin: 0;
}
.story__step:first-child {
  min-height: 60svh;
}
.story__card {
  width: 100%;
  padding: var(--sp-5);
  background: var(--paper);
  border: var(--rule);
  border-radius: var(--radius-l);
  transition: opacity 300ms ease-out;
}
.js .story__step:not(.is-active) .story__card {
  opacity: 0.35;
}
.story__card h3 {
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
}
.story__card p:last-child {
  margin-bottom: 0;
}
.story__kicker {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-s);
  font-weight: 600;
  color: var(--blue);
}
.story__kicker span {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--blue-tint);
  font-size: var(--fs-xs);
}
@media (min-width: 62rem) {
  .story__grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: var(--sp-8);
  }
  .story__stage {
    order: 2;
    top: var(--stage-top);
    justify-content: center;
    height: calc(100svh - var(--stage-top) - var(--sp-5));
    padding: 0;
  }
  .story__frame {
    flex: none;
    max-height: calc(100% - 3rem);
    aspect-ratio: 4 / 3;
  }
  .story__step {
    min-height: 90svh;
  }
  .story__step:first-child {
    min-height: calc(100svh - var(--stage-top));
  }
  .story__card {
    padding: 0;
    border: 0;
  }
  .story__card h3 {
    font-size: var(--fs-2xl);
  }
  .story__card p:not(.story__kicker) {
    font-size: var(--fs-l);
    color: var(--ink-2);
  }
}
@media (prefers-reduced-motion: reduce) {
  .story__card,
  .story__nav a {
    transition: none;
  }
}

/* ---- I miei componenti: i prodotti dell'azienda, privati e abbinati da lei ---- */
.mine {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-7);
  margin-top: var(--sp-9);
  padding: var(--sp-6) var(--sp-5);
  background: var(--band);
  border-radius: 16px;
}
@media (min-width: 62rem) {
  .mine {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: var(--sp-8);
    align-items: center;
    padding: var(--sp-8);
  }
}
.mine h2 {
  font-size: clamp(var(--fs-2xl), 1.4rem + 1.6vw, 2.75rem);
  letter-spacing: -0.03em;
}
.mine__kicker {
  margin-bottom: var(--sp-3);
  font-size: var(--fs-s);
  font-weight: 600;
  color: var(--blue);
}
.mine__lead {
  font-size: var(--fs-l);
  color: var(--ink-2);
}
.mine__note {
  padding: var(--sp-4);
  background: var(--paper);
  border: var(--rule-strong);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  font-size: var(--fs-s);
  color: var(--ink);
}
/* una piccola scena: il tuo inverter e i prodotti che hai scelto di abbinargli */
.mine__demo {
  display: grid;
  gap: var(--sp-3);
}
.mine__card {
  position: relative;
  display: grid;
  gap: 2px;
  padding: var(--sp-4);
  background: var(--paper);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow);
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mine__card:hover {
  transform: translateY(-2px);
}
.mine__type {
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.mine__spec {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.mine__tag {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-4);
  padding: 0 0.5rem;
  border-radius: 999px;
  background: var(--blue-tint);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--blue);
}
.mine__links {
  position: relative;
  display: flex;
  justify-content: center;
  height: 2rem;
}
.mine__links::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 2px dashed var(--blue);
}
.mine__links span {
  position: relative;
  align-self: center;
  padding: 0 var(--sp-2);
  background: var(--band);
  font-size: var(--fs-xs);
  color: var(--ink-2);
}
.mine__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}
@media (max-width: 30rem) {
  .mine__pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- Oltre il progetto: quattro funzioni, testo e icone ---- */
.extras {
  padding-top: var(--sp-9);
}
.extras h2 {
  font-size: clamp(var(--fs-2xl), 1.4rem + 1.6vw, 2.75rem);
  letter-spacing: -0.03em;
  max-width: 20em;
}
.extras__intro {
  font-size: var(--fs-l);
  color: var(--ink-2);
}
.extras__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-4);
  margin: var(--sp-6) 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 48rem) {
  .extras__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.extras__card {
  display: flex;
  flex-direction: column;
  max-width: none;
  margin: 0;
  padding: var(--sp-5);
  border: var(--rule);
  border-radius: var(--radius-l);
  transition: border-color 150ms ease-out;
}
.extras__card:hover {
  border-color: var(--line-strong);
}
.extras__icon {
  margin-bottom: var(--sp-4);
}
.extras__card h3 {
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
}
.extras__card p {
  color: var(--ink-2);
}
.extras__card .extras__note {
  margin: auto 0 0;
  padding-top: var(--sp-3);
  border-top: var(--rule);
  font-size: var(--fs-s);
  color: var(--ink);
}
.flow__proof {
  font-size: var(--fs-s);
  color: var(--ink-2);
}
