:root { --patrimonio-build-token: "2026.06.24.4"; }

/* Patrimonio in mano premium visual layer
 * Ispirato agli stili condivisi: navigazione glass, gradienti blu,
 * card interattive, dettagli oro e ottimizzazioni mobile.
 */
html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 8% 4%, rgba(37, 99, 235, 0.08), transparent 28rem),
    radial-gradient(circle at 92% 22%, rgba(56, 189, 248, 0.08), transparent 26rem),
    var(--color-background);
}

/* Navigazione traslucida */
.glass-nav {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(219, 229, 241, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px rgba(10, 29, 55, 0.04);
}

/* Spaziatura coerente tra le sezioni */
.section-spacing {
  padding-top: 60px;
  padding-bottom: 60px;
}

/* Card con interazione elegante */
.card-hover-effect {
  transition:
    transform 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out,
    border-color 0.3s ease-in-out;
}

.card-hover-effect:hover {
  transform: translateY(-5px);
  border-color: #2563eb !important;
  box-shadow: 0 15px 34px rgba(37, 99, 235, 0.15);
}

/* Testo con gradiente del brand */
.gradient-text-rugge {
  background: linear-gradient(100deg, #0a1d37 0%, #174f91 48%, #2563eb 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: #0a1d37;
  -webkit-text-fill-color: transparent;
}

/* Etichetta oro, usata solo per elementi di particolare rilievo */
.gold-tag {
  background: linear-gradient(135deg, #0a1d37 0%, #2563eb 52%, #93c5fd 100%);
  border: 1px solid rgba(184, 134, 11, 0.32);
  box-shadow: 0 5px 14px rgba(170, 119, 28, 0.16);
  color: #4a3705;
  text-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

.gold-tag:hover {
  border-color: rgba(191, 149, 63, 0.82);
  box-shadow: 0 0 22px rgba(191, 149, 63, 0.34);
  transform: scale(1.02);
}

.hero-kicker {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  justify-self: start;
  letter-spacing: 0.1em;
  padding: 0.48rem 0.82rem;
  width: fit-content;
}

/* Superfici premium */
.hero-premium {
  isolation: isolate;
}

.hero-premium::after {
  background: rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  content: "";
  filter: blur(78px);
  height: 250px;
  left: -120px;
  pointer-events: none;
  position: absolute;
  top: 26%;
  width: 250px;
  z-index: -1;
}

.premium-panel,
.result-hero {
  background:
    radial-gradient(circle at 82% 10%, rgba(56, 189, 248, 0.25), transparent 34%),
    linear-gradient(145deg, #071a31 0%, #0a1d37 42%, #174f91 77%, #2563eb 135%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 72px rgba(10, 29, 55, 0.25);
}

.premium-surface,
.glass-content,
.glass-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(219, 229, 241, 0.9);
  box-shadow: 0 18px 50px rgba(10, 29, 55, 0.09);
}

.glass-content,
.glass-card {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.section-white {
  background: rgba(255, 255, 255, 0.78);
  border-block: 1px solid rgba(219, 229, 241, 0.72);
}

.eyebrow-light {
  color: #bdefff !important;
}

.page-shell {
  position: relative;
}

.page-shell::before {
  background: rgba(37, 99, 235, 0.1);
  border-radius: 999px;
  content: "";
  filter: blur(70px);
  height: 220px;
  pointer-events: none;
  position: absolute;
  right: -110px;
  top: 30px;
  width: 220px;
  z-index: -1;
}

.premium-page {
  position: relative;
}

/* Dettagli dei componenti */
.btn-primary {
  background: linear-gradient(135deg, #0a1d37 0%, #174f91 55%, #2563eb 100%);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.3);
}

.btn-outline:hover,
.btn-ghost:hover {
  border-color: rgba(37, 99, 235, 0.42);
  color: #174f91;
}

.icon-chip {
  background: linear-gradient(145deg, rgba(37, 99, 235, 0.12), rgba(56, 189, 248, 0.16));
  color: #174f91;
}

.progress-bar,
.bar-fill {
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 58%, #93c5fd 100%);
}

.answer-card:hover {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.answer-card:has(input:checked) {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(56, 189, 248, 0.09));
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.answer-card input {
  accent-color: #2563eb;
}

.cta-band {
  background:
    radial-gradient(circle at 85% 15%, rgba(56, 189, 248, 0.24), transparent 32%),
    linear-gradient(135deg, #071a31 0%, #0a1d37 48%, #174f91 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(10, 29, 55, 0.2);
}

.site-footer {
  background:
    radial-gradient(circle at 80% 0%, rgba(37, 99, 235, 0.18), transparent 30%),
    #061426;
}

/* Scrollbar personalizzata */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: #0a1d37;
  border: 2px solid #f8fafc;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2563eb;
}

* {
  scrollbar-color: #0a1d37 #f8fafc;
  scrollbar-width: thin;
}

/* Supporto opzionale per elementi a scorrimento continuo */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  --marquee-duration: 30s;
  animation: marquee var(--marquee-duration) linear infinite;
  display: flex;
  width: max-content;
  will-change: transform;
}

@media (min-width: 768px) {
  .section-spacing {
    padding-top: 120px;
    padding-bottom: 120px;
  }
}

@media (max-width: 768px) {
  .section-spacing {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  [class*="blur-"] {
    display: none !important;
  }

  .animate-marquee {
    animation: none !important;
    flex-wrap: wrap;
    justify-content: center;
    white-space: normal;
    width: 100%;
    will-change: auto;
  }

  .animate-marquee > *:nth-child(n + 2) {
    display: none;
  }

  .card-hover-effect,
  .card-hover-effect:hover,
  .gold-tag:hover {
    box-shadow: var(--shadow-soft);
    transform: none;
  }

  .glass-nav,
  .glass-content,
  .glass-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .glass-nav {
    background: rgba(255, 255, 255, 0.98);
  }

  .hero-premium::after,
  .page-shell::before {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
