/* ==========================================================================
   Opscadia — landing cinematica (HTML/CSS/JS statico)
   Tema scuro, sequenza video a tutta pagina con cross-fade allo scroll.
   ========================================================================== */

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

:root {
  --container: 1280px;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  background: #000;
  color: #fff;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

/* ----- Scrollbar custom bianco/grigio chiaro ----- */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.6) #f5f5f7;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f5f5f7;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 9999px;
  border: 2px solid #f5f5f7;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.75);
}

::-webkit-scrollbar-corner {
  background: #f5f5f7;
}

.ic {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

/* ----- Barra di avanzamento scroll ----- */
.progress-track {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: 2px;
  z-index: 60;
  background: rgba(255, 255, 255, 0.05);
}
.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(to right, #6366f1, #8b5cf6, #a855f7);
  transition: width 0.15s ease-out;
}

/* ----- Sfondo video cinematico fisso ----- */
.video-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
  transition: filter 1s ease, transform 1s ease;
}
.video-stage--blur-out {
  filter: blur(32px) saturate(0.2);
  transform: scale(1.14);
}
.video-stage__fallback {
  position: absolute;
  inset: 0;
  background: radial-gradient(125% 120% at 50% 0%, #1b1038 0%, #0b0b14 55%, #000 100%);
}
.video-stage__clip {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}
.video-stage__clip.is-active {
  opacity: 1;
}
.video-stage__clip--ferro {
  background: #000;
}
.video-stage__clip--ferro canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.video-stage__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.video-stage__scrim--linear {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.6));
}
.video-stage__scrim--radial {
  background: radial-gradient(140% 90% at 50% 115%, rgba(0, 0, 0, 0.65), transparent 55%);
}

/* ----- Header / navigazione ----- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  padding: 0.875rem 1.25rem 0;
  pointer-events: none;
}
.site-header__inner {
  max-width: 62rem;
  margin: 0 auto;
  height: 3.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.5rem 0 0.875rem;
  border-radius: 9999px;
  background: rgba(8, 8, 14, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(48px) saturate(1.9) brightness(1.08);
  backdrop-filter: blur(48px) saturate(1.9) brightness(1.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  pointer-events: all;
  transition: background-color 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.site-header.is-scrolled .site-header__inner {
  background: rgba(6, 6, 12, 0.28);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  padding: 0;
}
.brand__chip {
  display: grid;
  place-items: center;
}
.brand__mark {
  width: 1.5rem;
  height: 1.5rem;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.55));
}
.brand__mark--sm {
  width: 1rem;
  height: 1rem;
  filter: none;
}
.brand__name {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-header__nav {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 0.125rem;
}
.nav-link {
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 0.4375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link--active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.site-header__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}
.site-header__actions .scada-link {
  display: none;
}
.header-auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.search-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  transition: background-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.search-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.search-btn__search,
.search-btn__close {
  width: 1rem;
  height: 1rem;
  flex: none;
}
.search-btn__close { display: none; }
.search-btn.is-active .search-btn__search { display: none; }
.search-btn.is-active .search-btn__close  { display: block; }

/* ----- Header search bar ----- */
.header-search {
  display: none;
  position: relative;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0.375rem;
  padding: 0 0.75rem 0 0.875rem;
  height: 2.125rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: border-color 0.2s;
}
.header-search.is-active {
  display: flex;
  animation: search-in 0.2s ease;
}
@keyframes search-in {
  from { opacity: 0; transform: scaleX(0.92); }
  to   { opacity: 1; transform: scaleX(1); }
}
.header-search:focus-within {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(255, 255, 255, 0.1);
}
.header-search__ic {
  width: 0.9375rem;
  height: 0.9375rem;
  flex: none;
  color: rgba(255, 255, 255, 0.4);
}
.header-search__input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font: inherit;
  font-size: 0.875rem;
  color: #fff;
  min-width: 0;
}
.header-search__input::placeholder { color: rgba(255, 255, 255, 0.35); }
.header-search__input::-webkit-search-cancel-button { display: none; }
.header-search__close {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.6);
  transition: background-color 0.2s, color 0.2s;
}
.header-search__close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.header-search__close svg {
  width: 0.75rem;
  height: 0.75rem;
}
.header-search__results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  background: #1a1828;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 0.875rem;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* ----- FAQ search results (shared by mobile menu + desktop header search) ----- */
.mm-faq-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-decoration: none;
  display: block;
}
.mm-faq-item:last-child { border-bottom: none; }
.mm-faq-item__q {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.35;
}
.mm-faq-item__a {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.2rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mm-faq-item:hover .mm-faq-item__q { color: #c4b5fd; }
.mm-faq-item--article .mm-faq-item__q::before {
  content: 'Blog';
  display: inline-block;
  margin-right: 0.4rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.16);
  border-radius: 9999px;
  vertical-align: middle;
}
.mm-faq-empty {
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.38);
  text-align: center;
}

.btn--pill {
  border-radius: 9999px;
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.menu-toggle:hover .menu-toggle__bar {
  background: rgba(255, 255, 255, 0.75);
}
.menu-toggle__bar {
  display: block;
  width: 1.25rem;
  height: 2px;
  border-radius: 9999px;
  background: #fff;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease;
  transform-origin: center;
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu {
  max-width: 62rem;
  margin: 0.375rem auto 0;
  border-radius: 1.5rem;
  background: rgba(8, 8, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  padding: 0.625rem;
  pointer-events: all;
}
.mobile-menu[hidden] {
  display: none;
}
.mobile-menu__link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: background-color 0.2s, color 0.2s;
}
.mobile-menu__link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.mobile-menu__cta {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ----- Navigazione laterale a punti (desktop) ----- */
.scene-dots {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.scene-dot {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
}
.scene-dot__bar {
  display: block;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.3);
  transition: width 0.3s, background-color 0.3s;
}
.scene-dot:hover .scene-dot__bar {
  background: rgba(255, 255, 255, 0.6);
}
.scene-dot.is-active .scene-dot__bar {
  width: 1.5rem;
  background: var(--dot, #fff);
}

/* ----- Colori per scena (--accent) ----- */
[data-index="0"]  { --accent: #8b5cf6; }
[data-index="1"]  { --accent: #6366f1; }
[data-index="2"]  { --accent: #8b5cf6; }
[data-index="3"]  { --accent: #3b82f6; }
[data-index="4"]  { --accent: #3b82f6; }
[data-index="5"]  { --accent: #6366f1; }
[data-index="6"]  { --accent: #8b5cf6; }
[data-index="7"]  { --accent: #a855f7; }
[data-index="8"]  { --accent: #ef4444; }
[data-index="9"]  { --accent: #f59e0b; }
[data-index="10"] { --accent: #8b5cf6; }

/* ----- Colori chip (--chip) ----- */
.chip--green  { --chip: #22c55e; }
.chip--red    { --chip: #ef4444; }
.chip--blue   { --chip: #3b82f6; }
.chip--amber  { --chip: #f59e0b; }
.chip--purple { --chip: #a855f7; }
.chip--cyan   { --chip: #06b6d4; }
.chip--orange { --chip: #f97316; }
.chip--teal   { --chip: #14b8a6; }
.chip--slate  { --chip: #94a3b8; }
.chip--lime   { --chip: #84cc16; }

/* ----- Sezioni scena ----- */
.scenes {
  position: relative;
  z-index: 10;
}
.scene {
  position: relative;
  display: flex;
  align-items: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.scene__container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  /* padding-top sposta il centro visivo verso l'alto per compensare l'header fisso */
  padding: 4rem 1.25rem 1.5rem;
}
.scene__container--center {
  text-align: center;
  padding-top: 0;
  padding-bottom: 0;
}
.scene__content {
  position: relative;
  max-width: 56rem;
}
.scene__container--center .scene__content {
  max-width: 56rem;
  margin-inline: auto;
}

/* Reveal allo scroll: attivo solo quando JS è disponibile. */
.js .scene__content {
  opacity: 0;
  transform: translateY(2rem);
  filter: blur(3px);
  transition: opacity 0.7s ease, transform 0.7s ease, filter 0.7s ease;
}
.scene--active .scene__content {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ── BlurText: animazione parola per parola sui scene__title ── */
@keyframes blurWordIn {
  from { filter: blur(10px); opacity: 0; transform: translateY(3px); }
  to   { filter: blur(0px);  opacity: 1; transform: translateY(0); }
}
.blur-word {
  display: inline-block;
  opacity: 0;
}
.blur-word.is-animating {
  animation: blurWordIn 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
@media (prefers-reduced-motion: reduce) {
  .blur-word.is-animating {
    animation: none;
    opacity: 1;
    filter: none;
  }
}

.scene__halo {
  position: absolute;
  top: -6rem;
  left: -4rem;
  z-index: -1;
  width: 20rem;
  height: 20rem;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  filter: blur(90px);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  color: rgba(216, 180, 254, 0.9);
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
}
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .badge {
    color: color-mix(in srgb, var(--accent) 55%, white);
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  }
}

.scene__title {
  margin: 1.25rem 0 0;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
.scene__hero-title {
  margin: 1.5rem 0 0;
  font-size: clamp(3.5rem, 11vw, 6rem);
  font-weight: 800;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}
.gradient-text {
  background: linear-gradient(135deg, #ffffff, #ddd6fe 45%, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 24px rgba(139, 92, 246, 0.35));
}
.scene__subtitle {
  margin: 1rem 0 0;
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  font-weight: 600;
  color: #fff;
}
.scene__body {
  margin: 1.25rem 0 0;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  text-wrap: pretty;
}
.scene__container:not(.scene__container--center) .scene__body {
  max-height: 40vh;
  overflow: hidden;
}

.chips {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.scene__container--center .chips {
  justify-content: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  color: color-mix(in srgb, var(--chip) 60%, white);
  background: color-mix(in srgb, var(--chip) 16%, transparent);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-color: color-mix(in srgb, var(--chip) 35%, transparent);
}
.chip__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--chip);
}

.scene__cta {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 0.75rem;
  /* senza questo i bottoni si stirano per tutta la colonna di testo */
  align-items: flex-start;
}
.scene__container--center .scene__cta {
  align-items: center;
}

/* CTA "filo": un piccolo trefolo animato che collega il testo al bottone,
   a richiamo del claim "un solo filo" e del video cable-into-plc in loop. */
.scene__cta--wired {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}
.scene__wire {
  position: relative;
  width: 2.5rem;
  height: 2px;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.scene__wire::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-100%);
  animation: scene-wire-flow 2.4s linear infinite;
}
@keyframes scene-wire-flow {
  to { transform: translateX(350%); }
}
.scene__cta--wired .btn {
  margin-left: -1px;
  flex: 0 0 auto;
  width: auto;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.scene__cta--wired .btn:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
@media (prefers-reduced-motion: reduce) {
  .scene__wire::before {
    animation: none;
    left: 30%;
  }
}

.scene__signature {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ----- Final scene — light theme ----- */
.scene--final {
  background-color: #f5f3ff;
  background-image:
    linear-gradient(to bottom, rgba(245, 243, 255, 0.85) 0%, #f5f3ff 30%),
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(139, 92, 246, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 110%, rgba(99, 102, 241, 0.08) 0%, transparent 55%);
  color: #0f0e1a;
}
.scene--final .scene__title,
.scene--final .scene__body {
  color: #0f0e1a;
}
.scene--final .scene__signature {
  color: rgba(15, 14, 26, 0.45);
}
.scene--final .badge {
  color: #6d28d9;
  background: rgba(109, 40, 217, 0.1);
  border-color: rgba(109, 40, 217, 0.3);
}
.scene--final .scene__halo {
  display: none;
}

/* Search bar in light header */
.site-header--light .header-search {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(109, 40, 217, 0.35);
}
.site-header--light .header-search:focus-within {
  border-color: rgba(109, 40, 217, 0.65);
  background: rgba(0, 0, 0, 0.07);
}
.site-header--light .header-search__ic {
  color: rgba(15, 14, 26, 0.4);
}
.site-header--light .header-search__input {
  color: #0f0e1a;
}
.site-header--light .header-search__input::placeholder {
  color: rgba(15, 14, 26, 0.38);
}

/* Header light mode (active on final scene + auth page) */
.site-header--light .site-header__inner {
  background: rgba(255, 255, 255, 0.45) !important;
  border-color: rgba(124, 58, 237, 0.14) !important;
  -webkit-backdrop-filter: blur(48px) saturate(1.8) brightness(1.06) !important;
  backdrop-filter: blur(48px) saturate(1.8) brightness(1.06) !important;
  box-shadow:
    0 8px 32px rgba(109, 40, 217, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(109, 40, 217, 0.06) !important;
}
.site-header--light .brand__name,
.site-header--light .nav-link {
  color: #0f0e1a;
}
.site-header--light .nav-link:hover,
.site-header--light .nav-link--active {
  background: rgba(0, 0, 0, 0.06);
  color: #0f0e1a;
}
.site-header--light .search-btn {
  color: #0f0e1a;
}
.site-header--light .btn--ghost {
  color: var(--purple-hi);
  border-color: var(--purple-hi);
  background: transparent;
}
.site-header--light .btn--ghost:hover {
  color: var(--purple-hi);
  background: rgba(109, 40, 217, 0.07);
  border-color: var(--purple-hi);
}
.site-header--light .menu-toggle__bar {
  background: #0f0e1a;
}
.site-header--light .menu-toggle:hover .menu-toggle__bar {
  background: rgba(15, 14, 26, 0.65);
}
.site-header--light .mobile-menu {
  background: rgba(245, 243, 255, 0.97);
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.10);
}
.site-header--light .mobile-menu .mobile-menu__link {
  color: rgba(15, 14, 26, 0.70);
}
.site-header--light .mobile-menu .mobile-menu__link:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f0e1a;
}
.site-header--light .mobile-menu__search-input {
  color: #0f0e1a;
}
.site-header--light .mobile-menu__search-ic {
  color: rgba(109, 40, 217, 0.55);
}
.site-header--light .mobile-menu__search-input::placeholder {
  color: rgba(15, 14, 26, 0.45);
}

/* btn--pill must win over btn--xl border-radius */
.btn.btn--pill { border-radius: 9999px; }

/* ----- Final scene feature grid ----- */
.final-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
  margin: 2rem 0 2.25rem;
  text-align: left;
}
.final-card {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.125rem 1.25rem;
  background: rgba(109, 40, 217, 0.06);
  border: 1px solid rgba(109, 40, 217, 0.14);
  border-radius: 1rem;
}
.final-card .ic {
  width: 1.5rem;
  height: 1.5rem;
  color: #7c3aed;
  margin-bottom: 0.25rem;
}
.final-card strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 650;
  color: #0f0e1a;
  line-height: 1.3;
}
.final-card span {
  font-size: 0.8rem;
  color: rgba(15, 14, 26, 0.52);
  line-height: 1.4;
}

/* ----- Final scene footer ----- */
.final-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1rem 2rem;
  border-top: 1px solid rgba(109, 40, 217, 0.1);
  font-size: 0.8125rem;
  color: rgba(15, 14, 26, 0.4);
}
.final-footer__sep {
  opacity: 0.5;
}
.final-footer__link {
  color: rgba(15, 14, 26, 0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.final-footer__link:hover {
  color: rgba(15, 14, 26, 0.75);
}

/* space so content doesn't overlap the footer, push below header */
.scene--final .scene__container--center {
  padding-top: 5rem;
  padding-bottom: 4rem;
}

/* ----- CTA label ----- */
.cta-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(15, 14, 26, 0.55);
  margin: 0;
  letter-spacing: -0.01em;
}

.scene__cta .btn--xl {
  font-size: 0.9375rem;
  padding: 11px 28px;
}

/* ----- Review slider — infinite moving cards ----- */
.review-slider {
  overflow: hidden;
  width: 100%;
  margin: 1.75rem auto 0;
  max-width: 64rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.review-slider__track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
  animation: review-scroll 80s linear infinite;
  will-change: transform;
}

.review-slider:hover .review-slider__track,
.review-slider__track:focus-within {
  animation-play-state: paused;
}

@keyframes review-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.review-card {
  flex: 0 0 20rem;
  width: 20rem;
  margin: 0;
  padding: 1.5rem 1.75rem;
  background: rgba(109, 40, 217, 0.05);
  border: 1px solid rgba(109, 40, 217, 0.13);
  border-radius: 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  text-align: left;
  min-height: 11rem;
  align-items: flex-start;
}

.review-card blockquote {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.65;
  color: rgba(15, 14, 26, 0.72);
  font-style: normal;
}

.review-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.review-card figcaption strong {
  font-size: 0.875rem;
  font-weight: 650;
  color: #0f0e1a;
}

.review-card figcaption span {
  font-size: 0.775rem;
  color: rgba(15, 14, 26, 0.45);
}

@media (prefers-reduced-motion: reduce) {
  .review-slider__track {
    animation: none;
  }
}

/* Hide scene dots on final scene */
.scene-dots--hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

/* ----- Hint di scroll sull'hero ----- */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.5s, color 0.3s;
}
.scene--active .scroll-hint {
  opacity: 1;
}
.scroll-hint:hover {
  color: #fff;
}
.scroll-hint .ic {
  width: 1.25rem;
  height: 1.25rem;
  animation: hint-bounce 1.4s infinite;
}
@keyframes hint-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(25%);
  }
}

/* ----- Pulsanti ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  border-radius: 0.625rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s, background-color 0.2s, border-color 0.2s, transform 0.1s;
}
.btn:active {
  transform: translateY(1px);
}
.btn--sm {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
}
.btn--md {
  padding: 0.625rem 1rem;
  font-size: 0.9375rem;
}
.btn--xl {
  padding: 0.875rem 1.375rem;
  font-size: 1.0625rem;
  border-radius: 0.75rem;
}
.btn--primary {
  color: #fff;
  background-image: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.35);
}
.btn--primary:hover {
  filter: brightness(1.08);
}
.btn--secondary {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}
.btn--white {
  color: #0f0e1a;
  background: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.btn--white:hover {
  background: #f0ecff;
}
.btn--ghost {
  color: rgba(255, 255, 255, 0.75);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}
.btn--ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Breakpoints e mobile overrides → mobile.css */

/* ============================================================
   Avatar menu (header – utente loggato)
   ============================================================ */
.lp-avatar-wrap {
  position: relative;
}

.lp-avatar-btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  padding: 0;
}
.lp-avatar-btn:hover {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.35);
}
.lp-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.lp-avatar-dropdown {
  position: absolute;
  top: calc(100% + 0.625rem);
  right: 0;
  width: 16rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 1.5px 6px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 9999;
  animation: lp-dropdown-in 0.15s ease;
}
@keyframes lp-dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lp-avatar-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}
.lp-avatar-dropdown-pic {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lp-avatar-dropdown-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.lp-avatar-dropdown-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f0e1a;
  line-height: 1.25;
}
.lp-avatar-dropdown-email {
  font-size: 0.775rem;
  color: #6b7280;
  margin-top: 0.1rem;
  word-break: break-all;
}

.lp-avatar-divider {
  height: 1px;
  background: #f0f0f4;
  margin: 0;
}

.lp-avatar-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  color: #0f0e1a;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.1s;
}
.lp-avatar-menu-item:hover {
  background: #f5f3ff;
}
.lp-avatar-menu-icon {
  display: flex;
  align-items: center;
  color: #6b7280;
  flex-shrink: 0;
}
.lp-avatar-menu-item--logout {
  color: #dc2626;
}
.lp-avatar-menu-item--logout .lp-avatar-menu-icon {
  color: #dc2626;
}
