:root {
  --color-bg: #0f1115;
  --color-surface: #171a21;
  --color-border: #2a2f3a;
  --color-text: #e6e9ef;
  --color-muted: #a8b0be;
  --color-primary: #3fb984;
  --color-primary-contrast: #0a0c10;
  /* Identit? elegante: finiture oro (allineata a service-content / contact-hero) */
  --color-gold: #d4af37;
  --color-gold-bright: #f0d060;
  --color-gold-contrast: #0a0c10;
  --color-gold-soft: rgba(212, 175, 55, 0.14);
  --color-gold-border: rgba(212, 175, 55, 0.85);
  --glass-bg: rgb(0 0 0 / 39%);
  --glass-blur: blur(12px);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6vh;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.55) rgba(15, 17, 21, 0.9);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background-color: var(--color-bg);
  overflow-x: hidden;
  color: var(--color-text);
}

/* Scrollbar globali (Chrome / Edge / Safari) */
*::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: rgba(15, 17, 21, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.12);
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(240, 208, 96, 0.75), rgba(212, 175, 55, 0.55));
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 0;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-bright);
}
*::-webkit-scrollbar-corner {
  background: rgba(15, 17, 21, 0.95);
}
*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body { margin: 0;overflow-x: hidden; }

/* Mobile touch improvements */
a, button { -webkit-tap-highlight-color: transparent; }
.contact-map-section, .contact-map-section iframe { touch-action: pan-x pan-y; }

/* Utilities */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--color-primary); color: var(--color-primary-contrast); }
.btn-outline {
  border: 1px solid rgba(230, 233, 239, 0.35);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.04);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  background: rgba(63, 185, 132, 0.1);
}
.btn-gold {
  background: transparent;
  border: 2px solid var(--color-gold);
  color: #fff;
  border-radius: 0;
}
.btn-gold:hover {
  background: var(--color-gold-soft);
  border-color: var(--color-gold-bright);
  color: #fff;
}

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgb(23 26 33 / 18%); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); }
.header-inner {
  position: relative;
  display: flex;
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 12px;
  flex-wrap: nowrap;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--color-text); text-decoration: none; flex-shrink: 0; }
.brand .logo { height: 32px; width: auto; display: block; }
.brand-logo { height: 32px; width: auto; }
.brand-name { font-weight: 700; letter-spacing: .3px; white-space: nowrap; }

.nav-toggle { display: none; padding: 8px; background: transparent; border: 1px solid var(--color-border); border-radius: 8px; cursor: pointer; transition: all 0.3s ease; flex-shrink: 0; }
.nav-toggle:hover { border-color: var(--color-primary); }
.nav-toggle-bar { display: block; width: 20px; height: 2px; background: var(--color-text); margin: 4px 0; transition: transform 0.3s ease, opacity 0.3s ease; transform-origin: center; }

/* Animazione navToggle in apertura */
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: rotate(45deg) translateY(10px); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; transform: translateX(-8px); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: rotate(-45deg) translateY(-10px); }

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(10px, 1vw, 18px);
  flex-wrap: nowrap;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(8px, 0.9vw, 16px);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  min-width: 0;
}
.site-nav li { flex-shrink: 0; }
.site-nav a {
  color: var(--color-text);
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  font-size: clamp(14px, 1.15vw, 16px);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.site-nav a.is-active {
  color: var(--color-gold-bright);
}
.site-nav a.is-active:not(.nav-link-ai) {
  color: var(--color-gold-bright);
}
.site-nav a.nav-link-ai.is-active {
  border-color: var(--color-gold-bright);
  background: rgba(212, 175, 55, 0.2);
}
.site-header.is-scrolled {
  background: rgb(23 26 33 / 92%);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
}
.site-header.is-scrolled .header-inner {
  backdrop-filter: blur(12px);
}

/* Navbar: Visualizzatore AI in evidenza */
.nav-link-ai {
  position: relative;
  color: var(--color-gold-bright) !important;
  font-weight: 600;
  padding: 4px 10px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.08);
  text-shadow: 0 0 12px rgba(240, 208, 96, 0.35);
  animation: navAiGlow 2.8s ease-in-out infinite;
}
.nav-link-ai::before,
.nav-link-ai::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
}
.nav-link-ai::before {
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 40%,
    rgba(255, 245, 200, 0.55) 50%,
    transparent 60%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: navAiFlash 3.6s ease-in-out infinite;
  mix-blend-mode: screen;
  opacity: 0.85;
}
.nav-link-ai::after {
  box-shadow:
    0 0 0 0 rgba(212, 175, 55, 0.35),
    inset 0 0 12px rgba(240, 208, 96, 0.12);
  animation: navAiPulseRing 2.8s ease-out infinite;
}
@keyframes navAiGlow {
  0%, 100% {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(212, 175, 55, 0.07);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
  }
  50% {
    border-color: rgba(240, 208, 96, 0.85);
    background: rgba(212, 175, 55, 0.18);
    box-shadow:
      0 0 16px rgba(240, 208, 96, 0.45),
      0 0 28px rgba(212, 175, 55, 0.2);
  }
}
@keyframes navAiFlash {
  0%, 55%, 100% { background-position: 140% 0; opacity: 0.35; }
  65%, 78% { background-position: -40% 0; opacity: 0.95; }
}
@keyframes navAiPulseRing {
  0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4), inset 0 0 10px rgba(240, 208, 96, 0.08); }
  70% { box-shadow: 0 0 0 8px rgba(212, 175, 55, 0), inset 0 0 14px rgba(240, 208, 96, 0.16); }
  100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0), inset 0 0 10px rgba(240, 208, 96, 0.08); }
}
.nav-mobile .site-nav ul a.nav-link-ai {
  border-color: rgba(212, 175, 55, 0.55);
  color: var(--color-gold-bright) !important;
  background: rgba(212, 175, 55, 0.12);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}
.nav-mobile .site-nav ul a.nav-link-ai:hover {
  color: #0a0c10 !important;
  background: var(--color-gold-bright);
  border-color: var(--color-gold-bright);
}
.nav-mobile .site-nav ul a.is-active {
  border-color: var(--color-gold);
  color: var(--color-gold-bright);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
}
.header-cta,
.nav-cta {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  align-items: center;
}
.header-cta .btn,
.nav-cta .btn {
  padding: 8px 12px;
  font-size: 13px;
  white-space: nowrap;
}
.btn-label { white-space: nowrap; }

/* Desktop compatto: CTA a sola icona sotto ~1400px (logo completo sempre visibile) */
@media (max-width: 1399px) {
  .site-header:not(.nav-mobile) .header-cta .btn-label,
  .site-header:not(.nav-mobile) .nav-cta .btn-label { display: none; }
  .site-header:not(.nav-mobile) .header-cta .btn,
  .site-header:not(.nav-mobile) .nav-cta .btn { padding: 8px 10px; }
}

/* Con hamburger: logo + nome restano; tipografia leggermente compatta */
.nav-mobile .brand-name {
  display: inline;
  font-size: clamp(13px, 3.2vw, 15px);
}
.nav-mobile .brand .logo { height: 28px; }

/* Mobile navbar layout (activated by JS) */
.nav-mobile .nav-toggle { display: flex; flex-direction: column; cursor: pointer; }
.nav-mobile .header-cta { display: none; }
.nav-mobile .site-nav { position: fixed; top: 64px; right: 0; bottom: 0; left: auto; width: 30%; transform: translateX(100%); opacity: 0; pointer-events: none; transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);  z-index: 999; background: rgb(23 26 33 / 18%); min-width: fit-content; }
.nav-mobile .site-nav.visible { transform: translateX(0); opacity: 1; }
.nav-mobile .site-nav.pointer-events-auto { pointer-events: auto; }
.nav-mobile .site-nav ul { flex-direction: column; gap: 8px; padding: 24px 20px; width: auto; max-width: 100%; background: transparent; align-items: stretch; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); flex-wrap: nowrap; }
.nav-mobile .site-nav li { width: 100%; opacity: 0; transform: translateX(20px); animation: slideInNav 0.4s ease forwards; }
.nav-mobile .site-nav li:nth-child(1) { animation-delay: 0.05s; }
.nav-mobile .site-nav li:nth-child(2) { animation-delay: 0.1s; }
.nav-mobile .site-nav li:nth-child(3) { animation-delay: 0.15s; }
.nav-mobile .site-nav li:nth-child(4) { animation-delay: 0.2s; }
.nav-mobile .site-nav li:nth-child(5) { animation-delay: 0.25s; }
.nav-mobile .site-nav li:nth-child(6) { animation-delay: 0.3s; }
.nav-mobile .site-nav li:nth-child(7) { animation-delay: 0.35s; }
.nav-mobile .site-nav li:nth-child(8) { animation-delay: 0.4s; }
.nav-mobile .site-nav ul a { display: block; padding: 14px 20px; background: rgba(20, 24, 30, 0.932); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 12px; transition: all 0.2s ease; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); will-change: backdrop-filter; }
.nav-mobile .site-nav ul a:hover { background: rgba(255, 255, 255, 0.874); border-color: var(--color-primary); transform: translateX(-4px); color: black }
.nav-mobile .site-nav { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; }
.nav-mobile .nav-cta { flex-direction: column; margin-left: 0; width: 100%; padding: 0 20px 24px; gap: 8px; margin-top: 0; box-sizing: border-box; }
.nav-mobile .nav-cta .btn { justify-content: center; width: auto; border-radius: 12px; backdrop-filter: blur(7px); }
.nav-mobile .nav-cta .btn-label { display: inline; }

@keyframes slideInNav { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }


.btn-whatsapp { background: #25D366; color: white; display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; }
.btn-whatsapp:hover { background: #20BA5A; }
.btn-call { background: var(--color-primary); color: var(--color-primary-contrast); display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; }
.btn-call svg { stroke-width: 2.5; }

/* Hero */
.hero { position: relative; overflow: clip; height: 100vh; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1); transition: transform .2s ease-out; transform-origin: center center; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.35)); pointer-events: none; }
.hero-content { display: flex; justify-content: center; align-items: center; height: 100%; padding: 0 24px; text-align: left; }
.hero-content-inner { display: flex;flex-direction: column; width: 80vw; height: 80%; justify-content: center; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform 1.4s ease; }
.hero-content-inner.visible { opacity: 1; transform: none; }
.hero h1 { font-size: clamp(5vh, 5vw, 48px); margin: 0 0 12px; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.hero p {  font-size: clamp(2.5vh, 2.5vw, 25px); margin: 0 0 24px; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.hero-actions { display: flex; gap: 12px; }

/* Sections */
.section { padding: 6vh 0; scroll-margin-top: 88px; }
.section h2 { font-size: clamp(3.5vh, 4vw, 36px); margin: 0 0 16px; text-align: center; }
.section-subtitle { color: var(--color-muted); margin: 0 0 48px; font-size: clamp(2vh, 2vw, 18px); text-align: center; padding: 0 2%; }

/* Solutions */
.solutions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 900px; margin: 0 auto; }
.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.card.fade-in { opacity: 1; transform: translateY(0); }
.problem-card { transition-delay: 0.1s; }
.solution-card { transition-delay: 0.3s; }
.card-header { padding: 16px; text-align: center; border-bottom: 1px solid var(--color-border); }
.card-header h3 { margin: 0; font-size: clamp(2.2vh, 3vw, 22px); }
.problem-card .card-header { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.solution-card .card-header { background: rgba(63, 185, 132, 0.1); color: var(--color-primary); }
.card-body { padding: 24px; }
.card ul { margin: 0; padding: 0; list-style: none; }
.card ul li { padding: 10px 0; font-size: clamp(1.8vh, 2vw, 16px); border-bottom: 1px solid var(--color-border); }
.card ul li:last-child { border-bottom: none; }

/* Services */
.services .container { padding: 0; max-width: 100%; overflow-x: hidden; }
.service-item { position: relative; height: 500px; margin-bottom: 0; width: 100%; }
.service-item:last-child { margin-bottom: 0; }
.service-image { position: absolute; top: 0; left: 0; width: 66.666%; height: 100%; margin: 0; overflow: hidden; opacity: 0; transform: translateX(-100px); transition: opacity 0.8s ease, transform 0.8s ease; }
.service-image.animate { opacity: 1; transform: translateX(0); }
.service-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-item.reverse .service-image { left: auto; right: 0; transform: translateX(100px); }
.service-item.reverse .service-image.animate { transform: translateX(0); }
.service-content {position: absolute;top: 50%;transform: translateY(-50%);left: calc(66.666% - 10vw);width: 400px;background: var(--glass-bg);backdrop-filter: var(--glass-blur);-webkit-backdrop-filter: var(--glass-blur);border: 2px solid var(--color-gold);padding: 32px;z-index: 10; opacity: 0; transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;box-sizing: border-box;}
.service-content.animate { opacity: 1; }
.service-item .service-content { transform: translateY(-50%) translateX(80px); }
.service-item .service-content.animate { transform: translateY(-50%) translateX(0); }
.service-item.reverse .service-content { left: calc(33.333% + 10vw - 400px); transform: translateY(-50%) translateX(-80px); }
.service-item.reverse .service-content.animate { transform: translateY(-50%) translateX(0); }
.service-content h3 { font-size: clamp(3vh, 4vw, 28px); margin: 0 0 16px; color: var(--color-text); }
.service-content p { margin: 0; line-height: 1.7; font-size: clamp(1.8vh, 2vw, 16px); }

/* Services stacked layout (enabled via JS) */
.services.services-stacked .container { padding: 0; max-width: 100%; overflow-x: hidden; }
.services.services-stacked .service-item { height: auto; min-height: 400px; margin-bottom: 40px; display: flex; flex-direction: column; }
.services.services-stacked .service-image { position: relative; width: 100%; height: 300px; left: 0 !important; right: 0 !important; transform: none !important; opacity: 1 !important; }
.services.services-stacked .service-item.reverse .service-image { left: 0; right: auto; }
.services.services-stacked .service-content { position: relative; left: 0 !important; right: 0 !important; margin: -60px 5% 0 5% !important; transform: none !important; top: auto !important; width: 90% !important; max-width: 90% !important; }
.services.services-stacked .service-item.reverse .service-content { left: 0 !important; margin: -60px 5% 0 5% !important; }

/* Brands */
.brands-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; max-width: 1000px; margin: 0 auto; align-items: center; }
.brand-logo { display: flex; align-items: center; justify-content: center; padding: 24px; transition: transform 0.3s ease, border-color 0.3s ease; }
.brand-logo:hover { transform: translateY(-4px); border-color: var(--color-primary); }
.brand-logo img { width: 100%; height: auto; max-height: 60px; object-fit: contain; transition: filter 0.3s ease; }
.brand-logo:hover img { filter: grayscale(0) opacity(1); }

/* Years Experience */
.years-experience {padding: 0 0 60px  0; text-align: center; }
.years-text { font-size: clamp(2.8vh, 3vw, 28px); color: var(--color-muted); margin: 0 0 16px 0; letter-spacing: 0.5px; font-weight: 400; }
.years-number { font-size: clamp(8vh, 12vw, 120px); font-weight: 900; margin: 0; line-height: 1.1; color: var(--color-text); white-space: nowrap; }

/* Contact Hero Section */
.contact-hero { padding: 0; }
.contact-hero-header { position: relative; height: 500px; width: 100vw; margin-left: calc(-50vw + 50%); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.contact-hero-bg { position: absolute; inset: 0; z-index: 0; }
.contact-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.contact-hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; max-width: 1000px; padding: 0 24px; }
.contact-hero-title-card { background: var(--glass-bg); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); border: 2px solid var(--color-gold); padding: 40px 64px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4); }
.contact-hero-title-card h2 { margin: 0 0 24px 0; font-size: clamp(4.5vh, 5vw, 56px); font-weight: 900; text-transform: uppercase; letter-spacing: 4px; color: white; text-align: center; }
.contact-hero-subtitle { text-align: center; font-size: clamp(2vh, 2vw, 18px); color: white; line-height: 1.7; margin: 0; max-width: 700px; }
.contact-content { padding: 80px 5%; max-width: 100%; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 1400px; margin: 0 auto; }
.contact-info-section h3 { font-size: clamp(2.5vh, 3vw, 24px); margin: 0 0 32px 0; color: var(--color-text); }
.contact-details { list-style: none; padding: 0; margin: 0; }
.contact-details li { margin-bottom: 28px; }
.contact-details li > a { display: flex; align-items: flex-start; gap: 16px; padding: 20px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; transition: border-color 0.3s ease, transform 0.3s ease; text-decoration: none; width: 100%; box-sizing: border-box; }
.contact-details li > a:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.contact-details svg { flex-shrink: 0; margin-top: 4px; opacity: 0.8; color: var(--color-primary); width: 20px; height: 20px; }
.contact-details div { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.contact-details strong { color: var(--color-text); font-size: clamp(1.5vh, 1.5vw, 14px); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-details span { color: var(--color-muted); font-size: clamp(1.8vh, 2vw, 16px); word-break: break-word; overflow-wrap: break-word; }
.contact-details a:hover { color: var(--color-primary); }
.contact-map-section { height: 500px; border-radius: 16px; overflow: hidden; border: 1px solid var(--color-border); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); }
.contact-map-section iframe { width: 100%; height: 100%; border: 0; }

/* Footer */
.site-footer { background: linear-gradient(180deg, #0c0e12 0%, #08090d 100%); border-top: 1px solid rgba(255,255,255,0.08); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding-bottom: 48px; }
.footer-col { }
.footer-brand-col { }
.footer-logo { height: 42px; width: auto; margin-bottom: 20px; filter: brightness(1.1); }
.footer-tagline { color: var(--color-muted); line-height: 1.7; margin: 0; font-size: clamp(2.2vh, 1.8vw, 18px); opacity: 0.85; }
.footer-heading { font-size: clamp(2.5vh, 2.3vw, 20px); font-weight: 600; margin: 0 0 24px 0; color: var(--color-text); letter-spacing: 0.3px; }
.footer-contact-list { list-style: none; padding: 0; margin: 0; }
.footer-contact-list li { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; color: var(--color-muted); font-size: clamp(2.2vh, 1.8vw, 18px); }
.footer-contact-list svg { flex-shrink: 0; margin-top: 2px; opacity: 0.6; }
.footer-contact-list a { color: var(--color-muted); text-decoration: none; transition: color 0.2s ease; }
.footer-contact-list a:hover { color: var(--color-primary); }
.footer-links { list-style: none; padding: 0; margin: 0 0 24px 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--color-muted); text-decoration: none; font-size: clamp(2.2vh, 1.8vw, 18px); transition: color 0.2s ease; display: inline-block; }
.footer-links a:hover { color: var(--color-text); transform: translateX(4px); }
.footer-legal { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 8px; }
.footer-legal a { color: var(--color-muted); text-decoration: none; font-size: clamp(2vh, 1.5vw, 16px); opacity: 0.7; transition: opacity 0.2s ease; }
.footer-legal a:hover { opacity: 1; }
.footer-bottom { background: #06070a; border-top: 1px solid rgba(255,255,255,0.05); padding: 20px 0; }
.footer-bottom p { margin: 0; text-align: center; color: var(--color-muted); font-size: clamp(2vh, 1.5vw, 16px); opacity: 0.7; }

/* Mosaic legacy (se ancora presente) */
.mosaic { padding: 80px 0; }

/* Galleria lavori ? schede per servizio (identit? oro + glass) */
.gallery { position: relative; }
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 0 28px;
}
.gallery-tab {
  appearance: none;
  font: inherit;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 0;
  border: 2px solid rgba(212, 175, 55, 0.35);
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-muted);
  font-weight: 600;
  letter-spacing: .3px;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}
.gallery-tab:hover {
  color: var(--color-text);
  border-color: var(--color-gold);
  transform: translateY(-1px);
}
.gallery-tab.is-active {
  color: var(--color-gold-contrast);
  background: var(--color-gold);
  border-color: var(--color-gold);
}
.gallery-tab:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 2px; }

.gallery-panels { position: relative; }
.gallery-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 2px solid var(--color-gold);
  border-radius: 0;
  padding: 28px 24px 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: galleryPanelIn .35s ease;
}
.gallery-panel[hidden] { display: none !important; }
@keyframes galleryPanelIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.gallery-panel-intro { max-width: 720px; margin: 0 auto 28px; text-align: center; }
.gallery-panel-intro h3 {
  margin: 0 0 10px;
  font-size: clamp(2.4vh, 2.8vw, 26px);
  color: #fff;
}
.gallery-panel-intro p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
  font-size: clamp(1.7vh, 1.8vw, 16px);
}

.gallery-panel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-shot {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: 1px solid var(--color-gold-border);
  background: #000;
  aspect-ratio: 1 / 1;
}
.gallery-shot img,
.gallery-shot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.gallery-shot:hover img,
.gallery-shot:hover video { transform: scale(1.04); }
.gallery-shot:hover { border-color: var(--color-gold-bright); }
.gallery-shot-hero { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; min-height: 280px; }
.gallery-shot-wide { grid-column: span 2; aspect-ratio: 16 / 9; }
.gallery-shot-video { aspect-ratio: 9 / 12; }

.service-content .gallery-open,
.service-content .btn-outline {
  margin-top: 16px;
  border: 1px solid var(--color-gold);
  color: #fff;
  background: transparent;
  border-radius: 0;
}
.service-content .gallery-open:hover,
.service-content .btn-outline:hover {
  background: var(--color-gold-soft);
  border-color: var(--color-gold-bright);
  color: #fff;
}

@media (max-width: 900px) {
  .gallery-panel-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-shot-hero { min-height: 200px; }
}
@media (max-width: 560px) {
  .gallery-panel-grid { grid-template-columns: 1fr; }
  .gallery-shot-hero,
  .gallery-shot-wide { grid-column: span 1; aspect-ratio: 4 / 3; min-height: 0; }
  .gallery-shot-video { aspect-ratio: 4 / 5; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-panel { animation: none; }
  .gallery-shot img,
  .gallery-shot video { transition: none; }
  .gallery-shot:hover img,
  .gallery-shot:hover video { transform: none; }
}

/* ==========================================================================
   Visualizzatore AI ? wizard a step (stile sito)
   ========================================================================== */
.ai-visualizer {
  position: relative;
  overflow: hidden;
  scroll-margin-top: 96px;
}
.ai-visualizer .container { position: relative; z-index: 1; max-width: 1000px; }

.viz-header { text-align: center; margin-bottom: 28px; }
.viz-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 14px;
  border: 1px solid var(--color-gold-border);
  background: var(--color-gold-soft);
  color: var(--color-gold-bright);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.viz-ai-icon { flex-shrink: 0; animation: vizSparkPulse 2.4s ease-in-out infinite; }
@keyframes vizSparkPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.08); }
}

/* Fascio di luce rotante (come SAI su Start Claims) */
.viz-wizard-wrap {
  position: relative;
  padding: 2px;
  overflow: hidden;
  isolation: isolate;
  box-shadow:
    0 0 32px -6px rgba(212, 175, 55, 0.5),
    0 0 64px -12px rgba(240, 208, 96, 0.28);
  animation: vizGlowPulse 3.5s ease-in-out infinite;
}
.viz-ai-glow {
  position: absolute;
  inset: -120%;
  z-index: 0;
  opacity: 0.85;
  pointer-events: none;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 255deg,
    var(--color-gold) 280deg,
    var(--color-gold-bright) 310deg,
    #fff4c4 335deg,
    #e8c547 350deg,
    var(--color-gold) 360deg
  );
  animation: vizGlowSpin 5s linear infinite;
}
@keyframes vizGlowSpin {
  to { transform: rotate(360deg); }
}
@keyframes vizGlowPulse {
  0%, 100% {
    box-shadow:
      0 0 32px -6px rgba(212, 175, 55, 0.5),
      0 0 64px -12px rgba(240, 208, 96, 0.28);
  }
  50% {
    box-shadow:
      0 0 48px -2px rgba(240, 208, 96, 0.65),
      0 0 88px -8px rgba(212, 175, 55, 0.35);
  }
}

.viz-wizard {
  position: relative;
  z-index: 1;
  /* Fondo pieno: il fascio oro resta solo sul bordo (padding del wrap), non dietro il vetro */
  background: #12151c;
  border: none;
  padding: 32px;
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.12);
}

.ai-visualizer .btn-primary {
  background: var(--color-gold);
  color: var(--color-gold-contrast);
  border-radius: 0;
  border: 1px solid var(--color-gold);
}
.ai-visualizer .btn-primary:hover {
  background: var(--color-gold-bright);
  border-color: var(--color-gold-bright);
}
.ai-visualizer .btn-outline {
  border-radius: 0;
  border: 1px solid var(--color-gold-border);
  background: transparent;
  color: #fff;
}
.ai-visualizer .btn-outline:hover {
  border-color: var(--color-gold);
  background: var(--color-gold-soft);
}

.viz-stepper { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 28px; padding: 0; scroll-margin-top: 88px; }
.viz-stepper li {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 10px;
  color: var(--color-muted);
  border-bottom: 2px solid transparent;
  font-size: clamp(1.5vh, 1.5vw, 14px);
}
.viz-step-num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 700;
}
.viz-stepper li.is-active { color: var(--color-gold-bright); border-bottom-color: var(--color-gold); font-weight: 600; }
.viz-stepper li.is-active .viz-step-num {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-gold-contrast);
}
@media (max-width: 700px) {
  .viz-stepper { flex-wrap: nowrap; gap: 6px; justify-content: center; }
  .viz-stepper li { flex: 0 0 auto; padding: 8px 6px; gap: 0; }
  .viz-step-label { display: none; }
}

.viz-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ffb4b4;
  padding: 12px 16px;
  margin: 0 0 20px;
  font-size: clamp(1.7vh, 1.8vw, 15px);
}

.viz-wizard.has-review-gate {
  min-height: 560px;
}
.viz-review-gate {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow: auto;
  background: rgba(12, 15, 22, 0.96);
}
.viz-review-gate[hidden] { display: none; }
.viz-review-card {
  width: min(100%, 520px);
  text-align: center;
  color: #fff;
}
.viz-review-kicker {
  margin: 0 0 8px;
  color: var(--color-gold-bright);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
}
.viz-review-card h3 {
  margin: 0 0 12px;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  color: #fff;
}
.viz-review-copy {
  margin: 0 0 18px;
  color: var(--color-muted);
  font-size: clamp(1.5vh, 1.6vw, 15px);
  line-height: 1.55;
}
.viz-review-copy strong { color: var(--color-gold-bright); font-weight: 700; }
.viz-review-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 6px;
  cursor: pointer;
  color: var(--color-gold);
  font-size: 42px;
  line-height: 1;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(240, 208, 96, 0.45);
}
.viz-star {
  display: inline-block;
  transform-origin: center;
  animation: vizStarPulse 1.8s ease-in-out infinite;
}
.viz-star:nth-child(2) { animation-delay: .08s; }
.viz-star:nth-child(3) { animation-delay: .16s; }
.viz-star:nth-child(4) { animation-delay: .24s; }
.viz-star:nth-child(5) { animation-delay: .32s; }
@keyframes vizStarPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.viz-review-stars-label {
  margin: 0 0 20px;
  color: var(--color-gold-bright);
  font-size: 13px;
  font-weight: 600;
}
.viz-review-guide {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 8px;
}
.viz-review-guide li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(0, 0, 0, 0.22);
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.4;
}
.viz-review-guide li span {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-muted);
}
.viz-review-guide li.is-current {
  color: #fff;
  border-color: var(--color-gold);
  background: var(--color-gold-soft);
}
.viz-review-guide li.is-current span {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-gold-contrast);
}
.viz-review-guide li.is-done {
  color: var(--color-text);
  border-color: rgba(63, 185, 132, 0.45);
}
.viz-review-guide li.is-done span {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #0a0c10;
}
.viz-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.viz-review-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.viz-review-inline-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #ffb4b4;
  padding: 10px 12px;
  margin: 0 0 16px;
  font-size: 14px;
}
.viz-step h3 {
  font-size: clamp(2.4vh, 2.6vw, 22px);
  margin: 0 0 20px;
  text-align: center;
  outline: none;
  color: #fff;
}
.viz-step-actions,
.viz-capture-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.viz-btn-generate { display: inline-flex; align-items: center; gap: 8px; }

.viz-dropzone {
  border: 2px dashed rgba(212, 175, 55, 0.55);
  background: rgba(0, 0, 0, 0.25);
  padding: 40px 24px;
  text-align: center;
  color: var(--color-muted);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.viz-dropzone:hover,
.viz-dropzone:focus-visible,
.viz-dropzone.is-dragover {
  border-color: var(--color-gold-bright);
  background: var(--color-gold-soft);
  color: #fff;
  outline: none;
}
.viz-dropzone-icon { color: var(--color-gold); display: block; margin-bottom: 12px; }
.viz-spark { opacity: .85; animation: vizSparkPulse 2s ease-in-out infinite; }
.viz-spark-delay { animation-delay: .6s; }
.viz-dropzone p { margin: 0; line-height: 1.5; }
.viz-dropzone-hint { display: block; margin-top: 8px; font-size: 12px; opacity: .75; }

.viz-webcam { margin-top: 24px; text-align: center; }
.viz-webcam video {
  width: 100%;
  max-width: 520px;
  border: 2px solid var(--color-gold);
  background: #000;
}

.viz-filter-hint {
  margin: 0 0 16px;
  text-align: center;
  color: var(--color-muted);
  font-size: clamp(1.5vh, 1.6vw, 14px);
}
.viz-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 20px;
}
.viz-cat-btn {
  appearance: none;
  font: inherit;
  cursor: pointer;
  padding: 8px 14px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: transparent;
  color: var(--color-muted);
  font-size: 13px;
}
.viz-cat-btn:hover { color: var(--color-text); border-color: var(--color-gold); }
.viz-cat-btn.is-active {
  color: var(--color-gold-contrast);
  background: var(--color-gold);
  border-color: var(--color-gold);
}

.viz-frame-slider {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.viz-frame-nav {
  appearance: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-gold-border);
  background: rgba(212, 175, 55, 0.1);
  color: var(--color-gold-bright);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.viz-frame-nav:hover:not(:disabled) {
  background: var(--color-gold);
  color: var(--color-gold-contrast);
}
.viz-frame-nav:disabled {
  opacity: 0.35;
  cursor: default;
}
.viz-frame-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.65) rgba(20, 24, 30, 0.95);
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
.viz-frame-track::-webkit-scrollbar {
  height: 6px;
}
.viz-frame-track::-webkit-scrollbar-track {
  background: rgba(20, 24, 30, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.2);
}
.viz-frame-track::-webkit-scrollbar-thumb {
  background: var(--color-gold);
  border: none;
}
.viz-frame-track::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-bright);
}
.viz-frame-track::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.viz-frame-card {
  appearance: none;
  font: inherit;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  transition: border-color .2s ease, transform .2s ease;
  flex: 0 0 min(200px, 72vw);
  scroll-snap-align: start;
}
.viz-frame-card:hover { transform: translateY(-2px); border-color: var(--color-gold); }
.viz-frame-card.is-selected {
  border-color: var(--color-gold-bright);
  box-shadow: inset 0 0 0 1px var(--color-gold);
}
.viz-frame-swatch {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #222;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
}
.viz-frame-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.viz-frame-name { font-size: clamp(1.6vh, 1.7vw, 14px); font-weight: 600; line-height: 1.3; }
.viz-frame-cat {
  font-size: clamp(1.3vh, 1.4vw, 12px);
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.viz-confirm {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: center;
}
.viz-confirm-photo {
  flex: 1 1 280px;
  max-width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.viz-confirm-img {
  width: 100%;
  max-height: min(42vh, 360px);
  border: 2px solid var(--color-gold);
  object-fit: contain;
  background: #000;
  display: block;
}
.viz-confirm-info {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 220px;
  max-width: 340px;
}
.viz-confirm-label {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--color-gold);
}
.viz-confirm-material {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(0, 0, 0, 0.28);
}
.viz-confirm-swatch {
  flex-shrink: 0;
  width: 88px;
  height: 64px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: #222;
  overflow: hidden;
  display: block;
}
.viz-confirm-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.viz-confirm-material-text { min-width: 0; }
.viz-confirm-frame {
  margin: 0 0 4px;
  font-size: clamp(1.8vh, 2vw, 18px);
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.viz-confirm-cat {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--color-gold-bright);
}

.viz-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 16px;
  text-align: center;
  color: var(--color-muted);
}
.viz-loading-orb {
  position: relative;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
}
.viz-spinner {
  width: 56px;
  height: 56px;
  border: 3px solid rgba(212, 175, 55, 0.25);
  border-top-color: var(--color-gold);
  border-radius: 50%;
  animation: vizSpin 0.9s linear infinite;
}
@keyframes vizSpin { to { transform: rotate(360deg); } }
.viz-loading-spark {
  position: absolute;
  color: var(--color-gold-bright);
  animation: vizSparkPulse 1.4s ease-in-out infinite;
}
.viz-loading p { margin: 0; color: var(--color-text); font-weight: 600; }
.viz-loading-sub { font-size: 13px !important; font-weight: 400 !important; color: var(--color-muted) !important; }

.viz-compare {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--color-gold);
  background: #000;
  user-select: none;
  touch-action: none;
  max-width: min(820px, 100%);
  max-height: min(58vh, 560px);
  margin: 0 auto;
}
.viz-compare img { display: block; width: 100%; height: auto; max-height: min(58vh, 560px); object-fit: contain; }
.viz-compare-after { position: relative; z-index: 1; }
.viz-compare-before-wrap { position: absolute; inset: 0; z-index: 2; clip-path: inset(0 50% 0 0); }
.viz-compare-before-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.viz-compare-handle {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
}
.viz-compare-handle-line {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 2px;
  background: var(--color-gold);
  transform: translateX(-50%);
}
.viz-compare-handle-grip {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid #fff;
  position: relative;
}
.viz-compare-handle-grip::before,
.viz-compare-handle-grip::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transform: translateY(-50%);
}
.viz-compare-handle-grip::before { left: 8px; border-right: 7px solid var(--color-gold-contrast); }
.viz-compare-handle-grip::after { right: 8px; border-left: 7px solid var(--color-gold-contrast); }
.viz-compare-tag {
  position: absolute;
  bottom: 12px;
  z-index: 4;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.5);
}
.viz-compare-tag-before { left: 12px; }
.viz-compare-tag-after {
  right: 12px;
  background: rgba(212, 175, 55, 0.9);
  color: var(--color-gold-contrast);
  border-color: var(--color-gold);
}

.viz-privacy {
  margin: 20px auto 0;
  max-width: 760px;
  text-align: center;
  font-size: clamp(1.5vh, 1.5vw, 13px);
  color: var(--color-muted);
  line-height: 1.6;
}
.viz-privacy a { color: var(--color-gold-bright); }

@media (prefers-reduced-motion: reduce) {
  .viz-spinner { animation-duration: 2s; }
  .viz-ai-icon, .viz-spark, .viz-loading-spark,
  .nav-link-ai, .nav-link-ai::before, .nav-link-ai::after,
  .viz-ai-glow, .viz-wizard-wrap { animation: none; }
  .viz-frame-card:hover { transform: none; }
  .viz-star { animation: none; }
}

/* ?? Portfolio / Realizzazioni (foto-first) ?? */
.projects-preview-cta { text-align: center; margin-top: 36px; }
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.project-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  border: 1px solid var(--color-gold-border);
  background: #000;
  aspect-ratio: 16 / 11;
}
.project-card:hover { border-color: var(--color-gold-bright); }
.project-card-media {
  position: absolute;
  inset: 0;
}
.project-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.project-card:hover .project-card-media img { transform: scale(1.04); }
.project-card-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 18px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.project-card-category {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--color-gold);
  letter-spacing: .4px;
  text-transform: uppercase;
}
.project-card-body h3 {
  margin: 0;
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.3;
  font-weight: 600;
  color: #fff;
}

.production-intro {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
  color: var(--color-muted);
  line-height: 1.7;
}
.production-intro p { margin: 0 0 12px; font-size: clamp(1.7vh, 1.8vw, 16px); }
.production-videos {
  display: flex;
  justify-content: center;
}
.production-video {
  margin: 0;
  position: relative;
  overflow: hidden;
  width: min(100%, 420px);
}
.production-video video,
.production-video-el {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: #000;
  border: 1px solid var(--color-gold-border);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.production-video figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
}

.page-header {
  padding: calc(80px + 5vh) 0 2vh;
  text-align: center;
  position: relative;
}
.page-header h1 {
  margin: 0 0 12px;
  font-size: clamp(3.5vh, 4vw, 40px);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}
.page-header .section-subtitle {
  margin: 0 auto;
  max-width: 640px;
  color: rgba(230, 233, 239, 0.78);
}
.page-header::after {
  content: "";
  display: block;
  width: 56px;
  height: 2px;
  margin: 28px auto 0;
  background: var(--color-gold);
}


.works-gallery-section {
  padding-top: 12px;
  padding-bottom: 88px;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(212, 175, 55, 0.06), transparent 55%);
}
.works-gallery-section .container { max-width: 1120px; }

.work-block {
  margin: 0 0 72px;
  scroll-margin-top: 96px;
}
.work-block:last-child { margin-bottom: 0; }

.work-block-head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
}
.work-block-index {
  flex-shrink: 0;
  font-size: clamp(2.8rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-gold);
  letter-spacing: -0.02em;
  opacity: 0.85;
}
.work-block-titles { min-width: 0; padding-top: 4px; }
.work-block-titles h2 {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  color: #fff;
  font-weight: 700;
}
.work-group-category {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--color-gold);
  letter-spacing: .5px;
  text-transform: uppercase;
  font-weight: 600;
}
.work-group-type {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
}

.work-block-body {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 0;
  border: 2px solid var(--color-gold);
  background: #0c0e12;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.work-block--reverse .work-block-body {
  grid-template-columns: minmax(280px, 0.75fr) minmax(0, 1.35fr);
}
.work-block--reverse .work-group-photos { order: 2; }
.work-block--reverse .work-group-copy { order: 1; }

.work-group-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
  background: #141820;
}
.work-shot {
  margin: 0;
  border: none;
  border-right: 1px solid rgba(212, 175, 55, 0.28);
  border-bottom: 1px solid rgba(212, 175, 55, 0.28);
  background: #141820;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.work-shot--lead {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
  min-height: 260px;
}
/* Una sola foto: riempie tutta l'altezza della colonna (niente buco sotto) */
.work-group-photos:has(> .work-shot:only-child) {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}
.work-group-photos > .work-shot:only-child {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  min-height: 100%;
  height: 100%;
}
/* Evita il “buco” nero: se sotto la lead resta 1 sola foto (o un numero dispari), l’ultima occupa tutta la riga */
.work-group-photos .work-shot:not(.work-shot--lead):last-child:nth-child(even) {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 10;
}
.work-shot-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}
.work-shot-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease, filter .4s ease;
  filter: saturate(1.02);
}
.work-shot:hover img { transform: scale(1.04); }

.work-group-copy {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(160deg, rgba(212, 175, 55, 0.08), transparent 42%),
    #141820;
  border-left: 1px solid rgba(212, 175, 55, 0.28);
}
.work-block--reverse .work-group-copy {
  border-left: none;
  border-right: 1px solid rgba(212, 175, 55, 0.28);
}
.work-group-desc p {
  margin: 0 0 14px;
  color: rgba(230, 233, 239, 0.9);
  line-height: 1.7;
  font-size: clamp(15px, 1.6vw, 16px);
}
.work-group-desc p:last-child { margin-bottom: 0; }
.work-group-highlights {
  list-style: none;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  display: grid;
  gap: 10px;
}
.work-group-highlights li {
  position: relative;
  padding-left: 18px;
  color: rgba(230, 233, 239, 0.82);
  font-size: 14px;
  line-height: 1.45;
}
.work-group-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  background: var(--color-gold);
}

.project-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.project-lightbox[hidden] { display: none !important; }
.project-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
}
.project-lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 90vh;
}
.project-lightbox-figure img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--color-gold-border);
}
.project-lightbox-figure figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.project-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 2;
  background: transparent;
  border: 1px solid var(--color-gold-border);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 12px;
}
.project-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(0,0,0,.45);
  border: 1px solid var(--color-gold-border);
  color: #fff;
  font-size: 32px;
  width: 48px;
  height: 48px;
  cursor: pointer;
}
.project-lightbox-prev { left: 16px; }
.project-lightbox-next { right: 16px; }

@media (max-width: 900px) {
  .projects-grid { grid-template-columns: 1fr; }
  .work-block-body,
  .work-block--reverse .work-block-body {
    grid-template-columns: 1fr;
  }
  .work-block--reverse .work-group-photos,
  .work-block--reverse .work-group-copy { order: initial; }
  .work-group-copy,
  .work-block--reverse .work-group-copy {
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(212, 175, 55, 0.28);
    padding: 24px 20px 28px;
  }
  .work-shot--lead { min-height: 200px; }
  .work-group-photos > .work-shot:only-child {
    min-height: 240px;
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .work-block { margin-bottom: 48px; }
  .work-block-head { gap: 14px; }
}
@media (max-width: 560px) {
  .work-group-photos { grid-template-columns: 1fr; }
  .work-shot--lead { aspect-ratio: 4 / 3; min-height: 0; }
  .work-group-photos > .work-shot:only-child {
    aspect-ratio: 4 / 3;
  }
}
@media (prefers-reduced-motion: reduce) {
  .project-card:hover .project-card-media img,
  .work-shot:hover img { transform: none; }
}
