/* ==========================================================================
   HOMEPAGE — stili dedicati a templates/index.html
   Tutte le classi hanno prefisso .hp- per non collidere con style.css,
   che resta condiviso con le altre pagine (.hero, .btn, .section...).
   Palette di brand: teal #0fabbc, sky #43aaf3, cyan #66d9e8, mint #34e89e
   (solo come accento, dominano teal e blu), oro Premium #f39c12/#f1c40f,
   promo #f97316. Neutri blu-ardesia per testi e superfici scure.
   ========================================================================== */

/* Font di riserva dei titoli finché Bricolage Grotesque (Google Fonts,
   display=swap) non è arrivato: Arial Bold ridimensionato perché i titoli
   occupino la stessa larghezza. Senza, "Scorri Lezioni" andava a capo col
   font di riserva e tornava su una riga all'arrivo di Bricolage: tutta la
   hero cambiava forma dopo qualche secondo (CLS 0,19 in incognito).
   Con line-height numerico l'altezza delle righe non dipende dal font,
   conta solo la larghezza. Bricolage ha l'optical sizing e ai corpi grandi
   è più stretto: 90,5% per il titolo della hero (~80-100px), 97% per gli
   altri titoli (~32-53px). Misure fatte con il font caricato, 2026-09-25. */
@font-face {
  font-family: 'Bricolage Fallback';
  src: local('Arial Bold'), local('Arial-BoldMT');
  font-weight: 600 800;
  size-adjust: 97%;
}

@font-face {
  font-family: 'Bricolage Fallback Hero';
  src: local('Arial Bold'), local('Arial-BoldMT');
  font-weight: 600 800;
  size-adjust: 90.5%;
}

.hp {
  --hp-teal: #0fabbc;
  --hp-teal-700: #0f7d89;
  --hp-teal-800: #0b6a74;
  --hp-sky: #43aaf3;
  --hp-blue: #2f8fd8;
  --hp-cyan: #66d9e8;
  --hp-mint: #34e89e;
  --hp-ink: #102a43;
  --hp-ink-soft: #243b53;
  --hp-text: #3e5670;
  --hp-muted: #627d98;
  --hp-bg: #f6f9fc;
  --hp-surface: #ffffff;
  --hp-tint: #e8f6f8;
  --hp-line: rgba(16, 42, 67, 0.08);
  --hp-line-strong: rgba(16, 42, 67, 0.14);
  --hp-gold: #f39c12;
  --hp-gold-2: #f1c40f;
  --hp-promo: #f97316;
  --hp-ok: #1f9d55;

  /* Gradiente teal→blu per superfici, variante più scura per il testo,
     gradiente animato (CTA finale e tile "Scegli un piano"): stesso movimento
     del vecchio hero ma con tinte scure, così il testo bianco sopra resta
     >= 4,9:1 in ogni fase (menta e azzurro scendevano a 1,6-2,5:1) */
  --hp-grad: linear-gradient(110deg, #0fabbc 0%, #43aaf3 100%);
  --hp-grad-text: linear-gradient(100deg, #0b95a4 0%, #0fabbc 35%, #2f9be6 75%, #2f7fd0 100%);
  --hp-grad-brand: linear-gradient(-45deg, #0a7d63, #0f7d89, #1d6fb8, #0b7894);

  --hp-radius: 24px;
  --hp-shadow-sm: 0 1px 2px rgba(16, 42, 67, 0.05), 0 2px 10px rgba(16, 42, 67, 0.04);
  --hp-shadow: 0 1px 2px rgba(16, 42, 67, 0.05), 0 16px 36px -14px rgba(16, 42, 67, 0.2);
  --hp-shadow-lg: 0 2px 6px rgba(16, 42, 67, 0.05), 0 36px 70px -24px rgba(16, 42, 67, 0.3);
  --hp-display: 'Bricolage Grotesque', 'Bricolage Fallback', 'DM Sans', system-ui, sans-serif;
  --hp-gutter: clamp(16px, 4vw, 32px);
  --hp-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");

  background: var(--hp-bg);
  color: var(--hp-text);
  overflow-x: clip;
}

.hp *:focus-visible {
  outline: 3px solid var(--hp-teal);
  outline-offset: 3px;
}

/* ---------- Tipografia condivisa ---------- */

.hp-eyebrow--pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--hp-ink-soft);
}

.hp-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hp-mint);
  box-shadow: 0 0 0 0 rgba(52, 232, 158, 0.7);
  animation: hp-pulse 2.2s ease-out infinite;
  flex-shrink: 0;
}

/* La colonna del testo è il contenitore del titolo: "Scorri Lezioni"
   resta su una riga a ogni larghezza (tra 901 e 1060 px la dimensione
   legata alla finestra lo mandava a capo anche con Bricolage) */
.hp-hero-text {
  container-type: inline-size;
}

.hp-h1 {
  font-family: 'Bricolage Grotesque', 'Bricolage Fallback Hero', 'DM Sans', system-ui, sans-serif;
  font-weight: 800;
  font-size: min(clamp(3.1rem, 1.6rem + 5.4vw, 6.2rem), 17.2cqi);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--hp-ink);
  margin: 24px 0 20px;
}

.hp-h2 {
  font-family: var(--hp-display);
  font-weight: 800;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--hp-ink);
  margin: 0;
  text-wrap: balance;
}

.hp-sub {
  max-width: 58ch;
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--hp-text);
}

.hp-grad {
  background: var(--hp-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.06em;
}

.hp-lead {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem);
  line-height: 1.5;
  color: var(--hp-text);
  max-width: 30ch;
  margin: 0 0 32px;
}

/* ---------- Bottoni (rivisitazione di quelli originali) ---------- */

.hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  border: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hp-btn:hover {
  transform: translateY(-2px);
}

.hp-btn:active {
  transform: translateY(0);
}

.hp-btn-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.hp-btn:hover .hp-btn-arrow {
  transform: translateX(4px);
}

/* Primario: gradiente animato come il vecchio .btn-secondary, con l'icona
   Chrome nel cerchio bianco del vecchio .btn-chrome. Tinte scure perché il
   testo è bianco e non abbastanza grande: servono 4,5:1 (prima 3,0-3,6:1) */
.hp-btn--primary {
  padding-left: 9px;
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
  background: linear-gradient(-45deg, #0f7d89, #1a70a8, #0b7894, #1d6fb8);
  background-size: 300% 300%;
  animation: hp-gradient 8s ease infinite;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 28px -10px rgba(47, 143, 216, 0.7);
}

.hp-btn--primary:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 18px 38px -12px rgba(47, 143, 216, 0.85);
}

.hp-btn-chrome {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--hp-teal);
  box-shadow: 0 2px 6px rgba(16, 42, 67, 0.15);
}

.hp-btn-chrome svg {
  width: 20px;
  height: 20px;
}

/* Chiaro: il vecchio .btn-chrome (bianco, testo teal) */
.hp-btn--light {
  background: #fff;
  color: var(--hp-teal-700);
  border: 1px solid rgba(15, 171, 188, 0.28);
  box-shadow: 0 4px 20px rgba(16, 42, 67, 0.08);
}

.hp-btn--light:hover {
  border-color: var(--hp-teal);
  box-shadow: 0 12px 28px -10px rgba(15, 171, 188, 0.45);
}

/* Bianco su gradiente: il vecchio .btn-primary */
.hp-btn--white {
  background: rgba(255, 255, 255, 0.95);
  color: var(--hp-teal-700);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.3);
}

.hp-btn--white:hover {
  background: #fff;
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.35);
}

/* ---------- Social proof ---------- */

.hp-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-size: 0.95rem;
  color: var(--hp-muted);
}

.hp-proof strong {
  color: var(--hp-ink);
}

.hp-avatars {
  display: flex;
}

.hp-avatars span {
  width: 32px;
  height: 32px;
  margin-left: -10px;
  border-radius: 50%;
  border: 2px solid var(--hp-bg);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--hp-teal), var(--hp-sky));
}

.hp-avatars span:first-child { margin-left: 0; }
.hp-avatars span:nth-child(2) { background: linear-gradient(135deg, var(--hp-cyan), var(--hp-teal)); }
.hp-avatars span:nth-child(3) { background: linear-gradient(135deg, var(--hp-sky), var(--hp-blue)); }
.hp-avatars span:nth-child(4) { background: linear-gradient(135deg, var(--hp-teal-700), var(--hp-teal)); }

/* ==========================================================================
   HERO
   ========================================================================== */

.hp-hero {
  position: relative;
  isolation: isolate;
  padding: calc(56px + clamp(36px, 5.5vw, 80px)) var(--hp-gutter) 0;
}

/* Aurora teal/blu sfumata al posto del vecchio sfondo animato pieno */
.hp-hero::before {
  content: '';
  position: absolute;
  inset: -10% -20% 0;
  z-index: -2;
  background:
    radial-gradient(38% 46% at 12% 22%, rgba(15, 171, 188, 0.2), transparent 70%),
    radial-gradient(34% 44% at 88% 12%, rgba(67, 170, 243, 0.3), transparent 70%),
    radial-gradient(42% 50% at 62% 78%, rgba(67, 170, 243, 0.16), transparent 70%),
    radial-gradient(30% 36% at 30% 90%, rgba(102, 217, 232, 0.22), transparent 70%),
    radial-gradient(22% 28% at 4% 60%, rgba(52, 232, 158, 0.12), transparent 70%);
  -webkit-mask-image: linear-gradient(#000 65%, transparent);
  mask-image: linear-gradient(#000 65%, transparent);
  animation: hp-aurora 20s ease-in-out infinite alternate;
  pointer-events: none;
}

/* Griglia di punti che sfuma verso i bordi */
.hp-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(16, 42, 67, 0.13) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hp-hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.hp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Mockup ---------- */

/* Stesso spazio sopra e sotto il mockup: in alto ci sta la card
   dell'estensione, in basso toast e suggerimento, che così restano dentro
   il riquadro (prima uscivano di 7-12 px e arrivavano a ~28 px dalla riga
   "Funziona con"); il mockup resta centrato sul testo accanto */
.hp-hero-visual {
  position: relative;
  padding: 48px 10px;
}

.hp-mock-glow {
  position: absolute;
  inset: 12% 6% 8%;
  z-index: -1;
  border-radius: 48px;
  background: var(--hp-grad);
  filter: blur(64px);
  opacity: 0.32;
}

/* Sotto la demo, allineato ai bottoni dell'estensione: prima la nuvoletta
   "Clicca Dispense o Paniere PDF" (con la freccia verso i bottoni), dopo
   il primo download l'invito a installare. Stanno nella stessa cella della
   griglia, così il box non cambia misura passando dall'uno all'altro. */
.hp-demo-hint {
  position: absolute;
  top: calc(100% - 41px);
  right: 24px;
  z-index: 2;
  display: grid;
  margin: 0;
}

.hp-demo-coach,
.hp-demo-cta {
  grid-area: 1 / 1;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  translate: 0 -4px;
  transition: opacity 0.35s ease, visibility 0.35s ease, translate 0.35s ease;
}

.hp-demo-coach {
  position: relative;
  background: var(--hp-ink);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(16, 42, 67, 0.6);
}

.hp-demo-coach strong {
  color: #7fdde8;
}

/* Freccia verso lo spazio tra Dispense e Paniere PDF */
.hp-demo-coach::before {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 128px;
  border: 6px solid transparent;
  border-bottom-color: var(--hp-ink);
}

.hp-demo-cta {
  border: 1px solid var(--hp-line);
  background: #fff;
  box-shadow: var(--hp-shadow-sm);
  color: var(--hp-ink);
  text-decoration: none;
  transition: opacity 0.35s ease, visibility 0.35s ease, translate 0.35s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.hp-demo-cta strong {
  color: var(--hp-teal-700);
}

.hp-demo-cta:hover {
  border-color: var(--hp-teal);
  box-shadow: 0 10px 24px -14px rgba(15, 125, 137, 0.7);
}

.hp-demo-hint.is-coach .hp-demo-coach,
.hp-demo-hint.is-cta .hp-demo-cta {
  opacity: 1;
  visibility: visible;
  translate: 0 0;
}

/* Finché la demo non è stata provata, Dispense e Paniere pulsano */
@media (prefers-reduced-motion: no-preference) {
  .hp-tool-group.is-hint .hp-tool:not(.hp-tool--round):not(.is-busy) {
    animation: hp-hint-pulse 1.8s ease-out infinite;
  }
}

@keyframes hp-hint-pulse {
  0% { box-shadow: 0 8px 18px -10px rgba(15, 171, 188, 0.9), 0 0 0 0 rgba(15, 171, 188, 0.45); }
  70%, 100% { box-shadow: 0 8px 18px -10px rgba(15, 171, 188, 0.9), 0 0 0 9px rgba(15, 171, 188, 0); }
}

/* Spiegazione dei comandi della demo: al passaggio del mouse (solo con un
   puntatore vero, non al tocco) o con il focus da tastiera. Sopra i
   bottoni dell'estensione, sotto l'interruttore; l'ultimo bottone la
   allinea a destra per non uscire dal mockup (overflow: hidden). */
.hp-hero-visual [data-tip] {
  --tip-x: -50%;
  --tip-y: 4px;
  position: relative;
}

.hp-hero-visual [data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 4;
  width: max-content;
  max-width: 210px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--hp-ink);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  color: #fff;
  opacity: 0;
  visibility: hidden;
  translate: var(--tip-x) var(--tip-y);
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease, translate 0.2s ease;
}

.hp-hero-visual .hp-tool:first-child,
.hp-hero-visual .hp-tool:last-child {
  --tip-x: 0;
}

/* Il primo bottone (pausa) la allinea a sinistra: sui mockup stretti,
   centrata, uscirebbe dal bordo sinistro */
.hp-hero-visual .hp-tool:first-child::before {
  left: 0;
}

.hp-hero-visual .hp-tool:last-child::before {
  left: auto;
  right: 0;
}

.hp-hero-visual .hp-toggle[data-tip] {
  --tip-x: 0;
  --tip-y: -4px;
}

.hp-hero-visual .hp-toggle[data-tip]::before {
  top: calc(100% + 12px);
  bottom: auto;
  left: auto;
  right: -8px;
}

@media (hover: hover) and (pointer: fine) {
  .hp-hero-visual [data-tip]:hover::before {
    opacity: 1;
    visibility: visible;
    translate: var(--tip-x) 0;
  }
}

.hp-hero-visual [data-tip]:focus-visible::before {
  opacity: 1;
  visibility: visible;
  translate: var(--tip-x) 0;
}

/* Durante un download i bottoni non spiegano più nulla */
.hp-tool-group.is-busy [data-tip]::before {
  display: none;
}

.hp-mock {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--hp-shadow-lg), 0 0 0 1px var(--hp-line);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  transform: perspective(1600px) rotateY(-7deg) rotateX(3deg);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hp-hero-visual:hover .hp-mock {
  transform: perspective(1600px) rotateY(0) rotateX(0);
}

.hp-mock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(246, 249, 252, 0.92);
  border-bottom: 1px solid var(--hp-line);
}

.hp-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.hp-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}

.hp-dots i:nth-child(2) { background: #febc2e; }
.hp-dots i:nth-child(3) { background: #28c840; }

.hp-mock-url {
  flex: 1;
  min-width: 0;
  margin-right: 42px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(16, 42, 67, 0.05);
  font-size: 0.8rem;
  color: var(--hp-muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nell'hero l'URL sta a sinistra: a destra c'è la card flottante */
.hp-mock .hp-mock-url {
  flex: 0 1 48%;
  margin-right: auto;
  text-align: left;
}

.hp-mock-body {
  display: grid;
  gap: 12px;
  padding: 18px;
}

/* Player: una slide di lezione chiara, non un blocco scuro */
.hp-player {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hp-line);
}

.hp-slide {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 128px;
  padding: 14px 18px;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(67, 170, 243, 0.1), transparent 70%),
    linear-gradient(135deg, #fbfdff 0%, #eef5fb 100%);
}

.hp-slide-kicker {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hp-teal-700);
}

.hp-slide-title {
  max-width: 62%;
  margin-bottom: 4px;
  font-family: var(--hp-display);
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--hp-ink);
}

.hp-sk {
  display: block;
  height: 7px;
  width: 100%;
  border-radius: 99px;
  background: #dde7f0;
}

.hp-slide-body .hp-sk { width: 52%; }
.hp-slide-body .hp-sk--short { width: 36%; }
.hp-slide-body .hp-sk--mid { width: 44%; }

/* Grafico della slide */
.hp-slide-chart {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 30%;
  height: auto;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
}

/* Barre del grafico: lo script ne imposta la crescita (scaleY) a ogni
   fotogramma, in base all'avanzamento della lezione */
.hp-chart-bar {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: center bottom;
}

.hp-chart-bar:nth-of-type(1) { opacity: 0.45; }
.hp-chart-bar:nth-of-type(2) { opacity: 0.58; }
.hp-chart-bar:nth-of-type(3) { opacity: 0.72; }
.hp-chart-bar:nth-of-type(4) { opacity: 0.86; }

/* Bottoni che l'estensione aggiunge alla pagina della lezione: pausa
   (rotondo), Dispense, Paniere PDF. Nella demo si possono cliccare e
   spariscono quando l'interruttore "Scorrimento automatico" è spento. */
.hp-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 7px 13px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--hp-teal), var(--hp-sky));
  box-shadow: 0 8px 18px -10px rgba(15, 171, 188, 0.9);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

button.hp-tool {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

button.hp-tool:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(15, 171, 188, 1);
}

button.hp-tool:active {
  transform: translateY(0) scale(0.97);
}

/* Durante la simulazione (download / creazione PDF) */
button.hp-tool.is-busy {
  cursor: progress;
  filter: saturate(0.85) brightness(1.05);
}

button.hp-tool.is-done {
  background: linear-gradient(135deg, var(--hp-ok), #3ccf7e);
}

.hp-tool svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.hp-tool--round {
  width: 32px;
  padding: 0;
  border-radius: 50%;
}

.hp-tool--round svg {
  width: 13px;
  height: 13px;
}

.hp-tool--round .hp-ico-play,
.hp-tool--round[aria-pressed="true"] .hp-ico-pause {
  display: none;
}

.hp-tool--round[aria-pressed="true"] .hp-ico-play {
  display: block;
}

.hp-tool--round[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--hp-gold-2), var(--hp-gold));
  box-shadow: 0 8px 18px -10px rgba(243, 156, 18, 0.9);
}

/* ---------- Progress demo (elementi con data-demo) ---------- */

.hp-progress {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--hp-line);
}

.hp-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 22px;
}

.hp-progress-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--hp-ink);
  transition: color 0.2s ease;
}

.hp-progress-title.completed {
  color: var(--hp-ok);
}

.hp-progress-lesson {
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--hp-tint);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--hp-teal-700);
  white-space: nowrap;
}

.hp-progress-lesson:empty {
  display: none;
}

.hp-progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hp-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: rgba(16, 42, 67, 0.07);
}

.hp-progress-bar {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hp-teal), var(--hp-sky));
}

/* Pallino sul fronte di avanzamento, come nella demo originale */
.hp-progress-bar::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--hp-sky);
  box-shadow: 0 0 0 4px rgba(67, 170, 243, 0.2);
  transform: translateY(-50%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hp-progress-bar.completed {
  background: linear-gradient(90deg, var(--hp-ok), #3ccf7e);
}

.hp-progress-bar.completed::after {
  border-color: var(--hp-ok);
  box-shadow: 0 0 0 4px rgba(31, 157, 85, 0.18);
}

.hp-progress-pct {
  min-width: 38px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hp-teal-700);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.hp-progress-pct.completed {
  color: var(--hp-ok);
}

/* ---------- Elementi flottanti ---------- */

.hp-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--hp-shadow-lg), 0 0 0 1px var(--hp-line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Ferma (niente animazione): contiene l'interruttore cliccabile */
.hp-float--ext {
  top: 18px;
  right: -14px;
}

.hp-float--ext img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.hp-float--ext strong {
  display: block;
  font-size: 0.85rem;
  line-height: 1.25;
  color: var(--hp-ink);
}

.hp-float--ext span {
  font-size: 0.75rem;
  color: var(--hp-muted);
}

.hp-float--ext .hp-toggle {
  position: relative;
  width: 38px;
  height: 22px;
  margin-left: 6px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: var(--hp-teal);
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.hp-float--ext .hp-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.25s ease;
}

.hp-float--ext .hp-toggle[aria-checked="false"] {
  background: #bcccdc;
}

.hp-float--ext .hp-toggle[aria-checked="false"]::after {
  left: 2px;
}

/* Sporge a sinistra del mockup quanto la card dell'estensione a destra */
.hp-float--toast {
  bottom: 0;
  left: -6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--hp-ink);
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.hp-float--toast.is-visible {
  opacity: 1;
  transform: none;
}

.hp-toast-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--hp-ok);
  flex-shrink: 0;
}

.hp-toast-icon svg {
  width: 14px;
  height: 14px;
}

.hp-toast-info,
.hp-float--toast.is-info .hp-toast-ok {
  display: none;
}

.hp-float--toast.is-info .hp-toast-info {
  display: block;
  width: 11px;
  height: 11px;
}

.hp-float--toast.is-info .hp-toast-icon {
  background: #9fb3c8;
}

/* ---------- Demo: stati della slide durante dispense e paniere ---------- */

.hp-slide-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* La slide cambia a ogni lezione visitata dall'estensione */
.hp-slide.is-flip {
  animation: hp-flip 0.26s ease-out;
}

/* Durante la raccolta del paniere e il download delle dispense il grafico
   lascia posto al contatore e le righe della slide "si caricano" (effetto
   shimmer) */
.hp-slide.is-paniere .hp-slide-chart,
.hp-slide.is-dispense .hp-slide-chart {
  display: none;
}

.hp-slide.is-gather .hp-slide-body .hp-sk {
  background: linear-gradient(90deg, #dde7f0 25%, #f4f8fc 50%, #dde7f0 75%);
  background-size: 200% 100%;
  animation: hp-shimmer 1.1s linear infinite;
}

/* Contatore della raccolta: domande del paniere o dispense scaricate */
.hp-collect {
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 30%;
  aspect-ratio: 120 / 88;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  color: var(--hp-muted);
}

.hp-slide.is-paniere .hp-collect--paniere,
.hp-slide.is-dispense .hp-collect--dispense {
  display: flex;
}

/* Icona della dispensa nel rosa della riga "Dispensa" */
.hp-collect--dispense .hp-collect-list {
  background: #fceff1;
  color: #cf1d56;
}

.hp-collect--dispense .hp-collect-list svg {
  width: 15px;
  height: 15px;
}

.hp-collect-list {
  display: grid;
  place-items: center;
  width: 30px;
  height: 36px;
  margin-bottom: 2px;
  border-radius: 6px;
  background: var(--hp-tint);
  color: var(--hp-teal-700);
}

.hp-collect-list svg {
  width: 18px;
  height: 18px;
}

.hp-collect strong {
  font-family: var(--hp-display);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--hp-ink);
  font-variant-numeric: tabular-nums;
}

.hp-collect small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Demo: scorrimento non automatico (pausa o spento) ----------
   Colori spenti su slide, barra ed elenco lezioni, titolo in ambra:
   si deve capire a colpo d'occhio che non avanza da solo. */

.hp-mock.is-manual .hp-slide {
  filter: grayscale(0.9);
  opacity: 0.8;
}

.hp-mock.is-manual .hp-progress-title {
  color: #b25e00;
}

.hp-float--ext.is-off img {
  filter: grayscale(1);
  opacity: 0.55;
}

.hp-float--ext.is-off strong {
  color: var(--hp-muted);
}

/* Durante un'operazione gli altri bottoni non si possono usare */
.hp-tool-group.is-busy button.hp-tool:not(.is-busy):not(.is-done) {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- Demo: stato dell'estensione accanto ai bottoni ---------- */

.hp-mock-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.hp-status {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.hp-status .hp-progress-title {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-status-dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--hp-teal);
  animation: hp-pulse-teal 2s ease-out infinite;
}

.hp-mock.is-manual .hp-status-dot {
  background: #f5a524;
  animation: none;
}

.hp-tool-group {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  transition: opacity 0.3s ease, visibility 0.3s ease, translate 0.3s ease;
}

.hp-tool-group.is-hidden {
  opacity: 0;
  visibility: hidden;
  translate: 0 -4px;
}

/* ---------- Demo: contenuti del corso (come sulla piattaforma) ---------- */

.hp-course {
  border: 1px solid var(--hp-line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.hp-course-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #f7fafc;
  border-bottom: 1px solid var(--hp-line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hp-teal-700);
}

.hp-course-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-course-head svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--hp-muted);
}

/* L'elenco può scorrere in su (transform, impostato dallo script) per
   mostrare la riga "Dispensa", che sta sotto le lezioni fuori vista:
   .hp-course la taglia con overflow: hidden. L'animazione hp-flip usa
   translate, quindi le due cose non si disturbano. */
.hp-course-list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-course-list.is-flip {
  animation: hp-flip 0.26s ease-out;
}

.hp-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--hp-line);
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

.hp-item:last-child {
  border-bottom: 0;
}

.hp-item[hidden] {
  display: none;
}

/* Riga "Dispensa" come sulla piattaforma: icona del libro e bottone
   "Visualizza" nel rosa/magenta della piattaforma */
.hp-item--doc {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--hp-line);
  background: #fff;
}

.hp-item:has(+ .hp-item--doc) {
  border-bottom: 0;
}

/* Icona rosa in ogni stato: con quattro classi vince su .hp-item.is-done
   e .hp-item.is-loading, che vengono dopo */
.hp-course-list .hp-item.hp-item--doc .hp-item-icon {
  background: #fceff1;
  color: #cf1d56;
}

.hp-item--doc .hp-item-bar {
  visibility: hidden;
}

.hp-doc-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid #cf1d56;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  color: #cf1d56;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Download in corso: bottone premuto e barra con shimmer */
.hp-item--doc.is-loading .hp-item-bar {
  visibility: visible;
}

.hp-item--doc.is-loading .hp-doc-btn {
  background: #cf1d56;
  color: #fff;
}

.hp-item--doc.is-done .hp-doc-btn {
  border-color: var(--hp-ok);
  color: var(--hp-ok);
}

.hp-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f0f4f8;
  color: #9fb3c8;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.hp-item-icon svg {
  width: 13px;
  height: 13px;
}

.hp-item-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.hp-item-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-item-bar {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: #e3ebf2;
  overflow: hidden;
}

.hp-item-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hp-teal), var(--hp-sky));
}

.hp-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--hp-muted);
  font-variant-numeric: tabular-nums;
}

.hp-item-pct {
  min-width: 30px;
  text-align: right;
}

/* Lezione in corso: segno a sinistra, fondo appena colorato */
.hp-item.is-active {
  background: rgba(67, 170, 243, 0.05);
}

.hp-item.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--hp-teal);
}

.hp-item.is-active .hp-item-icon {
  background: var(--hp-tint);
  color: var(--hp-teal);
}

.hp-item.is-active .hp-item-pct {
  color: var(--hp-teal-700);
}

/* Lezione vista */
.hp-item.is-done .hp-item-icon {
  background: rgba(31, 157, 85, 0.12);
  color: var(--hp-ok);
}

.hp-item.is-done .hp-item-bar i {
  background: var(--hp-ok);
}

.hp-item.is-done .hp-item-pct {
  color: var(--hp-ok);
}

/* Raccolta di dispense e paniere: le lezioni del capitolo si caricano
   (barra con shimmer) e poi si spuntano */
.hp-item.is-loading .hp-item-icon {
  background: var(--hp-tint);
  color: var(--hp-teal);
}

.hp-item.is-loading .hp-item-bar i {
  background:
    linear-gradient(90deg, transparent 20%, rgba(67, 170, 243, 0.55) 50%, transparent 80%) 0 0 / 200% 100%,
    #e3ebf2;
  animation: hp-shimmer 0.9s linear infinite;
}

/* Pausa o scorrimento spento: la lezione in corso si spegne */
.hp-mock.is-manual .hp-item.is-active {
  background: #fffaf2;
}

.hp-mock.is-manual .hp-item.is-active::before {
  background: #f5a524;
}

.hp-mock.is-manual .hp-item.is-active .hp-item-icon {
  background: #f0f4f8;
  color: #9fb3c8;
}

.hp-mock.is-manual .hp-item.is-active .hp-item-bar i {
  background: linear-gradient(90deg, #9fb3c8, #bcccdc);
}

.hp-mock.is-manual .hp-item.is-active .hp-item-pct {
  color: #829ab1;
}

@keyframes hp-pulse-teal {
  0% { box-shadow: 0 0 0 0 rgba(15, 171, 188, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(15, 171, 188, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 171, 188, 0); }
}

/* ---------- Demo: download del PDF ---------- */

.hp-float--dl {
  right: -18px;
  bottom: 64px;
  z-index: 3;
  width: 250px;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hp-float--dl.is-visible {
  opacity: 1;
  transform: none;
}

.hp-dl-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hp-dl-name {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--hp-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hp-dl-state {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--hp-sky);
  border-top-color: transparent;
  animation: hp-spin 0.9s linear infinite;
}

.hp-float--dl.is-done .hp-dl-state {
  border: 0;
  background: var(--hp-ok) var(--hp-check) center / 11px no-repeat;
  animation: none;
}

.hp-dl-bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(16, 42, 67, 0.08);
  overflow: hidden;
}

.hp-dl-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hp-teal), var(--hp-sky));
}

.hp-float--dl.is-visible .hp-dl-bar i {
  width: 100%;
  transition: width 1s ease;
}

.hp-float--dl.is-done .hp-dl-bar i {
  background: linear-gradient(90deg, var(--hp-ok), #3ccf7e);
}

.hp-dl-pages {
  display: flex;
  justify-content: center;
  padding: 4px 0 2px;
}

.hp-dl-pages span {
  width: 40px;
  height: 52px;
  margin-left: -16px;
  border-radius: 4px;
  background:
    linear-gradient(#cfdbe6, #cfdbe6) 7px 8px / 55% 4px no-repeat,
    repeating-linear-gradient(#fff 0 6px, #e3ebf2 6px 8px) 7px 16px / 70% 28px no-repeat,
    #fff;
  border: 1px solid var(--hp-line-strong);
  box-shadow: var(--hp-shadow-sm);
}

.hp-dl-pages span:first-child {
  margin-left: 0;
  rotate: -6deg;
}

.hp-dl-pages span:last-child {
  rotate: 6deg;
}

.hp-dl-doc {
  padding: 10px 12px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--hp-line);
}

.hp-dl-doc .hp-doc-q {
  margin: 6px 0 4px;
}

.hp-dl-doc .hp-doc-opts li {
  padding: 3px 6px;
}

.hp-dl-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--hp-text);
  text-align: center;
}

.hp-dl-note strong {
  color: var(--hp-ink);
}

@keyframes hp-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes hp-flip {
  from { opacity: 0.3; translate: 10px 0; }
  to { opacity: 1; translate: 0 0; }
}

/* ---------- Compatibilità ---------- */

.hp-compat {
  max-width: 1200px;
  margin: clamp(24px, 3vw, 40px) auto 0;
  padding: 20px 0 8px;
  border-top: 1px solid var(--hp-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  font-size: 0.92rem;
  color: var(--hp-muted);
}

.hp-compat-label {
  margin-right: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--hp-line);
  font-weight: 600;
  color: var(--hp-ink);
}

.hp-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
}

.hp-compat-sep {
  width: 1px;
  height: 20px;
  margin: 0 6px;
  background: var(--hp-line-strong);
}

.hp-compat-os {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hp-compat-os i {
  font-size: 1rem;
  color: var(--hp-ink-soft);
}

/* ==========================================================================
   SEZIONI
   ========================================================================== */

.hp-section {
  position: relative;
  padding: clamp(28px, 3.5vw, 48px) var(--hp-gutter);
}

/* style.css dà sfondi a bande agli stessi id: qui lo sfondo è unico */
.hp #how,
.hp #demo,
.hp #testimonials,
.hp #features {
  background: transparent;
}

.hp-container {
  max-width: 1200px;
  margin: 0 auto;
}

.hp-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 780px;
  margin: 0 auto clamp(28px, 3.5vw, 44px);
  text-align: center;
}

/* ---------- Come funziona ---------- */

.hp-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.hp-step {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: var(--hp-radius);
  background: var(--hp-surface);
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hp-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--hp-shadow);
  border-color: rgba(15, 171, 188, 0.35);
}

/* Connettore tra le card */
.hp-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 54px;
  right: -21px;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, rgba(15, 171, 188, 0.6), rgba(67, 170, 243, 0.6));
}

.hp-step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.hp-step-num {
  font-family: var(--hp-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--hp-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hp-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--hp-tint);
  color: var(--hp-teal-700);
}

.hp-step-icon svg {
  width: 22px;
  height: 22px;
}

.hp-step h3 {
  font-family: var(--hp-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hp-ink);
  margin: 0 0 8px;
}

.hp-step p {
  margin: 0 0 22px;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--hp-text);
}

.hp-step p:last-child {
  margin-bottom: 0;
}

.hp-step-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f7d89, #1d6fb8);  /* scuro: testo bianco a 4,9:1 */
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 8px 20px -10px rgba(47, 143, 216, 0.8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hp-step-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.hp-step-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(47, 143, 216, 0.9);
}

.hp-step-link:hover svg {
  transform: translateX(3px);
}

/* Barra di scorrimento in fondo alla card "Rilassati" */
.hp-progress--step {
  margin-top: auto;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid var(--hp-line);
  border-radius: 0;
  background: none;
}

/* ---------- Video ---------- */

.hp-video {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
}

.hp-video-glow {
  position: absolute;
  inset: 12% 6% -4%;
  border-radius: 48px;
  background: var(--hp-grad);
  filter: blur(72px);
  opacity: 0.3;
  pointer-events: none;
}

.hp-video-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--hp-shadow-lg), 0 0 0 1px var(--hp-line);
}

.hp-video-frame .hp-mock-bar {
  background: #fff;
}

.hp-video-frame video {
  display: block;
  width: 100%;
  background: #000;
}

/* ---------- Paniere e dispense ---------- */

.hp-extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto;
}

.hp-extra {
  display: flex;
  flex-direction: column;
  border-radius: var(--hp-radius);
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hp-extra:hover {
  transform: translateY(-4px);
  box-shadow: var(--hp-shadow);
}

.hp-extra-visual {
  position: relative;
  display: flex;
  justify-content: center;
  height: 280px;
  padding: 34px 28px 0;
  overflow: hidden;
  border-bottom: 1px solid var(--hp-line);
  background:
    radial-gradient(70% 80% at 15% 0%, rgba(67, 170, 243, 0.16), transparent 70%),
    radial-gradient(60% 70% at 100% 100%, rgba(15, 171, 188, 0.14), transparent 70%),
    #f2f7fc;
}

.hp-tool--float {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 2;
  padding: 9px 15px;
  font-size: 0.82rem;
  box-shadow: 0 14px 28px -12px rgba(15, 171, 188, 0.9);
  animation: hp-bob 6s ease-in-out infinite;
}

.hp-pdf {
  flex-shrink: 0;
  padding: 4px 6px;
  border-radius: 5px;
  background: #e5484d;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
}

/* Pagina del paniere con altri fogli dietro */
.hp-doc-stack {
  position: relative;
  width: min(320px, 86%);
  align-self: flex-start;
  -webkit-mask-image: linear-gradient(#000 72%, transparent);
  mask-image: linear-gradient(#000 72%, transparent);
}

.hp-doc-page {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
}

.hp-doc-page:nth-child(1) {
  rotate: 5deg;
  translate: 16px 8px;
  opacity: 0.7;
}

.hp-doc-page:nth-child(2) {
  rotate: 2.5deg;
  translate: 8px 4px;
}

.hp-doc {
  position: relative;
  padding: 18px 20px 24px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow);
}

.hp-doc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--hp-line);
}

.hp-doc-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--hp-ink);
}

.hp-doc-chapter {
  display: block;
  margin-bottom: 6px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hp-teal-700);
}

.hp-doc-q {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 6px;
  font-size: 0.78rem;
  color: var(--hp-ink);
}

.hp-doc-q .hp-sk {
  flex: 1;
  background: #cfdbe6;
}

.hp-doc-q .hp-sk--mid {
  flex: 0 1 70%;
}

.hp-doc-opts {
  list-style: none;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0 0 0 16px;
}

.hp-doc-opts li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 7px;
}

.hp-doc-opts li .hp-sk {
  width: 80%;
}

.hp-doc-opts li .hp-sk--short {
  width: 55%;
}

.hp-doc-opts li .hp-sk--mid {
  width: 65%;
}

.hp-doc-opts i {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(16, 42, 67, 0.22);
}

.hp-doc-opts li.is-right {
  background: rgba(31, 157, 85, 0.1);
}

.hp-doc-opts li.is-right i {
  width: 14px;
  height: 14px;
  border: 0;
  background: var(--hp-ok) var(--hp-check) center / 9px no-repeat;
}

.hp-doc-opts li.is-right .hp-sk {
  background: rgba(31, 157, 85, 0.3);
}

/* Download delle dispense */
.hp-dl {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hp-seg {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  font-size: 0.78rem;
  font-weight: 700;
}

.hp-seg span {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--hp-muted);
  transition: color 0.3s ease;
}

.hp-seg .is-on {
  background: linear-gradient(135deg, var(--hp-teal), var(--hp-sky));
  color: #fff;
}

.hp-files {
  list-style: none;
  width: 100%;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.hp-files li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--hp-ink);
  transition: translate 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

/* Le righe hanno tutte la barra, visibile solo durante il download:
   è posizionata sotto il nome, così l'altezza della riga non cambia */
.hp-file-name {
  position: relative;
  min-width: 0;
  white-space: nowrap;
  overflow: visible;
}

.hp-file-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.hp-file-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 4px;
  border-radius: 99px;
  background: rgba(16, 42, 67, 0.08);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hp-file-bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hp-teal), var(--hp-sky));
  transform: scaleX(0);
  transform-origin: left;
}

.hp-file-state {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #d9e2ec;
}

.hp-files li:not(.is-done):not(.is-loading) .hp-file-title {
  color: var(--hp-muted);
}

.hp-files li.is-loading .hp-file-bar {
  opacity: 1;
}

/* La durata del riempimento arriva dal JS (--hp-dl-ms) */
.hp-files li.is-loading .hp-file-bar i {
  transform: scaleX(1);
  transition: transform var(--hp-dl-ms, 1s) linear;
}

/* A download finito la barra resta piena mentre svanisce */
.hp-files li.is-done .hp-file-bar i {
  transform: scaleX(1);
}

.hp-files li.is-done .hp-file-state {
  border: 0;
  background: var(--hp-ok) var(--hp-check) center / 11px no-repeat;
}

.hp-files li.is-loading .hp-file-state {
  border-color: var(--hp-sky);
  border-top-color: transparent;
  animation: hp-spin 0.9s linear infinite;
}

/* "PDF unito": le altre righe scivolano sotto la prima e spariscono */
.hp-files.is-merged li:nth-child(2) {
  translate: 0 calc(-100% - 8px);
  opacity: 0;
}

.hp-files.is-merged li:nth-child(3) {
  translate: 0 calc(-200% - 16px);
  opacity: 0;
}

.hp-files.is-merged li:first-child {
  position: relative;
  z-index: 1;
}

.hp-extra-copy {
  padding: 24px 28px 28px;
}

.hp-extra-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--hp-gold-2), var(--hp-gold));
  font-size: 0.76rem;
  font-weight: 700;
  color: #2b1a00;
}

.hp-extra h3 {
  margin: 0 0 8px;
  font-family: var(--hp-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hp-ink);
}

.hp-extra p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--hp-text);
}

/* ---------- Piani ---------- */

/* L'ancora #pricing (bottone "Vai ai piani", menu "Piani") deve mostrare
   titolo, card e bottoni: la sezione ha poco padding sopra (lo spazio
   passa alla sezione precedente) e si ferma sotto la navbar. `.hp #pricing`
   batte la regola `#pricing { scroll-margin-top: 80px }` di style.css. */
.hp #pricing {
  scroll-margin-top: 56px;
  padding-top: 14px;
}

.hp #extra {
  padding-bottom: clamp(44px, 5.5vw, 82px);
}

.hp-pricing .hp-head {
  gap: 8px;
  margin-bottom: clamp(16px, 1.5vw, 20px);
}

/* Domanda frequente: i piani non sono abbonamenti */
.hp-once {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
  color: var(--hp-text);
}

.hp-once i {
  color: var(--hp-ok);
}

.hp-once strong {
  color: var(--hp-ink);
}

/* Nell'hero sta dentro .hp-hero-cta (a capo sotto i bottoni), così non
   altera la sequenza di entrata dei figli di .hp-hero-text */
.hp-once--hero {
  flex-basis: 100%;
  margin-top: 4px;
  font-size: 0.92rem;
}

/* Fascia azzurra con bagliori: teal a sinistra, oro dietro il Premium */
.hp-pricing {
  background:
    radial-gradient(34% 46% at 20% 58%, rgba(15, 171, 188, 0.12), transparent 70%),
    radial-gradient(30% 44% at 80% 50%, rgba(243, 156, 18, 0.1), transparent 70%),
    radial-gradient(46% 36% at 50% 28%, rgba(67, 170, 243, 0.12), transparent 70%),
    linear-gradient(180deg, var(--hp-bg) 0%, #eaf3fa 20%, #eaf3fa 80%, var(--hp-bg) 100%);
}

.hp-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  max-width: 1080px;
  margin: 0 auto;
}

/* Ogni piano ha il suo colore, come nella versione originale:
   Express ardesia, Sprint teal→blu, Premium oro. Le card sono tutte
   bianche: il colore sta nel bordo a gradiente, nelle spunte e nel bottone. */
.hp-plan {
  --hp-accent: linear-gradient(135deg, #9fb3c8, #627d98);
  --hp-border: linear-gradient(160deg, #d9e2ec, #bcccdc);
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 26px;
  border-radius: var(--hp-radius);
  border: 1.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--hp-border) border-box;
  box-shadow: var(--hp-shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hp-plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--hp-shadow);
}

.hp-plan-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f0f4f8;
  font-size: 0.8rem;
  font-weight: 700;
  color: #486581;
}

.hp-plan-name {
  font-family: var(--hp-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hp-ink);
  margin: 0 0 4px;
}

.hp-plan-desc {
  margin: 0 0 12px;
  font-size: 0.98rem;
  color: var(--hp-muted);
}

.hp-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 0 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--hp-line-strong);
}

.hp-price strong {
  font-family: var(--hp-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--hp-ink);
}

.hp-price del {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--hp-muted);
  text-decoration-thickness: 1.5px;
}

.hp-promo {
  align-self: center;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff1e6;
  border: 1px solid rgba(249, 115, 22, 0.3);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #c2410c;
  white-space: nowrap;
}

.hp-perday {
  flex-basis: 100%;
  font-size: 0.88rem;
  font-weight: 600;
  color: #b25e00;
}

.hp-plan-list {
  list-style: none;
  flex-grow: 1;
  display: grid;
  align-content: start;
  gap: 9px;
  margin: 0 0 18px;
  padding: 0;
}

.hp-plan-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.97rem;
  color: var(--hp-ink-soft);
}

.hp-plan-list li::before {
  content: '';
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  background-image: var(--hp-check), var(--hp-accent);
  background-size: 11px, cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hp-plan-list li.is-featured {
  font-weight: 600;
  color: var(--hp-ink);
}

.hp-plan-list li.is-pdf::before {
  background-size: 12px, cover;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='9' y1='13' x2='15' y2='13'/%3E%3Cline x1='9' y1='17' x2='13' y2='17'/%3E%3C/svg%3E"), var(--hp-accent);
}

.hp-plan-list li.is-download::before {
  background-size: 12px, cover;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v12'/%3E%3Cpolyline points='7 11 12 16 17 11'/%3E%3Cline x1='6' y1='20' x2='18' y2='20'/%3E%3C/svg%3E"), var(--hp-accent);
}

.hp-btn--plan {
  width: 100%;
  min-height: 52px;
}

/* Express: ardesia, bottone chiaro */
.hp-plan--express .hp-btn--plan {
  background: #fff;
  color: var(--hp-ink);
  border: 1.5px solid #bcccdc;
}

.hp-plan--express .hp-btn--plan:hover {
  background: #f5f8fb;
  border-color: #829ab1;
}

/* Sprint: teal→blu */
.hp-plan--sprint {
  --hp-accent: linear-gradient(135deg, var(--hp-teal), var(--hp-sky));
  --hp-border: linear-gradient(135deg, var(--hp-teal), var(--hp-sky));
  box-shadow: 0 18px 40px -24px rgba(15, 171, 188, 0.6);
}

.hp-plan--sprint .hp-plan-badge {
  background: rgba(15, 171, 188, 0.1);
  color: var(--hp-teal-700);
}

.hp-plan--sprint .hp-btn--plan {
  background: linear-gradient(135deg, #0f7d89, #1d6fb8);  /* scuro: testo bianco a 4,9:1 */
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
  box-shadow: 0 12px 26px -12px rgba(47, 143, 216, 0.8);
}

.hp-plan--sprint .hp-btn--plan:hover {
  box-shadow: 0 16px 32px -12px rgba(47, 143, 216, 0.95);
}

/* Premium: oro, in evidenza (bordo più spesso, alone, card sollevata) */
.hp-plan--premium {
  --hp-accent: linear-gradient(135deg, var(--hp-gold-2), var(--hp-gold));
  border-width: 2px;
  background:
    radial-gradient(90% 40% at 50% 0%, rgba(241, 196, 15, 0.16), transparent 75%) padding-box,
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(150deg, var(--hp-gold-2), var(--hp-gold) 55%, #e67e22) border-box;
  box-shadow: 0 0 0 6px rgba(243, 156, 18, 0.1), 0 26px 50px -22px rgba(243, 156, 18, 0.6);
  transform: translateY(-8px);
}

.hp-plan--premium:hover {
  transform: translateY(-12px);
  box-shadow: 0 0 0 6px rgba(243, 156, 18, 0.14), 0 32px 60px -22px rgba(243, 156, 18, 0.7);
}

.hp-plan--premium .hp-plan-badge {
  background: linear-gradient(135deg, var(--hp-gold-2), var(--hp-gold));
  color: #3d2800;
  box-shadow: 0 6px 14px -6px rgba(243, 156, 18, 0.8);
}

.hp-plan--premium .hp-btn--plan {
  background: linear-gradient(135deg, var(--hp-gold-2), var(--hp-gold) 60%, #ee8a1c);
  color: #3d2800;
  box-shadow: 0 14px 30px -12px rgba(243, 156, 18, 0.9);
}

.hp-plan--premium .hp-btn--plan:hover {
  box-shadow: 0 18px 38px -12px rgba(243, 156, 18, 1);
}

.hp-pay {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.hp-pay-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  font-size: 0.88rem;
  color: var(--hp-text);
}

.hp-pay-item i {
  color: var(--hp-teal-700);
}

.hp-pay-item .hp-pay-brand {
  font-size: 1.35rem;
  color: var(--hp-ink);
}

.hp-promo-note {
  width: fit-content;
  margin: 14px auto 0;
  padding: 8px 16px;
  border-radius: 999px;
  background: #fff1e6;
  border: 1px solid rgba(249, 115, 22, 0.25);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #c2410c;
}

.hp-promo-note i {
  margin-right: 6px;
}

/* ---------- Testimonianze ---------- */

.hp-quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.hp-quote {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
  padding: 32px 32px 28px;
  border-radius: var(--hp-radius);
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hp-quote:hover {
  transform: translateY(-4px);
  box-shadow: var(--hp-shadow);
}

.hp-quote-mark {
  display: block;
  height: 44px;
  margin-bottom: -12px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 6rem;
  font-weight: 700;
  line-height: 0.9;
  background: var(--hp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hp-quote blockquote {
  position: relative;
  margin: 0;
  font-family: var(--hp-display);
  font-size: clamp(1.3rem, 1.05rem + 0.8vw, 1.7rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--hp-ink);
}

.hp-quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  font-size: 0.92rem;
  color: var(--hp-muted);
}

.hp-quote figcaption strong {
  display: block;
  font-size: 1rem;
  color: var(--hp-ink);
}

.hp-quote-avatar {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--hp-teal), var(--hp-sky));
}

/* Fonte delle citazioni + link alle recensioni del Chrome Web Store */
.hp-quotes-fonte {
  max-width: 1000px;
  margin: 20px auto 0;
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
  color: var(--hp-muted);
}

.hp-quotes-fonte a {
  display: inline-block;
  margin-left: 4px;
  font-weight: 600;
  color: var(--hp-teal-700);
  text-decoration: none;
}

.hp-quotes-fonte a:hover {
  text-decoration: underline;
}

/* ---------- Bento vantaggi ---------- */

.hp-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.hp-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 228px;
  padding: 28px;
  border-radius: var(--hp-radius);
  background: #fff;
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hp-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--hp-shadow);
  border-color: rgba(15, 171, 188, 0.3);
}

.hp-tile-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--hp-tint);
  color: var(--hp-teal-700);
  font-size: 1.25rem;
}

.hp-tile h3 {
  margin: auto 0 8px;
  padding-top: 28px;
  font-family: var(--hp-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hp-ink);
}

.hp-tile p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--hp-text);
}

.hp-tile--auto {
  grid-column: span 2;
  grid-row: span 2;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 32px;
  background:
    radial-gradient(80% 70% at 100% 100%, rgba(67, 170, 243, 0.16), transparent 60%),
    radial-gradient(60% 60% at 0% 0%, rgba(15, 171, 188, 0.12), transparent 60%),
    #fff;
}

.hp-tile--auto h3 {
  margin-top: 0;
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.25rem);
  letter-spacing: -0.022em;
}

.hp-tile--auto p {
  max-width: 38ch;
  font-size: 1.08rem;
}

.hp-autolist {
  align-self: end;
  width: 100%;
  display: grid;
  gap: 12px;
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--hp-line);
  box-shadow: var(--hp-shadow-sm);
}

.hp-autorow {
  display: grid;
  grid-template-columns: 78px 1fr 22px;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--hp-ink-soft);
}

.hp-autorow-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(16, 42, 67, 0.07);
  overflow: hidden;
}

.hp-autorow-track i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hp-teal), var(--hp-sky));
  transform-origin: left;
  animation: hp-fill 8s ease-in-out infinite both;
}

.hp-autorow-ok {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--hp-ok) var(--hp-check) center / 12px no-repeat;
  animation: hp-pop 8s ease infinite both;
}

.hp-autorow:nth-child(2) i,
.hp-autorow:nth-child(2) .hp-autorow-ok { animation-delay: 0.8s; }
.hp-autorow:nth-child(3) i,
.hp-autorow:nth-child(3) .hp-autorow-ok { animation-delay: 1.6s; }
.hp-autorow:nth-child(4) i,
.hp-autorow:nth-child(4) .hp-autorow-ok { animation-delay: 2.4s; }

.hp-infinity {
  font-family: var(--hp-display);
  font-size: 4.6rem;
  font-weight: 800;
  line-height: 0.62;
  background: var(--hp-grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Tile CTA: gradiente animato originale su uno strato a parte, così
   l'animazione di comparsa (.hp-reveal) non lo sovrascrive */
.hp-tile--cta {
  isolation: isolate;
  border: 0;
  background: transparent;
  color: #fff;
}

.hp-tile--cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hp-grad-brand);
  background-size: 300% 300%;
  animation: hp-gradient 8s ease infinite;
}

.hp-tile--cta:hover {
  border-color: transparent;
  box-shadow: 0 24px 50px -20px rgba(15, 171, 188, 0.8);
}

.hp-tile--cta h3,
.hp-tile--cta p {
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

.hp-tile--cta h3 {
  font-size: 1.75rem;
  letter-spacing: -0.022em;
}

.hp-tile--cta p {
  font-weight: 600;
}

.hp-tile-arrow {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--hp-teal-700);
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease;
}

.hp-tile-arrow svg {
  width: 20px;
  height: 20px;
}

.hp-tile--cta:hover .hp-tile-arrow {
  transform: rotate(-45deg);
}

/* ---------- CTA finale: lo stile del vecchio hero ---------- */

.hp-final {
  padding: clamp(28px, 3.5vw, 48px) var(--hp-gutter) clamp(48px, 6vw, 80px);
}

.hp-final-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 64px);
  border-radius: 32px;
  color: #fff;
  text-align: center;
}

/* Gradiente animato, come l'hero dei gruppi studio (.hero in style.css) */
.hp-final-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--hp-grad-brand);
  background-size: 400% 400%;
  animation: hp-gradient 10s ease infinite;
}

.hp-final-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 50%, #000 10%, transparent 75%);
}

.hp-final-card .hp-h2 {
  margin: 22px 0 14px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hp-final-card p {
  max-width: 46ch;
  margin: 0 0 32px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hp-proof--pill {
  margin: 0;
  padding: 7px 16px 7px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.15);
  color: var(--hp-text);
}

.hp-proof--pill .hp-avatars span {
  border-color: #fff;
}

/* ==========================================================================
   ANIMAZIONI
   ========================================================================== */

@keyframes hp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 232, 158, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(52, 232, 158, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 232, 158, 0); }
}

@keyframes hp-aurora {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-4%, 3%, 0) scale(1.08); }
}

@keyframes hp-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes hp-spin {
  to { transform: rotate(360deg); }
}

@keyframes hp-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

@keyframes hp-fill {
  0% { transform: scaleX(0); }
  30%, 86% { transform: scaleX(1); opacity: 1; }
  96% { transform: scaleX(1); opacity: 0; }
  100% { transform: scaleX(0); opacity: 0; }
}

@keyframes hp-pop {
  0%, 28% { transform: scale(0); }
  33% { transform: scale(1.18); }
  38%, 86% { transform: scale(1); opacity: 1; }
  96%, 100% { transform: scale(0.6); opacity: 0; }
}

@keyframes hp-rise {
  from { opacity: 0; translate: 0 24px; }
  to { opacity: 1; translate: 0 0; }
}

/* Entrata dell'hero al caricamento */
@media (prefers-reduced-motion: no-preference) {
  .hp-hero-text > * {
    animation: hp-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .hp-hero-text > :nth-child(2) { animation-delay: 0.06s; }
  .hp-hero-text > :nth-child(3) { animation-delay: 0.12s; }
  .hp-hero-text > :nth-child(4) { animation-delay: 0.18s; }
  .hp-hero-text > :nth-child(5) { animation-delay: 0.24s; }

  .hp-hero-visual {
    animation: hp-rise 0.9s 0.15s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
}

/* Comparsa allo scroll con le scroll-driven animations di Chrome.
   Si anima `translate` (non `transform`) per non annullare gli hover. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hp-reveal {
      animation: hp-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hp *,
  .hp *::before,
  .hp *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
  .hp-mock {
    transform: none;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .hp-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-tile--auto {
    grid-column: span 2;
    grid-row: auto;
  }
}

/* Due colonne ma mockup stretto: in basso non c'è posto per il toast e
   per il suggerimento sotto i bottoni, il toast sale in alto a sinistra */
@media (min-width: 901px) and (max-width: 1279px) {
  .hp-float--toast {
    top: 82px;
    bottom: auto;
  }
}

@media (max-width: 900px) {
  .hp-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-hero-visual {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
  }

  .hp-mock,
  .hp-hero-visual:hover .hp-mock {
    transform: none;
  }

  .hp-steps,
  .hp-quotes,
  .hp-extras {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-extras {
    max-width: 560px;
  }

  .hp-step:not(:last-child)::after {
    display: none;
  }

  .hp-plans {
    grid-template-columns: minmax(0, 1fr);
    max-width: 460px;
  }

  .hp-plan--premium,
  .hp-plan--premium:hover {
    transform: none;
  }
}

@media (max-width: 640px) {
  .hp-bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-tile--auto {
    grid-column: auto;
  }

  .hp-tile {
    min-height: 0;
  }

  .hp-hero-cta .hp-btn {
    width: 100%;
    gap: 8px;
    font-size: 0.96rem;
  }

  .hp-hero-cta .hp-btn--primary {
    padding-right: 16px;
  }

  .hp-btn-chrome {
    width: 34px;
    height: 34px;
  }

  .hp-eyebrow--pill {
    font-size: 0.8rem;
  }

  .hp-proof span {
    white-space: nowrap;
  }

  .hp-proof--pill .hp-avatars span {
    width: 28px;
    height: 28px;
    margin-left: -9px;
  }

  .hp-proof--pill .hp-avatars span:first-child {
    margin-left: 0;
  }

  /* Su mobile la card flottante copre l'angolo in alto: il suggerimento
     va sotto il mockup, il toast sale sopra di lui */
  .hp-hero-visual {
    display: flex;
    flex-direction: column;
    padding: 36px 0 8px;
  }

  .hp-demo-hint {
    position: static;
    order: 2;
    align-self: flex-end;
    max-width: 100%;
    margin-top: 12px;
  }

  .hp-demo-coach,
  .hp-demo-cta {
    white-space: normal;
  }

  .hp-float--toast {
    top: 64px;
    bottom: auto;
  }

  .hp-float--ext {
    top: 0;
    right: 0;
  }

  .hp-float--toast {
    left: 0;
  }

  .hp-mock-body {
    padding: 14px;
    gap: 10px;
  }

  .hp-slide {
    height: 124px;
    padding: 12px 14px;
  }

  .hp-float--dl {
    right: 0;
    bottom: 64px;
    width: min(250px, 80%);
  }

  .hp-status {
    flex-basis: 100%;
  }

  .hp-item {
    gap: 8px;
    padding: 7px 10px;
  }

  .hp-compat-sep {
    display: none;
  }

  .hp-compat-os {
    flex-basis: 100%;
    justify-content: center;
  }

  .hp-step,
  .hp-plan,
  .hp-tile,
  .hp-quote {
    padding: 24px 22px;
  }

  .hp-extra-visual {
    height: 250px;
    padding: 30px 18px 0;
  }

  .hp-tool--float {
    top: auto;
    bottom: 22px;
    right: 16px;
  }

  .hp #pricing {
    scroll-margin-top: 53px;
  }

  .hp-extra-copy {
    padding: 22px;
  }

  .hp-step-top {
    margin-bottom: 20px;
  }

  .hp-autorow {
    grid-template-columns: 68px 1fr 22px;
    gap: 10px;
  }
}
