/* ========================================================================
   Arenia — Shared Stylesheet
   ======================================================================== */

/* ----- Custom Properties ----- */
:root {
  --primary: #4F46E5;
  --primary-dark: #4338CA;
  --secondary: #1E293B;
  --accent: #10B981;
  --light-bg: #F8FAFC;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
}

/* ----- Tailwind-compatible utility overrides ----- */
.bg-primary   { background-color: var(--primary); }
.bg-secondary { background-color: var(--secondary); }
.bg-light-bg  { background-color: var(--light-bg); }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }

/* ----- Global reset for consistent transition behaviour ----- */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ----- Navigation — glassmorphism ----- */
nav.site-nav {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.92);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

nav.site-nav.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  background-color: rgba(255, 255, 255, 0.97);
}

/* ----- Mobile menu ----- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

#mobile-menu.open {
  max-height: 500px;
}

/* ----- Hero gradient background ----- */
.hero-gradient {
  background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 50%, #F0FDF4 100%);
}

/* ----- Focus styles for accessibility ----- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ----- Fade-in scroll animation ----- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- Stat card animations ----- */
.stat-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
}

.stat-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.12);
}

.stat-card:nth-child(1) { transition-delay: 0.1s; }
.stat-card:nth-child(2) { transition-delay: 0.2s; }
.stat-card:nth-child(3) { transition-delay: 0.3s; }

/* ----- Counter ----- */
.counter {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ----- FAQ accordion ----- */
.faq-item {
  border-bottom: 1px solid var(--gray-200);
}

.faq-question {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-weight: 600;
  color: var(--secondary);
  transition: color 0.2s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.0625rem;
  font-family: inherit;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
  color: var(--primary);
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 0;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 0 1.25rem 0;
}

/* ----- CTA button ripple effect ----- */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

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

/* Ghost button */
.btn-ghost {
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-ghost:hover {
  color: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* ----- Cookie Banner ----- */
#cookie-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  background-color: var(--secondary);
  color: #fff;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  font-size: 0.875rem;
}

#cookie-banner.visible {
  display: flex;
}

#cookie-banner button {
  background-color: var(--primary);
  color: #fff;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#cookie-banner button:hover {
  background-color: var(--primary-dark);
}

/* ----- Sticky Mobile CTA ----- */
.sticky-mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--white);
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.sticky-mobile-cta.hidden-by-cookie {
  transform: translateY(100%);
}

/* Body bottom padding to prevent content from being hidden by sticky CTA */
body.has-sticky-cta {
  padding-bottom: 4.5rem;
}

@media (min-width: 768px) {
  .sticky-mobile-cta {
    display: none !important;
  }
  body.has-sticky-cta {
    padding-bottom: 0;
  }
}

/* ----- Comparison cards (Problem/Solution) ----- */
.comparison-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.comparison-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ----- Feature cards ----- */
.feature-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.08);
}

/* ----- Steps timeline ----- */
.step-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

/* Steps: nessuna linea connettore (le card hanno immagini a piena larghezza) */
.steps-connector {
  position: relative;
}

/* ----- Use-case / target cards hover ----- */
.use-case-card {
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.use-case-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ----- Partnership timeline ----- */
.partnership-step {
  position: relative;
  padding-left: 2.5rem;
}

.partnership-step::before {
  content: '';
  position: absolute;
  left: 0.875rem;
  top: 2rem;
  bottom: -0.5rem;
  width: 2px;
  background-color: var(--gray-200);
}

.partnership-step:last-child::before {
  display: none;
}

.partnership-dot {
  position: absolute;
  left: 0;
  top: 0.25rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ----- Kickstart card highlight ----- */
.kickstart-card {
  border: 2px solid var(--primary);
  position: relative;
  overflow: hidden;
}

.kickstart-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ----- Smooth scroll ----- */
html {
  scroll-behavior: smooth;
}

/* ----- Selection color ----- */
::selection {
  background-color: rgba(79, 70, 229, 0.15);
  color: var(--secondary);
}

/* ----- Image placeholder shimmer ----- */
.img-fade {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.img-fade.loaded {
  opacity: 1;
}

/* ========================================================================
   PREMIUM POLISH LAYER — modern utilities, micro-animations, decorations
   (Light theme only. Existing classes above remain untouched.)
   ======================================================================== */

/* ----- 1. Enhanced gradients ----------------------------------------- */
.gradient-hero {
  background:
    radial-gradient(at 18% 22%, rgba(238, 242, 255, 0.95) 0%, transparent 55%),
    radial-gradient(at 82% 18%, rgba(245, 243, 255, 0.9) 0%, transparent 55%),
    radial-gradient(at 50% 90%, rgba(240, 253, 244, 0.85) 0%, transparent 60%),
    linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 50%, #F5F3FF 100%);
}

.gradient-radial-primary {
  background: radial-gradient(circle at center, rgba(79, 70, 229, 0.18) 0%, rgba(79, 70, 229, 0.04) 45%, transparent 75%);
}

.gradient-conic {
  background: conic-gradient(from 210deg at 50% 50%, #4F46E5, #7C3AED, #10B981, #4F46E5);
}

.gradient-text-primary {
  background: linear-gradient(135deg, #4F46E5 0%, #10B981 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.noise-bg {
  position: relative;
}
.noise-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ----- 2. Premium shadows -------------------------------------------- */
.shadow-premium-sm { box-shadow: 0 1px 2px rgba(30,41,59,0.06), 0 1px 3px rgba(30,41,59,0.10); }
.shadow-premium-md { box-shadow: 0 4px 6px rgba(30,41,59,0.05), 0 10px 20px rgba(30,41,59,0.08); }
.shadow-premium-lg { box-shadow: 0 10px 15px rgba(30,41,59,0.05), 0 20px 40px rgba(30,41,59,0.12); }
.shadow-premium-xl { box-shadow: 0 20px 25px rgba(30,41,59,0.05), 0 30px 60px rgba(30,41,59,0.15); }
.shadow-glow-primary { box-shadow: 0 0 40px rgba(79, 70, 229, 0.15); }
.shadow-glow-accent  { box-shadow: 0 0 40px rgba(16, 185, 129, 0.15); }

/* ----- 3. Scroll reveal animations ----------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }

/* ----- 4. Hover effects for cards ------------------------------------ */
.card-hover {
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(30, 41, 59, 0.12);
}

.card-tilt {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}
.card-tilt:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
}

.card-border-gradient {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
}
.card-border-gradient::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  background: linear-gradient(135deg, #4F46E5, #10B981);
  border-radius: inherit;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card-border-gradient:hover::before { opacity: 1; }

/* ----- 5. Image treatments ------------------------------------------- */
.img-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.img-rounded-premium {
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(30, 41, 59, 0.12);
}

.img-overlay {
  position: relative;
  overflow: hidden;
}
.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(30, 41, 59, 0.6) 100%);
  border-radius: inherit;
  pointer-events: none;
}

.img-zoom {
  overflow: hidden;
}
.img-zoom img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.img-zoom:hover img {
  transform: scale(1.05);
}

/* ----- 6. Text treatments -------------------------------------------- */
.text-balance { text-wrap: balance; }

.text-gradient-primary {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.text-gradient-accent {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* ----- 7. Decorative elements ---------------------------------------- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}
.blob-primary {
  background: radial-gradient(circle, #4F46E5, transparent 70%);
}
.blob-accent {
  background: radial-gradient(circle, #10B981, transparent 70%);
}

.dot-pattern {
  background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
  background-size: 24px 24px;
}

.grid-pattern {
  background-image:
    linear-gradient(#E2E8F0 1px, transparent 1px),
    linear-gradient(90deg, #E2E8F0 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ----- 8. Badge / pill component ------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.badge-primary {
  background: rgba(79, 70, 229, 0.10);
  color: #4F46E5;
}
.badge-accent {
  background: rgba(16, 185, 129, 0.10);
  color: #059669;
}
.badge-white {
  background: #ffffff;
  color: #1E293B;
  box-shadow: 0 1px 3px rgba(30, 41, 59, 0.08);
}

/* ----- 9. Section dividers (wave) ------------------------------------ */
.divider-wave {
  height: 80px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'><path d='M0,40 C240,80 480,0 720,40 C960,80 1200,0 1440,40 L1440,80 L0,80 Z' fill='%23F8FAFC'/></svg>") no-repeat center / cover;
}
.divider-wave-white {
  height: 80px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'><path d='M0,40 C240,80 480,0 720,40 C960,80 1200,0 1440,40 L1440,80 L0,80 Z' fill='%23FFFFFF'/></svg>") no-repeat center / cover;
}

/* ----- 10. Mouse-follow glow effect --------------------------------- */
.follow-glow {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.follow-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--glow-x, 50%) var(--glow-y, 50%),
    rgba(79, 70, 229, 0.15),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}
.follow-glow:hover::before { opacity: 1; }
.follow-glow > * { position: relative; z-index: 1; }

/* ----- 11. Stagger children helper ---------------------------------- */
/* JS sets --stagger-index on each child; CSS converts to delay */
.stagger-children > * {
  transition-delay: calc(var(--stagger-index, 0) * 0.05s);
}

/* ----- 12. Reduced motion ------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-scale,
  .reveal-left,
  .reveal-right {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card-hover:hover,
  .card-tilt:hover {
    transform: none;
  }
  .img-zoom img { transition: none; }
  .img-zoom:hover img { transform: none; }
  html { scroll-behavior: auto; }
}

/* ===== 13. GDPR Cookie Consent ===================================== */
.consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1E293B;
  color: #fff;
  padding: 20px 24px;
  z-index: 9998;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 3px solid #4F46E5;
}
.consent-banner.visible { transform: translateY(0); }
.consent-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.consent-text {
  flex: 1 1 320px;
  min-width: 0;
}
.consent-text strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #fff;
}
.consent-text p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #cbd5e1;
}
.consent-text a {
  color: #10B981;
  text-decoration: underline;
}
.consent-text a:hover { color: #34d399; }
.consent-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.consent-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}
.consent-btn:active { transform: translateY(1px); }
.consent-btn-primary {
  background: #4F46E5;
  color: #fff;
}
.consent-btn-primary:hover { background: #4338CA; }
.consent-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.consent-btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }

/* Modal "Personalizza" */
.consent-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.consent-modal.visible { opacity: 1; }
.consent-modal-card {
  background: #fff;
  color: #1E293B;
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 32px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
  max-height: 90vh;
  overflow-y: auto;
}
.consent-modal-card h2 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
  font-weight: 700;
}
.consent-modal-intro {
  font-size: 0.9rem;
  color: #475569;
  margin: 0 0 24px 0;
  line-height: 1.5;
}
.consent-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
}
.consent-row:last-of-type { border-bottom: 1px solid #e2e8f0; }
.consent-row-info { flex: 1; min-width: 0; }
.consent-row-info strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #1E293B;
}
.consent-row-info p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #64748b;
}
.consent-pill {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.consent-pill-on {
  background: #d1fae5;
  color: #047857;
}
.consent-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.consent-toggle input { opacity: 0; width: 0; height: 0; }
.consent-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s;
}
.consent-toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
.consent-toggle input:checked + .consent-toggle-slider {
  background: #10B981;
}
.consent-toggle input:checked + .consent-toggle-slider::before {
  transform: translateX(22px);
}
.consent-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
}

@media (max-width: 640px) {
  .consent-banner { padding: 16px; }
  .consent-actions { width: 100%; }
  .consent-actions .consent-btn { flex: 1; min-width: 0; }
  .consent-modal-card { padding: 24px; }
  .consent-row { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   PROBLEM QUOTE — Editorial section (pivot Provider, 2026-05)
   Magazine pull-quote + stat-quotes + transformation arc
   ============================================================ */

/* Section paper background — warm off-white, subtle grain */
.pq-section {
  background:
    radial-gradient(1200px 400px at 50% -200px, rgba(79,70,229,0.04), transparent 60%),
    radial-gradient(800px 300px at 90% 100%, rgba(16,185,129,0.04), transparent 60%),
    #FAF7F1;
  position: relative;
  overflow: hidden;
}
.pq-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(30,41,59,0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  background-position: 0 0;
  opacity: 0.35;
  mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 18%, black 82%, transparent 100%);
  pointer-events: none;
}

/* Eyebrow line — em-dash kerned, small caps */
.pq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: "Inter", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #4F46E5;
}
.pq-eyebrow::before,
.pq-eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* Headline — Fraunces display */
.pq-headline {
  font-family: "Fraunces", "EB Garamond", Georgia, serif;
  font-weight: 500;
  font-style: normal;
  letter-spacing: -0.02em;
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  line-height: 1.05;
  color: #1E293B;
  font-variation-settings: "opsz" 96, "SOFT" 30;
  margin: 1rem 0 0.5rem;
}
.pq-headline em {
  font-style: italic;
  font-weight: 400;
  color: #4F46E5;
  font-variation-settings: "opsz" 100, "SOFT" 50;
}
.pq-subhead {
  font-family: "Inter", sans-serif;
  font-size: 1.0625rem;
  color: #64748B;
  max-width: 38rem;
  margin: 1rem auto 0;
  line-height: 1.55;
}

/* HERO PULL-QUOTE */
.pq-hero {
  position: relative;
  margin: 3.5rem auto 0;
  max-width: 64rem;
  padding: 3.25rem 2rem 2.75rem;
  background: #FFFFFF;
  border-radius: 2px;
  box-shadow:
    0 1px 0 rgba(30,41,59,0.04),
    0 24px 48px -28px rgba(30,41,59,0.18);
}
.pq-hero::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #4F46E5 0%, #10B981 100%);
}
.pq-hero-glyph {
  position: absolute;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(7rem, 14vw, 11rem);
  line-height: 0.85;
  color: rgba(79,70,229,0.10);
  top: -0.15em;
  left: 1.5rem;
  pointer-events: none;
  user-select: none;
  font-variation-settings: "opsz" 144;
}
.pq-hero-text {
  font-family: "Fraunces", "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  line-height: 1.4;
  color: #1A1F36;
  letter-spacing: -0.01em;
  margin: 0;
  font-variation-settings: "opsz" 36, "SOFT" 30;
  position: relative;
  z-index: 2;
}
.pq-hero-text strong {
  font-weight: 600;
  background: linear-gradient(180deg, transparent 62%, rgba(79,70,229,0.18) 62%);
  padding: 0 0.05em;
}
.pq-hero-text em {
  font-style: italic;
  font-variation-settings: "opsz" 36, "SOFT" 100;
}
.pq-hero-source {
  font-family: "Inter", sans-serif;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: #64748B;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(30,41,59,0.08);
  display: block;
  line-height: 1.6;
}
.pq-hero-source strong {
  color: #1E293B;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.pq-hero-source .pq-source-sep {
  display: inline-block;
  margin: 0 0.6em;
  color: #CBD5E1;
}
.pq-hero-source .pq-source-cross {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #94A3B8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* THREE STAT-QUOTES */
.pq-stats {
  margin: 4.5rem auto 0;
  max-width: 70rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(30,41,59,0.10);
  border-bottom: 1px solid rgba(30,41,59,0.10);
}
.pq-stat {
  padding: 2.5rem 2rem;
  border-right: 1px solid rgba(30,41,59,0.08);
  position: relative;
  transition: background 0.4s ease;
}
.pq-stat:last-child { border-right: none; }
.pq-stat:hover {
  background: rgba(79,70,229,0.025);
}
.pq-stat-number {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(3.25rem, 5.5vw, 4.5rem);
  line-height: 1;
  color: #1E293B;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  font-feature-settings: "lnum" 1, "tnum" 0;
  display: flex;
  align-items: baseline;
  gap: 0.05em;
}
.pq-stat-number .pq-unit {
  font-size: 0.55em;
  font-weight: 400;
  color: #4F46E5;
  font-variation-settings: "opsz" 36;
}
.pq-stat-number.pq-stat-down {
  color: #94A3B8;
  position: relative;
}
.pq-stat-number.pq-stat-down::after {
  content: "↘";
  font-size: 0.45em;
  margin-left: 0.3em;
  color: #DC2626;
  vertical-align: 0.15em;
}
.pq-stat-claim {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.5;
  color: #475569;
  margin: 1rem 0 1.25rem;
  font-variation-settings: "opsz" 18, "SOFT" 60;
}
.pq-stat-source {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.pq-stat-source::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* TRANSFORMATION ARC */
.pq-arc {
  margin: 5.5rem auto 0;
  max-width: 72rem;
}
.pq-arc-eyebrow {
  text-align: center;
}
.pq-arc-h3 {
  font-family: "Fraunces", "EB Garamond", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.15;
  color: #1E293B;
  text-align: center;
  letter-spacing: -0.02em;
  margin: 1rem 0 3rem;
  font-variation-settings: "opsz" 80, "SOFT" 40;
}
.pq-arc-h3 strong {
  font-weight: 600;
  color: #4F46E5;
  font-variation-settings: "opsz" 80, "SOFT" 60;
}
.pq-arc-h3 em {
  font-style: italic;
  color: #64748B;
}
.pq-arc-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(30,41,59,0.05),
    0 30px 60px -34px rgba(30,41,59,0.20);
  overflow: hidden;
}
.pq-arc-side {
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
}
.pq-arc-before {
  background: linear-gradient(180deg, #FAF7F1 0%, #F4EFE3 100%);
  color: #475569;
  position: relative;
}
.pq-arc-after {
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F3FF 100%);
  color: #1E293B;
  position: relative;
}
.pq-arc-after::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(79,70,229,0.08), transparent 60%);
  pointer-events: none;
}
.pq-arc-label {
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-bottom: 0.75rem;
}
.pq-arc-label-after {
  color: #10B981;
}
.pq-arc-h4 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.2;
  margin: 0 0 1.5rem;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 36, "SOFT" 40;
}
.pq-arc-after .pq-arc-h4 {
  color: #1E293B;
}
.pq-arc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}
.pq-arc-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-family: "Inter", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.pq-arc-before .pq-arc-list li {
  color: #64748B;
}
.pq-arc-before .pq-arc-list li::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 1px;
  background: #94A3B8;
  margin-top: 0.7em;
}
.pq-arc-after .pq-arc-list li {
  color: #1E293B;
  font-weight: 500;
  position: relative;
  z-index: 2;
}
.pq-arc-after .pq-arc-list li::before {
  content: "→";
  flex-shrink: 0;
  color: #10B981;
  font-weight: 700;
  font-size: 1rem;
  margin-top: -0.05em;
}
.pq-arc-after .pq-arc-list li mark {
  background: linear-gradient(180deg, transparent 65%, rgba(16,185,129,0.22) 65%);
  color: inherit;
  padding: 0;
}

/* CONNECTOR — central arrow column */
.pq-arc-connector {
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  position: relative;
  border-left: 1px solid rgba(30,41,59,0.06);
  border-right: 1px solid rgba(30,41,59,0.06);
  min-width: 80px;
}
.pq-arc-connector::before,
.pq-arc-connector::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(79,70,229,0.25), transparent);
  height: 30%;
}
.pq-arc-connector::before { top: 0; }
.pq-arc-connector::after { bottom: 0; }
.pq-arc-arrow {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5 0%, #10B981 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 6px #FFFFFF,
    0 0 0 7px rgba(79,70,229,0.18),
    0 12px 24px -8px rgba(79,70,229,0.4);
  position: relative;
  z-index: 2;
}
.pq-arc-arrow svg {
  width: 22px;
  height: 22px;
}

/* Closing CTA below arc */
.pq-arc-cta {
  text-align: center;
  margin-top: 2.25rem;
  font-family: "Inter", sans-serif;
  font-size: 0.9375rem;
  color: #475569;
}
.pq-arc-cta a {
  color: #4F46E5;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(79,70,229,0.4);
  transition: text-decoration-color 0.2s, color 0.2s;
}
.pq-arc-cta a:hover {
  color: #4338CA;
  text-decoration-color: #4338CA;
}

/* Responsive */
@media (max-width: 1024px) {
  .pq-stats { grid-template-columns: 1fr; }
  .pq-stat {
    border-right: none;
    border-bottom: 1px solid rgba(30,41,59,0.08);
  }
  .pq-stat:last-child { border-bottom: none; }
  .pq-arc-grid { grid-template-columns: 1fr; }
  .pq-arc-connector {
    flex-direction: row;
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(30,41,59,0.06);
    border-bottom: 1px solid rgba(30,41,59,0.06);
    padding: 1rem 0;
    min-height: 80px;
  }
  .pq-arc-connector::before,
  .pq-arc-connector::after {
    width: 30%;
    height: 1px;
    top: 50%;
    background: linear-gradient(90deg, transparent, rgba(79,70,229,0.25), transparent);
  }
  .pq-arc-connector::before { left: 0; }
  .pq-arc-connector::after { left: auto; right: 0; }
  .pq-arc-arrow {
    transform: rotate(90deg);
  }
}
@media (max-width: 640px) {
  .pq-hero { padding: 2.25rem 1.5rem 2rem; }
  .pq-hero-glyph { left: 0.75rem; }
  .pq-hero-source .pq-source-sep { display: none; }
  .pq-arc-side { padding: 1.75rem 1.5rem; }
  .pq-stats { margin-top: 3rem; }
  .pq-arc { margin-top: 3.5rem; }
  .pq-hero { margin-top: 2.5rem; }
}

/* Reveal: respect prefers-reduced-motion already set globally */
.pq-hero, .pq-stat, .pq-arc-grid {
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}
.pq-hero:hover {
  box-shadow:
    0 1px 0 rgba(30,41,59,0.04),
    0 32px 64px -28px rgba(30,41,59,0.24);
}

/* ============================================================
   HERO H1 — Fraunces italic accent (pivot Provider, 2026-05)
   ============================================================ */
.hero-h1-second-line {
  display: block;
  font-weight: 500;
  color: #1E293B;
  margin-top: 0.35em;
  letter-spacing: -0.01em;
}
.hero-h1-em {
  font-family: "Fraunces", "EB Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  color: #4F46E5;
  letter-spacing: -0.025em;
  background: linear-gradient(180deg, transparent 70%, rgba(79,70,229,0.14) 70%);
  padding: 0 0.05em;
}

/* Floating source attribution under stat number */
.hero-stat-source {
  font-family: "Inter", sans-serif;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94A3B8;
  margin-top: 0.15rem;
}

/* ------------------------------------------------------------------
   Scroll-triggered side tab CTA (right edge, desktop+ only)
   Added: 2026-05-24 — partner conversion accelerator
   ------------------------------------------------------------------ */
.scroll-cta-tab {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.1rem 0.85rem 1.25rem;
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
  color: #ffffff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 14px 0 0 14px;
  box-shadow: 0 10px 30px -8px rgba(79, 70, 229, 0.45), 0 4px 12px -4px rgba(0,0,0,0.15);
  ring: 1px solid rgba(255,255,255,0.18);
  transform: translate(110%, -50%);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease-out, box-shadow 0.25s ease, padding-right 0.25s ease;
  will-change: transform, opacity;
  max-width: 240px;
}
@media (min-width: 768px) {
  .scroll-cta-tab {
    display: inline-flex;
  }
}
.scroll-cta-tab.is-visible {
  transform: translate(0, -50%);
  opacity: 1;
}
.scroll-cta-tab:hover {
  padding-right: 1.4rem;
  box-shadow: 0 14px 40px -10px rgba(79, 70, 229, 0.55), 0 6px 18px -4px rgba(0,0,0,0.18);
}
.scroll-cta-tab .scroll-cta-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  opacity: 0.9;
}
.scroll-cta-tab .scroll-cta-arrow {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.scroll-cta-tab:hover .scroll-cta-arrow {
  transform: translateX(3px);
}
.scroll-cta-tab .scroll-cta-text {
  display: inline-block;
  white-space: nowrap;
}
.scroll-cta-tab .scroll-cta-text strong {
  display: block;
  font-weight: 700;
}
.scroll-cta-tab .scroll-cta-text small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.82;
  margin-top: 1px;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cta-tab {
    transition: opacity 0.2s ease;
    transform: translate(0, -50%);
  }
}

/* ============================================================
   Hero stage — portale demo immersivo
   ============================================================ */
.hero-stage {
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(79, 70, 229, 0.35) 0%, transparent 55%),
    radial-gradient(80% 60% at 85% 100%, rgba(16, 185, 129, 0.14) 0%, transparent 60%),
    linear-gradient(180deg, #131740 0%, #0b1024 100%);
}
.stage-glow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: 72%;
  height: 62%;
  transform: translate(-50%, -50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(99, 102, 241, 0.42), transparent 70%);
  filter: blur(42px);
  pointer-events: none;
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #34d399;
  animation: live-pulse 2s ease-out infinite;
}
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
  70% { box-shadow: 0 0 0 11px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.text-gradient-stage {
  background: linear-gradient(90deg, #a5b4fc 0%, #818cf8 45%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stage-video {
  transform: perspective(1300px) rotateX(9deg) scale(0.96);
  transform-origin: 50% 15%;
  will-change: transform;
}
.shadow-stage {
  box-shadow:
    0 30px 90px -18px rgba(11, 16, 36, 0.9),
    0 18px 60px -20px rgba(99, 102, 241, 0.5);
}
@media (prefers-reduced-motion: reduce) {
  .stage-video { transform: none !important; }
  .live-dot { animation: none; }
}

/* ==========================================================================
   Disclosure progressiva (demo.html) — campi opzionali nascosti di default
   ========================================================================== */
.disclosure > summary { list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::marker { content: ''; }
.disclosure[open] .disclosure-chevron { transform: rotate(180deg); }
.disclosure > summary:focus-visible {
  outline: 2px solid var(--color-primary, #4f46e5);
  outline-offset: 2px;
}

/* ==========================================================================
   FAQ — le domande sono heading (h3) per estraibilità SEO/GEO.
   Reset difensivo: l'heading non deve alterare il layout dell'accordion.
   ========================================================================== */
.faq-heading,
.faq-q {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
}
.faq-q { flex: 1 1 auto; text-align: left; }
