:root {
  --orange: #F57E1D;
  --orange-dark: #E06A0F;
  --black: #090909;
  --black-2: #131313;
  --black-3: #1c1c1c;
  --white: #f4f4f4;
  --grey: #9a9a9a;
  --font-display: 'Anton', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius: 14px;
  /* Secondary accent, used sparingly and only to tell the two scroll
     transformations apart (Porsche = orange, Mustang = cyan). Named as a
     token rather than a raw hex so it stays a deliberate, single choice
     instead of colors creeping in ad hoc. */
  --accent-2: #37c9e8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

/* height:auto keeps width/height HTML attributes (added for CLS/SEO) acting
   only as an aspect-ratio hint: without it, max-width alone shrinks the
   width while the height attribute stays a literal pixel value, distorting
   any image whose CSS doesn't separately pin both dimensions (object-fit
   ones like the gallery are unaffected either way). */
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

#grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- HEADER ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(to bottom, rgba(9,9,9,0.9), rgba(9,9,9,0));
  transition: background 0.3s ease;
}
.site-header.scrolled {
  background: rgba(9,9,9,0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.topbar {
  background: var(--orange);
  font-size: 13px;
  font-weight: 600;
  color: var(--black);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  gap: 24px;
  align-items: center;
}
.topbar-hours { margin-left: auto; }
.topbar-location { display: none; }
@media (max-width: 720px) {
  .topbar-hours { display: none; }
}

.navbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-img { height: 52px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin-left: 4px;
  flex-wrap: nowrap;
}
.nav-links a {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--orange); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--orange);
  color: var(--black) !important;
  padding: 9px 18px !important;
  border-radius: 999px;
  font-weight: 700 !important;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(245,126,29,0.4); }

.nav-social {
  display: flex;
  gap: 14px;
  margin-left: auto;
}
.nav-social svg {
  width: 18px; height: 18px;
  fill: var(--white);
  opacity: 0.8;
  transition: opacity 0.2s, fill 0.2s;
}
.nav-social a:hover svg { opacity: 1; fill: var(--orange); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  width: 44px;
  height: 44px;
  margin: -8px;
  -webkit-tap-highlight-color: transparent;
}
.burger span {
  width: 24px; height: 2px; background: var(--white);
  transition: transform 0.28s ease, opacity 0.2s ease;
}
/* Hamburger → X morph */
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: flex;
  flex-direction: column;
  background: var(--black-2);
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: max-height 0.38s ease, opacity 0.25s ease, transform 0.3s ease, padding 0.38s ease;
}
.mobile-menu a {
  padding: 14px 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-menu.open {
  max-height: calc(100dvh - 90px);
  overflow-y: auto;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  padding: 16px 24px 22px;
}
.nav-cta-mobile {
  margin-top: 22px;
  padding: 16px 4px !important;
  background: var(--orange);
  color: var(--black) !important;
  text-align: center;
  justify-content: center;
  border-radius: 999px;
  border-bottom: none !important;
  font-weight: 700 !important;
  box-shadow: 0 8px 24px rgba(245,126,29,0.35);
}

/* Dark scrim behind the mobile menu: without it the menu's hard bottom
   edge just cuts off onto the still fully-lit hero/video below, which
   looks broken since the fixed header sits above everything else anyway. */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.mobile-menu-backdrop.open { opacity: 1; pointer-events: auto; }

@media (max-width: 1080px) {
  .nav-links, .nav-social { display: none; }
  .burger { display: flex; }
  /* Logo/burger navbar reflow: with nav-links and socials gone, center the
     logo independently of the burger's width instead of leaving it pinned
     to the left with a lot of empty space beside it. */
  .navbar { position: relative; justify-content: flex-end; }
  .logo-link {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}

/* ---------- HERO SCROLL 3D ---------- */
.scroll-3d {
  position: relative;
  height: 250vh;
  height: 250dvh; /* accounts for mobile browsers' collapsing address bar */
  background: var(--black);
}
.scroll-3d-sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* Text pushed to the right so more of the transformation video/photo
     shows unobstructed on the left. */
  justify-content: flex-end;
}
.scroll-3d-sticky.pin-top {
  position: absolute;
  top: 0;
  bottom: auto;
}
.scroll-3d-sticky.pin-bottom {
  position: absolute;
  top: auto;
  bottom: 0;
}
.car-stage {
  position: absolute;
  inset: 0;
}
.car-video, .car-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}
.scroll-3d-overlay {
  position: absolute;
  inset: 0;
  /* The video frame is bright and constantly changing (that's the point of
     scrubbing it), so the text band needs real darkening, not just a thin
     gradient tuned for one calm frame — otherwise it's unreadable against
     the brighter/more colorful moments. */
  background:
    linear-gradient(to bottom, rgba(9,9,9,0.72) 0%, rgba(9,9,9,0.58) 30%, rgba(9,9,9,0.58) 65%, rgba(9,9,9,0.92) 100%);
}

/* ---- Second transformation section (Mustang) ---- */
.scroll-3d--diag { height: 230vh; height: 230dvh; }
.hero-copy--compact h2.scroll-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 10px 34px rgba(0,0,0,0.7);
}
.hero-copy--compact .accent { color: var(--accent-2); text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 0 22px rgba(0,0,0,0.85); }
.scroll-3d--diag .scroll-cue-fill { background: var(--accent-2); }

.hero-copy {
  position: relative;
  z-index: 2;
  text-align: right;
  padding: 0 6vw 0 20px;
  max-width: 780px;
}
.eyebrow {
  display: inline-block;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 13px;
  margin-bottom: 18px;
  text-transform: uppercase;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9), 0 0 16px rgba(0,0,0,0.7);
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  /* A tight, dark shadow first for edge definition, then a soft one for
     depth — the old single soft blur washes out against bright/colorful
     video frames instead of separating the letters from the background. */
  text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 10px 34px rgba(0,0,0,0.7);
}
/* The SEO keyword phrase lives in the H1 for search relevance, but doesn't
   need to be as loud as the brand line — a small kicker keeps it short
   (one line, always) instead of blowing the heading up to 4-5 lines. */
.h1-kicker {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.3vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--white);
  opacity: 0.75;
  margin-bottom: 8px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
}
/* The orange accent word sits right over the (often orange) car itself —
   it needs its own strong dark shadow or it can disappear entirely. */
.hero-copy .accent { color: var(--orange); text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 0 22px rgba(0,0,0,0.85); }
/* Brand line, demoted from H1 to a styled paragraph — "Wrapping Auto a
   Viterbo" is the real H1 now, this keeps the slogan's punch without
   competing for the one heading Google actually reads for relevance. */
.hero-slogan {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1.1;
  text-transform: uppercase;
  margin-top: 10px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.95), 0 8px 26px rgba(0,0,0,0.7);
}
.hero-copy p {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--white);
  margin-top: 14px;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
}
.hero-copy .tagline {
  color: var(--grey);
  font-style: italic;
  font-size: 1rem;
  margin-top: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.85);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 26px;
}
/* Both hero CTAs: white pill with a black label and an orange neon glow —
   same treatment for primary and secondary so neither reads as an
   afterthought against the busy video background. */
.hero-ctas .btn {
  margin-top: 0;
  background: var(--white);
  color: var(--black) !important;
  border: 2px solid var(--orange);
  box-shadow: 0 0 18px rgba(245,126,29,0.7), 0 0 38px rgba(245,126,29,0.4);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hero-ctas .btn:hover {
  box-shadow: 0 0 26px rgba(245,126,29,0.9), 0 0 50px rgba(245,126,29,0.55);
  transform: translateY(-1px);
}

.btn {
  display: inline-block;
  padding: 15px 36px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: var(--orange);
  color: var(--black);
  margin-top: 34px;
  box-shadow: 0 8px 30px rgba(245,126,29,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(245,126,29,0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.scroll-cue {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-cue span {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}
.scroll-cue-bar {
  width: 160px;
  height: 3px;
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
  overflow: hidden;
}
.scroll-cue-fill {
  height: 100%;
  width: 0%;
  background: var(--orange);
}

/* ---------- SECTION SHARED ---------- */
section { padding: 110px 0; }
.section-eyebrow {
  display: block;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 13px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.services h2, .about h2, .contact h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  max-width: 780px;
}
.section-lead {
  color: var(--grey);
  margin-top: 14px;
  font-size: 1.05rem;
  max-width: 600px;
}

/* ---------- SERVIZI ---------- */
.services { background: var(--black-2); }
.services-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}
.service-card {
  background: var(--black-3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 34px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245,126,29,0.4);
  background: #1f1a15;
}
.service-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(245,126,29,0.12);
  margin-bottom: 20px;
}
.service-icon svg {
  width: 26px; height: 26px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-weight: 700;
}
.service-card p {
  color: var(--grey);
  font-size: 0.95rem;
}

/* ---------- CHI SIAMO ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.about-copy p { color: var(--grey); margin-top: 16px; max-width: 520px; }
.about-copy .quote {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.01em;
  margin: 26px 0;
}
.about-ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.about-ctas .btn,
.lavori-cta-buttons .btn { margin-top: 0; }
.about-media {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 340px;
}

/* Two work-in-progress shots as offset "polaroids" that fly in from
   opposite sides, rotating and settling into an overlapping collage —
   triggered once as the section scrolls into view. */
.about-photo {
  position: absolute;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--black-3);
  opacity: 0;
  transition: opacity 1s cubic-bezier(0.16, 0.84, 0.44, 1), transform 1s cubic-bezier(0.16, 0.84, 0.44, 1);
}
.about-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.about-photo--main {
  inset: 0 14% 16% 0;
  z-index: 1;
  transform: translate3d(-70px, 0, 0) rotate(-8deg) scale(0.9);
}
.about-photo--accent {
  width: 56%;
  aspect-ratio: 1 / 1;
  right: -4%;
  bottom: -6%;
  z-index: 2;
  transform: translate3d(70px, 50px, 0) rotate(10deg) scale(0.85);
  transition-delay: 0.18s;
}
.about-media.in-view .about-photo { opacity: 1; }
.about-media.in-view .about-photo--main { transform: translate3d(0, 0, 0) rotate(-3deg) scale(1); }
.about-media.in-view .about-photo--accent { transform: translate3d(0, 0, 0) rotate(4deg) scale(1); }

@media (max-width: 880px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; margin-bottom: 10px; }
}
@media (max-width: 480px) {
  .about-photo--main { inset: 0 20% 20% 0; transform: translate3d(-40px, 0, 0) rotate(-6deg) scale(0.9); }
  .about-photo--accent { width: 62%; right: -2%; bottom: -4%; transform: translate3d(40px, 30px, 0) rotate(8deg) scale(0.85); }
}

/* ---------- RECENSIONI — slider ---------- */
.reviews { background: var(--black); text-align: center; }
.reviews .section-lead { margin: 0 auto 44px; }

.reviews-slider { position: relative; }

.reviews-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  text-align: left;
  /* overflow-x:auto forces the other axis to clip too, so the active
     card's glow needs real padding on every side or it gets sheared off
     flat instead of fading out. */
  padding: 36px 32px 44px;
  scrollbar-width: none;
}
.reviews-track::-webkit-scrollbar { display: none; }

.review-card {
  flex: 0 0 auto;
  /* Exactly 3 full cards fit the track at once — no partial sliver of a
     4th one peeking in at the edge. */
  width: calc((100% - 40px) / 3);
  scroll-snap-align: start;
  background: var(--black-2);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0.5;
  transform: scale(0.95);
  transition: opacity 0.35s ease, transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.review-card.is-active {
  opacity: 1;
  transform: scale(1);
  border-color: var(--orange);
  animation: reviewGlow 2.2s ease-in-out infinite;
}
@keyframes reviewGlow {
  0%, 100% { box-shadow: 0 0 16px 2px rgba(245,126,29,0.35); }
  50% { box-shadow: 0 0 30px 6px rgba(245,126,29,0.65); }
}
.review-head { display: flex; align-items: center; gap: 12px; }
.review-head-text { display: flex; flex-direction: column; gap: 4px; }
.review-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--black);
}
.review-avatar--1 { background: var(--orange); }
.review-avatar--2 { background: var(--accent-2); }
.review-avatar--3 { background: #8fd694; }
.review-avatar--4 { background: #e8a4d0; }
.review-avatar--5 { background: #c9b48a; }
.review-name { font-size: 0.9rem; }
.review-stars { color: var(--orange); font-size: 0.85rem; letter-spacing: 0.05em; }
.review-text { color: var(--grey); font-size: 0.9rem; line-height: 1.6; }
.reviews-cta { margin-top: 32px; }

.reviews-arrow {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(19,19,19,0.9);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.reviews-arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.reviews-arrow:hover { border-color: var(--orange); color: var(--orange); }
.reviews-arrow--prev { left: -23px; }
.reviews-arrow--next { right: -23px; }
.reviews-arrow[disabled] { opacity: 0.25; cursor: default; pointer-events: none; }

.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: -14px;
}
.reviews-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.reviews-dot.is-active { background: var(--orange); transform: scale(1.3); }

/* Below desktop, 3 full cards side by side would be unreadably narrow —
   switch to one centered card at a time, still swipeable, with the next/
   previous cards peeking in from the edges. The track needs matching
   side padding so the very first/last card can actually reach the center
   snap position instead of being stuck flush against the edge. */
@media (max-width: 900px) {
  .review-card { width: 78%; scroll-snap-align: center; }
  .reviews-track { padding-inline: 11%; margin-inline: 0; }
  .reviews-arrow { display: none; }
}
@media (max-width: 600px) {
  .review-card { width: 84vw; }
  .reviews-track { padding-inline: 8vw; }
}

/* ---------- CONTATTI ---------- */
.contact { background: var(--black-2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-list { margin-top: 30px; list-style: none; }
.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.contact-list svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--orange);
  stroke-width: 1.6;
  flex-shrink: 0;
  margin-top: 2px;
}
.contact-list a:hover { color: var(--orange); }
.contact-socials {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.contact-socials a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.contact-socials a svg { width: 20px; height: 20px; fill: var(--white); transition: fill 0.2s ease; }
.contact-socials a:hover { border-color: var(--orange); background: rgba(245,126,29,0.1); }
.contact-socials a:hover svg { fill: var(--orange); }
.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 380px;
  border: 1px solid rgba(255,255,255,0.08);
}
.contact-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: grayscale(0.3) invert(0.92) contrast(0.9); }
@media (max-width: 880px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.footer-logo { height: 34px; width: auto; flex-shrink: 0; opacity: 0.85; }
.footer-inner p { color: var(--grey); font-size: 0.85rem; }
.back-to-top {
  color: var(--grey);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.back-to-top:hover { color: var(--orange); }
.footer-legal-link { color: var(--grey); font-size: 0.85rem; font-weight: 600; }
.footer-legal-link:hover { color: var(--orange); }

/* ---------- FLOATING BUTTONS: WhatsApp + torna su ---------- */
.fab-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease, visibility 0.25s ease;
  border: none;
  cursor: pointer;
}
.fab:hover { transform: translateY(-2px); }
.fab-whatsapp { background: #25D366; }
.fab-whatsapp svg { width: 28px; height: 28px; fill: var(--black); }
.fab-top {
  background: var(--black-3);
  border: 1.5px solid rgba(255,255,255,0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
}
.fab-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.fab-top svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* On the configurator page a sticky summary bar hugs the bottom edge —
   lift the floating buttons above it so they never overlap the CTA. */
.configurator-page ~ .fab-stack,
.configurator-page + .fab-stack {
  bottom: 96px;
}

@media (max-width: 600px) {
  .fab-stack { right: 14px; bottom: 14px; gap: 10px; }
  .fab { width: 48px; height: 48px; }
  .configurator-page ~ .fab-stack,
  .configurator-page + .fab-stack {
    bottom: 88px;
  }
}

/* ---------- PRIVACY / COOKIE POLICY POPUP (in-page, no navigation) ---------- */
.legal-overlay {
  position: fixed; inset: 0;
  background: rgba(9,9,9,0.85);
  backdrop-filter: blur(6px);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}
.legal-overlay[hidden] { display: none; }
.legal-modal {
  position: relative;
  background: var(--black-2);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 720px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}
.legal-modal h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.5rem;
  margin: 6px 0 20px;
}
.legal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.legal-body { color: var(--grey); font-size: 0.9rem; line-height: 1.7; }
.legal-body h3 {
  font-family: var(--font-body);
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 12px;
}
.legal-body h4 {
  color: var(--orange);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 24px 0 10px;
}
.legal-body p { margin-bottom: 12px; }
.legal-body ul { margin: 0 0 12px 20px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--orange); text-decoration: underline; }
.legal-body strong { color: var(--white); }
@media (max-width: 600px) {
  .legal-modal { padding: 26px 20px; }
}

/* ================= MOBILE OPTIMIZATIONS ================= */
@media (max-width: 600px) {
  /* Tighter, faster-reading sections: less dead air on small screens */
  section { padding: 64px 0; }
  .container { padding: 0 18px; }

  /* Top bar: drop the email, show the town + the phone number (primary CTA on mobile) */
  .topbar-inner { gap: 14px; padding: 6px 18px; }
  .topbar-item.topbar-email { display: none; }
  .topbar-item.topbar-location { display: inline-block; font-weight: 700; }
  .topbar-inner .topbar-phone { margin-left: auto; }

  .logo-img { height: 40px; }
  .navbar { padding: 10px 18px; gap: 16px; }

  /* Hero, mobile only: split the pinned viewport into two clear zones —
     the transformation video on top (full car, own box, not squeezed
     behind text) and the headline/CTAs below on solid ground. Overlapping
     bright video with a big text block was what made both unreadable and
     the car look tiny; stacking them removes the fight for the same pixels
     while keeping the scroll-scrubbed animation intact. */
  .scroll-3d-sticky {
    flex-direction: column;
    justify-content: flex-start;
    background: var(--black);
  }
  /* Start the video right under the fixed header instead of behind it —
     otherwise its top slice is permanently hidden and the first thing
     visible on load is a cropped, half-covered frame. */
  .car-stage {
    position: relative;
    inset: auto;
    width: 100%;
    height: 34dvh;
    margin-top: 96px;
    flex: 0 0 auto;
  }
  .scroll-3d-overlay {
    position: absolute;
    inset: auto;
    top: 96px; left: 0;
    width: 100%;
    height: 34dvh;
  }
  .car-video, .car-canvas {
    top: 0; left: 0; right: 0; bottom: 0;
    transform: none;
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center center;
  }
  /* Fill the remaining sticky height and center the text within it —
     otherwise a short section (like the compact Mustang hero, with far
     less copy than the main one) leaves a big dead gap at the bottom. */
  .hero-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 16px 16px 64px;
  }
  .hero-ctas { justify-content: center; }
  /* The Mustang hero has much less copy than the main one — give its video
     more of the screen instead of centering two lines of text in a mostly
     empty box, which just moves the dead space above and below it. */
  .scroll-3d--diag .car-stage,
  .scroll-3d--diag .scroll-3d-overlay {
    height: 54dvh;
  }
  .hero-copy--compact {
    justify-content: flex-start;
    padding-top: 26px;
  }
  .hero-copy h1 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }
  .hero-copy--compact h2.scroll-heading {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }
  .hero-copy p { font-size: 0.95rem; margin-top: 12px; }
  .hero-copy .tagline { font-size: 0.85rem; }
  .btn-primary { padding: 14px 30px; }
  .hero-ctas { margin-top: 22px; flex-direction: column; align-items: stretch; width: 100%; }
  .scroll-cue { bottom: 16px; }
  .scroll-cue-bar { width: 120px; }

  /* Shorten the scroll-jack distance so the transformation completes sooner on mobile —
     less scrolling before the car finishes wrapping and the next section appears. */
  .scroll-3d:not(.scroll-3d--diag) { height: 190vh; height: 190dvh; }
  .scroll-3d--diag { height: 160vh; height: 160dvh; }

  .services h2, .about h2, .contact h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
  .services-grid { margin-top: 36px; gap: 16px; grid-template-columns: 1fr; }
  .service-card { padding: 26px 22px; }

  .about-copy .quote { font-size: 1.15rem; margin: 20px 0; }
  .about-ctas .btn { width: 100%; text-align: center; }

  .contact-map, .contact-map iframe { min-height: 260px; }
  .contact-socials a { width: 44px; height: 44px; }

  .footer-inner { justify-content: center; text-align: center; }
}

/* Respect the OS-level "reduce motion" preference: skip the scroll-jacked
   pin + video-scrub effect entirely and just let each clip autoplay in place. */
@media (prefers-reduced-motion: reduce) {
  .scroll-3d, .scroll-3d--diag {
    height: auto;
  }
  .scroll-3d-sticky,
  .scroll-3d-sticky.pin-top,
  .scroll-3d-sticky.pin-bottom {
    position: relative;
    top: auto;
    bottom: auto;
    height: 100vh;
    height: 100dvh;
  }
}

/* ---------- INSTAGRAM ---------- */
.instagram { background: var(--black-2); text-align: center; }
.instagram[hidden] { display: none; }
.instagram h2 { font-family: var(--font-display); text-transform: none; font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 6px 0 30px; }
.ig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ig-item { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: #111; }
.ig-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ig-item:hover img { transform: scale(1.06); }
.ig-play { position: absolute; right: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(9,9,9,.7); display: grid; place-items: center; }
.ig-play svg { width: 16px; height: 16px; fill: #fff; }
.ig-cta { margin-top: 28px; }
@media (max-width: 760px) { .ig-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } .ig-item:nth-child(n+7) { display: none; } }

/* ---- Instagram: colori e loghi del profilo ---- */
.instagram {
  --ig-grad: linear-gradient(45deg, #feda75 0%, #fa7e1e 26%, #d62976 52%, #962fbf 76%, #4f5bd5 100%);
  position: relative;
  background:
    radial-gradient(70% 90% at 15% 0%, rgba(214,41,118,.20), transparent 60%),
    radial-gradient(70% 90% at 90% 100%, rgba(79,91,213,.20), transparent 60%),
    var(--black-2);
}
.instagram::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ig-grad); }
.ig-profile { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 18px; text-align: left; }
.ig-avatar { width: 68px; height: 68px; border-radius: 50%; padding: 3px; background: var(--ig-grad); flex: none; display: block; }
.ig-avatar img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--black-2); background: #111; object-fit: contain; }
.ig-profile-text strong { display: block; font-size: 1.05rem; }
.ig-profile-text small { display: block; color: var(--grey); font-size: .82rem; }
.ig-badge { width: 34px; height: 34px; border-radius: 10px; background: var(--ig-grad); display: grid; place-items: center; flex: none; }
.ig-badge svg { width: 20px; height: 20px; fill: #fff; }
.instagram h2 { background: var(--ig-grad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.ig-item { padding: 2px; background: var(--ig-grad); border-radius: calc(var(--radius) + 2px); transition: transform .25s ease, box-shadow .25s ease; }
.ig-item img { border-radius: var(--radius); }
.ig-item:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(214,41,118,.28); }
.ig-play { background: var(--ig-grad); right: 12px; top: 12px; }
.ig-cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 30px; padding: 15px 30px;
  border-radius: 999px; background: var(--ig-grad); color: #fff; font-weight: 800; letter-spacing: .04em; font-size: 14px;
  box-shadow: 0 10px 30px rgba(214,41,118,.3); transition: transform .2s ease, box-shadow .2s ease;
}
.ig-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(214,41,118,.45); }
.ig-cta svg { width: 20px; height: 20px; fill: #fff; }
@media (max-width: 760px) { .ig-cta { width: 100%; justify-content: center; } }

/* Instagram: titolo sobrio e pulsante discreto */
.instagram h2 {
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--white); -webkit-text-fill-color: var(--white);
  font-family: var(--font-body); font-weight: 700; letter-spacing: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.8rem); margin: 4px 0 26px;
}
.ig-cta {
  background: transparent; color: var(--white); box-shadow: none;
  border: 1.5px solid rgba(255,255,255,.35); padding: 13px 26px; font-weight: 700; font-size: 13px;
}
.ig-cta:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.7); box-shadow: none; transform: none; }
.ig-cta svg { width: 18px; height: 18px; }

/* Sul telefono i fotogrammi sono disegnati su canvas: il video resta solo come immagine iniziale. */
.car-stage.is-frames .car-video { visibility: hidden; }
.car-canvas[hidden] { display: none; }

/* Telefono: il testo sta sotto il video, quindi niente strato scuro sopra le immagini */
@media (max-width: 600px) {
  .scroll-3d-overlay,
  .scroll-3d--diag .scroll-3d-overlay { display: none; }
}

/* ===== Telefono: la sezione in alto deve stare TUTTA nello schermo visibile (barre di Safari comprese) ===== */
@media (max-width: 600px) {
  .scroll-3d-sticky { height: 100vh; height: 100svh; }
  .car-stage {
    margin-top: calc(var(--header-h, 100px) + 6px);
    height: min(38svh, 290px);
  }
  .scroll-3d--diag .car-stage { height: min(44svh, 320px); }
  .hero-copy { padding: 10px 16px 36px; justify-content: flex-start; }
  .hero-copy h1 { font-size: clamp(1.7rem, 8.6vw, 2.2rem); line-height: 1.04; }
  .hero-slogan { font-size: .82rem; margin-top: 8px; }
  /* la riga con l'elenco dei servizi è già nella pagina sotto: qui toglie spazio ai pulsanti */
  #scroll3d .hero-copy > p:not(.hero-slogan):not(.tagline) { display: none; }
  .hero-ctas { margin-top: 16px; gap: 10px; }
  .hero-ctas .btn { padding: 13px 18px; font-size: 13px; line-height: 1.25; text-align: center; text-wrap: balance; }
  .hero-copy--compact { padding-top: 14px; }
  .hero-copy--compact p { font-size: .9rem; margin-top: 8px; }
  /* l'indicazione "Scorri" non deve mai coprire i pulsanti: resta solo la barretta in fondo */
  .scroll-cue { bottom: 10px; }
  .scroll-cue span { display: none; }
}

/* Telefono: video + testi formano un unico blocco centrato nello schermo, senza vuoto sotto */
@media (max-width: 600px) {
  .scroll-3d-sticky {
    flex-direction: column; align-items: stretch; justify-content: center;
    padding-top: var(--header-h, 100px); padding-bottom: 28px; box-sizing: border-box;
  }
  .car-stage {
    position: relative; inset: auto; margin-top: 0; flex: 0 0 auto; width: 100%;
    height: auto; aspect-ratio: 16 / 10; max-height: 42svh;
  }
  .scroll-3d--diag .car-stage { height: auto; max-height: 42svh; }
  .hero-copy { flex: 0 0 auto; padding-top: 14px; padding-bottom: 8px; }
}

/* Telefono (v3): il video occupa tutto lo spazio che avanza, niente vuoto; niente scorrimento orizzontale */
@media (max-width: 600px) {
  html, body { overflow-x: clip; max-width: 100%; }
  .scroll-3d, .scroll-3d-sticky { overflow-x: clip; max-width: 100vw; }
  .scroll-3d-sticky { justify-content: flex-start; padding-bottom: 22px; }
  .car-stage, .scroll-3d--diag .car-stage {
    flex: 1 1 auto; min-height: 0; aspect-ratio: auto; max-height: none; height: auto;
  }
  .car-video, .car-canvas { object-position: center 55%; }
  .hero-copy { padding-top: 14px; }
}

/* Telefono (v4): immagine a tutto schermo, scritte e pulsanti sopra l'immagine in basso */
@media (max-width: 600px) {
  .scroll-3d-sticky { flex-direction: column; justify-content: flex-end; align-items: stretch; padding: 0; }
  .car-stage, .scroll-3d--diag .car-stage {
    position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; max-height: none; aspect-ratio: auto; flex: none;
  }
  .car-video, .car-canvas { object-position: center 50%; }
  .hero-copy, .hero-copy--compact {
    position: relative; z-index: 2; flex: 0 0 auto; margin-top: auto;
    padding: 90px 16px 40px;
    background: linear-gradient(to bottom, rgba(9,9,9,0) 0%, rgba(9,9,9,.72) 55%, rgba(9,9,9,.85) 100%);
  }
}
@media (max-width: 600px) {
  .car-video, .car-canvas { object-fit: cover; object-position: center 50%; }
}

/* Telefono in verticale: auto INTERA, con lo stesso fotogramma sfocato a riempire lo schermo */
.car-bg { display: none; }
@media (max-width: 768px) and (orientation: portrait) {
  .car-stage { overflow: hidden; }
  .car-bg {
    display: block; position: absolute; inset: 0; width: 100%; height: 100%;
    filter: blur(18px) brightness(.55); transform: scale(1.2);
  }
  .car-stage .car-video, .car-stage .car-canvas {
    inset: auto; left: -3%; top: 44%; width: 106%; max-width: none; height: auto;
    aspect-ratio: 800 / 448; transform: translateY(-50%); object-fit: cover; object-position: center;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 9%, #000 91%, transparent);
  }
  .scroll-3d--diag .car-stage .car-video, .scroll-3d--diag .car-stage .car-canvas { aspect-ratio: 540 / 378; }
}

/* Telefono in verticale (v2): niente sfocatura; foto subito sotto il logo, sfuma nel nero */
@media (max-width: 768px) and (orientation: portrait) {
  .car-bg { display: none; }
  .car-stage { background: #090909; }
  .car-stage .car-video, .car-stage .car-canvas {
    top: var(--header-h, 80px); left: -9%; width: 116%; transform: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent);
    mask-image: linear-gradient(to bottom, #000 80%, transparent);
  }
  .hero-copy, .hero-copy--compact { padding-top: 0; padding-bottom: clamp(36px, 10svh, 90px); background: none; }
}

/* Telefono: blocco fermo gestito dal browser (niente scatti a fine animazione) e altezze stabili
   anche quando la barra di Safari/Chrome compare o sparisce */
@media (max-width: 768px) {
  .scroll-3d-sticky, .scroll-3d-sticky.pin-top, .scroll-3d-sticky.pin-bottom {
    position: -webkit-sticky; position: sticky; top: 0; bottom: auto; height: 100vh; height: 100svh;
  }
  section.scroll-3d { padding: 0; }
  .scroll-3d:not(.scroll-3d--diag) { height: 190vh; height: 190svh; }
  .scroll-3d.scroll-3d--diag { height: 160vh; height: 160svh; }
}
