/* =========================
   RESET & BASE
========================= */

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

html {
  scroll-behavior: auto; /* evita interferenze con smooth scroll JS */
}

body {
  font-family: "Work Sans", sans-serif;
  color: #1c1c1c;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

/* =========================
   VARIABILI
========================= */

:root {
  --primary: #000000;
  --accent: #d50952;
  --light: #F0EFF4;
  --gray: #7a7a7a;
  --white: #F0EFF4;
}

/* =========================
   CONTAINER
========================= */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   HEADER
========================= */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgb(250, 249, 247);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
  height: 80px;
  transition: transform 0.4s ease, opacity 0.4s ease, height 0.4s ease;
}

.header.hide {
  transform: translateY(-100%);
  opacity: 0;
}

.header.shrink {
  height: 80px;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 20px;
  transition: height 0.4s ease;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 60px;
  width: auto;
  display: block;
  transition: transform 0.3s ease, height 0.4s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.header.shrink .logo img {
  height: 50px;
}

/* NAV LINK DESKTOP */
.nav a {
  position: relative;
  margin-left: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: "Work Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: #111;
  transition: color 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background-color: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav a:hover {
  color: var(--accent);
}

.nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* BUTTON NAV */
.btn-nav {
  position: relative;
  margin-left: 30px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: "Work Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: #111;
  transition: color 0.25s ease;
}

.btn-nav:hover {
  color: var(--accent);
}

.nav a:focus-visible {
  outline: none;
}

.nav a:focus-visible::after {
  transform: scaleX(1);
}

/* Base dei link nav animati */
.nav-link-animated {
  opacity: 0;
  display: inline-block;
}

@media (min-width: 1024px) {
  .nav-link-animated.show {
    animation: navSlideFadeGlam 0.6s forwards;
  }
}

@keyframes navSlideFadeGlam {
  0% {
    opacity: 0;
    transform: translateY(-30px);
  }
  60% {
    opacity: 1;
    transform: translateY(10px);
  }
  80% {
    transform: translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   HAMBURGER MENU DESKTOP (hidden)
========================= */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 22px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #000;
  border-radius: 2px;
  transition: all 0.4s ease;
}

/* =========================
   HERO
========================= */

.hero-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: all;
}

#hero1 {
  background-image: url("hero1finale.webp");
}
#hero2 {
  background-image: url("hero2finale.webp");
}

/* =========================
   STRISCIA CENTRALE
========================= */
.hero-strip {
  position: absolute;
  top: 70%;
  left: 0;
  right: 0;
  transform: translateY(-40%);
  z-index: 2;
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 160px;

  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.82) 0%,
    rgba(0, 0, 0, 0.86) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-slide.active .hero-strip {
  opacity: 1;
  transform: translateY(-50%);
}

.hero-strip-logo {
  position: relative;
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-right: 10px;
  margin-left: 40px;
}

.hero-strip-logo::after {
  content: "";
  position: absolute;
  top: 20%;
  bottom: 20%;
  right: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(255, 255, 255, 0.22) 50%,
    transparent
  );
}

.hero-strip-logo img {
  max-width: 200px;
  width: 100%;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.hero-strip-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 50px;
  color: #fff;
  text-align: center;
}

.hero-strip-text h1 {
  font-family: "Work Sans", sans-serif;
  font-size: 1.9rem;
  font-weight: 300;
  letter-spacing: 1.5px;
  line-height: 1.35;
  margin: 0 0 1.3rem 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  text-transform: capitalize;
}

.hero-strip-text h1 .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(213, 9, 82, 0.6);
}

.hero-strip-text h1 strong {
  font-weight: 700;
  color: var(--accent, #fff);
}

.hero-strip-text .btn-primary {
  margin-top: 4px;
}

/* =========================
   PULSANTE
========================= */
.btn-primary {
  position: relative;
  padding: 14px 38px;
  border-radius: 40px;
  background: linear-gradient(135deg, var(--accent), #b8073f);
  color: #fff;
  font-weight: 400;
  letter-spacing: 0.5px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(213, 9, 82, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary span {
  position: relative;
  z-index: 2;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(213, 9, 82, 0.45);
}

.btn-primary:hover::after {
  opacity: 1;
}

/* =========================
   FRECCIA SLIDE SUCCESSIVA
========================= */
.hero-next {
  position: absolute;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  backdrop-filter: blur(4px);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.hero-next::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 45%;
  width: 13px;
  height: 13px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.hero-next:hover {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.3);
  transform: translateX(2px);
}

.hero-next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* =========================
   SECTIONS
========================= */

section {
  padding: 80px 20px;
  position: relative;
}

section:nth-of-type(even) {
  background-color: var(--white);
}

section h2 {
  font-family: "Inter", sans-serif;
  font-size: 1.3rem;
  margin-bottom: 50px;
  text-align: center;
  letter-spacing: 0.1rem;
  font-weight: 500;
  position: relative;
}

section h2::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin: 20px auto 0;
}

.process h2::after {
  background: var(--primary);
  display: none;
}

/* =========================
   SERVICES
========================= */

.services {
  position: relative;
  padding: 110px 20px;
  overflow: hidden;
}

.services::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#edebe8, #e3dfd9 100%);
  z-index: 1;
}

.services::after {
  content: "";
  position: absolute;
  top: -220px;
  right: -140px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.services .container {
  position: relative;
  z-index: 2;
}

.services h2 {
  font-family: "Inter", sans-serif;
  margin-bottom: 36px;
  text-align: center;
  letter-spacing: 0.12rem;
  text-transform: capitalize;
  font-weight: 500;
  line-height: 1.5;
  color: #111;
}

.services-intro {
  max-width: 760px;
  margin: 0 auto 80px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.9;
  font-family: "Work Sans", sans-serif;
  font-weight: 300;
  color: rgba(20, 20, 20, 0.78);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
}

/* =========================
   CARD SERVIZIO PREMIUM
========================= */

.service {
  position: relative;
  overflow: hidden;
  padding: 42px 34px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04), 0 18px 40px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.35s ease;
  opacity: 0;
  transform: translateY(34px);
}

.service::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}

.service::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s ease;
}

.service:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 30px 60px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.service:hover::after {
  transform: scaleX(1);
}

.service-icon {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 8px 20px rgba(0, 0, 0, 0.05);
  font-size: 1.8rem;
  color: var(--primary);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), color 0.3s ease, box-shadow 0.4s ease;
}

.service:hover .service-icon {
  transform: translateY(-4px) scale(1.05);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 14px 30px rgba(0, 0, 0, 0.1);
}

.service-tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #edebe8;
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.52);
  font-family: "Work Sans", sans-serif;
  transition: background 0.3s ease, color 0.3s ease;
}

.service:hover .service-tag {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.72);
}

.service h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: #111;
  font-family: "Work Sans", sans-serif;
}

.service p {
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(20, 20, 20, 0.72);
  font-family: "Work Sans", sans-serif;
  font-weight: 300;
  max-width: 95%;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(34px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service.visible {
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* =========================
   GALLERIA IMMAGINI
========================= */

.featured-projects {
  position: relative;
  padding: 80px 20px;
}

.featured-projects::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(255, 255, 255);
  z-index: 0;
}

.featured-projects .container {
  position: relative;
  z-index: 1;
}

.featured-intro {
  max-width: 680px;
  margin: 0 auto 60px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  font-family: "Work Sans", sans-serif;
  font-weight: 300;
}

/* FILTRI */
.featured-filters {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 50px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.featured-filters::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 10px 22px;
  font-size: 0.72rem;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

.filter-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 1px;
  background: var(--white);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.filter-btn.active::after {
  width: 24px;
}

.filter-btn:hover,
.filter-btn.active {
  background: #D50952;
  border-color: #D50952;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* RESET COMPORTAMENTO MOBILE BOTTONI */
button,
.filter-btn,
.btn-outline {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.filter-btn,
.btn-outline {
  color: var(--primary);
}

/* GRIGLIA */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  width: 100%;
}
.featured-grid-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

/* ELEMENTI GALLERIA */
.featured-item {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  overflow: hidden;
  background: #f2f2f2;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease;
  will-change: transform;
}

.featured-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12), 0 6px 14px rgba(0, 0, 0, 0.06);
}

.featured-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.7s ease;
  transform-origin: center;
}

.featured-item:hover img {
  transform: scale(1.06);
  filter: contrast(1.05) saturate(1.05);
}

/* OVERLAY DESCRIZIONE PROGETTI */
.featured-item a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15));
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  letter-spacing: 0.2em;
  transition: opacity 0.4s ease, letter-spacing 0.4s ease;
  pointer-events: none;
}

.featured-item:hover .featured-overlay {
  opacity: 1;
  letter-spacing: 0.06em;
}

.featured-overlay h3 {
  font-family: "Work Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  transform: translateY(6px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.featured-overlay p {
  font-size: 0.72rem;
  opacity: 0.75;
  transform: translateY(6px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.featured-item:hover .featured-overlay h3,
.featured-item:hover .featured-overlay p {
  transform: translateY(0);
}

.featured-overlay h3::after {
  content: "";
  display: block;
  width: 26px;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
  margin: 6px 0 6px;
}

.featured-item:hover .featured-overlay p {
  transition-delay: 0.08s;
}

.featured-item .featured-overlay.active h3,
.featured-item .featured-overlay.active p {
  opacity: 1;
  letter-spacing: 0.06em;
}

/* =========================
   BOTTONE CTA
========================= */

.featured-cta {
  margin-top: 30px;
  text-align: center;
}

.btn-outline {
  padding: 14px 36px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  background: transparent;
  font-family: "Work Sans", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 999px;
}

.btn-outline:hover {
  background: #D50952;
  border-color: #D50952;
  color: #fff;
  transform: translateY(-2px);
}

/* ELEMENTI EXTRA - visibili dopo toggle */
.featured-item.extra {
  display: none;
  opacity: 0;
  transform: translateY(32px);
  position: relative;
}

.featured-item.extra.visible {
  display: block;
  animation: revealItem 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.featured-item.extra.hiding {
  animation: hideItem 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes revealItem {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hideItem {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(32px);
  }
}

.featured-item.extra .featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.15));
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.featured-item.extra:hover .featured-overlay {
  opacity: 1;
}

.single-photo {
  display: none;
}

/* =========================
   GLIGHTBOX
========================= */

.glightbox-container {
  background-color: #000;
}

/* =========================
   MODAL DETTAGLIO PROGETTO
========================= */

.project-detail-gallery {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: radial-gradient(circle at center, rgba(25, 25, 25, 0.75), rgba(0, 0, 0, 0.92));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.project-detail-gallery.active {
  opacity: 1;
  visibility: visible;
}

.project-modal-box {
  position: relative;
  width: min(1100px, 92vw);
  max-height: 90vh;
  padding: 48px 42px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  overflow-y: auto;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35);
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease;
}

.project-detail-gallery.active .project-modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.project-modal-box::-webkit-scrollbar {
  width: 8px;
}

.project-modal-box::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 20px;
}

.project-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.project-modal-close:hover {
  transform: rotate(90deg) scale(1.05);
  background: rgba(0, 0, 0, 0.05);
}

.project-modal-close span {
  position: absolute;
  width: 18px;
  height: 1.5px;
  background: #111;
  left: 50%;
  top: 50%;
}

.project-modal-close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.project-modal-close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.project-detail-header {
  text-align: center;
  margin-bottom: 28px;
}

.project-detail-header h3 {
  font-family: "Work Sans", sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.project-detail-header::after {
  content: "";
  display: block;
  width: 50px;
  height: 1px;
  margin: 16px auto 0;
  background: rgba(0, 0, 0, 0.15);
}

.project-detail-header p {
  max-width: 760px;
  margin: 0 auto;
  font-family: "Work Sans", sans-serif;
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(0, 0, 0, 0.7);
}

.project-detail-grid {
  columns: 3 240px;
  column-gap: 18px;
}

.project-detail-item {
  break-inside: avoid;
  margin-bottom: 18px;
  border-radius: 6px;
  overflow: hidden;
  background: #f2f2f2;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.project-detail-gallery.active .project-detail-item {
  opacity: 1;
  transform: translateY(0);
}

.project-detail-gallery.active .project-detail-item:nth-child(1) { transition-delay: 0.05s; }
.project-detail-gallery.active .project-detail-item:nth-child(2) { transition-delay: 0.1s; }
.project-detail-gallery.active .project-detail-item:nth-child(3) { transition-delay: 0.15s; }
.project-detail-gallery.active .project-detail-item:nth-child(4) { transition-delay: 0.2s; }

.project-detail-item img {
  width: 100%;
  display: block;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.project-detail-item:hover img {
  transform: scale(1.04);
  filter: contrast(1.05) saturate(1.05);
}

.featured-item.selected {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

body.project-modal-open {
  overflow: hidden;
}

@media (max-width: 991px) {
  .project-modal-box {
    width: 94vw;
    padding: 38px 22px;
  }
  .project-detail-grid {
    columns: 2 220px;
  }
}

@media (max-width: 640px) {
  .project-detail-gallery {
    padding: 16px;
  }
  .project-detail-grid {
    columns: 1;
  }
  .project-detail-header h3 {
    font-size: 1rem;
  }
  .project-detail-header p {
    font-size: 0.9rem;
  }
}

@media (max-width: 767px) {
  .featured-item .featured-overlay {
    opacity: 1 !important;
  }
  .featured-overlay h3,
  .featured-overlay p {
    opacity: 1 !important;
    transform: none !important;
    letter-spacing: 0.06em;
  }
  .open-project-btn {
    display: flex !important;
    opacity: 1 !important;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* =========================
   OPEN PROJECT BUTTON
========================= */

.featured-item {
  position: relative;
}

.open-project-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
}

.open-project-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 45%;
  width: 13px;
  height: 13px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.featured-item:hover .open-project-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  border-color: #fff;
}

/* =========================
   PROCESS
========================= */

.process {
  position: relative;
  padding: 80px 20px;
  overflow: hidden;
}

.process::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(#edebe8, #e3dfd9 100%);
  z-index: 1;
}

.process .container {
  position: relative;
  z-index: 2;
}

.process-intro {
  max-width: 680px;
  margin: 0 auto 60px;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  font-family: "Work Sans", sans-serif;
  font-weight: 300;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.step {
  position: relative;
  overflow: hidden;
  padding: 36px 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(255,255,255,0.16) 100%);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.03), 0 20px 40px rgba(0,0,0,0.04),
    inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 0.45s cubic-bezier(.22,1,.36,1),
    box-shadow 0.45s cubic-bezier(.22,1,.36,1),
    background 0.35s ease,
    border-color 0.35s ease;
}

.step::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.306) 0%, transparent 72%);
  opacity: 0.7;
  pointer-events: none;
}

.step::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 70%;
  height: 2px;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transition: transform 0.4s ease;
}

.step.active-step {
  background: linear-gradient(180deg, rgba(255,255,255,0.42), rgba(255,255,255,0.22));
  border-color: rgba(255,255,255,0.32);
  box-shadow: 0 16px 40px rgba(0,0,0,0.05), 0 30px 60px rgba(0,0,0,0.06),
    inset 0 1px 0 rgba(255,255,255,0.45);
}

.step:hover {
  transform: translateY(-10px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 100%);
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 34px 70px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.step:hover::after {
  transform: translateX(-50%) scaleX(1);
}

.step-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 8px 20px rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  font-size: 32px;
  color: var(--primary);
  transition: transform 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
}

.step-icon:hover {
  transform: scale(1.15);
  background: var(--accent);
  color: #fff;
}

.step:hover .step-icon {
  transform: scale(1.1);
  background: #D50952;
  color: #fff;
}

.step span {
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.2);
  z-index: 10;
}

.step span.bubble-visible {
  animation: bubbleBounce 0.7s ease forwards;
}

@keyframes bubbleBounce {
  0% { transform: scale(0.2); opacity: 0; }
  60% { transform: scale(1.3); opacity: 1; }
  80% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 10px;
  margin-bottom: 14px;
  font-family: "Work Sans", sans-serif;
  line-height: 1.4;
}

.step p {
  font-size: 0.9rem;
  color: var(--primary);
  font-family: "Work Sans", sans-serif;
  margin-top: 16px;
  line-height: 1.7;
  opacity: 0;
  transform: scale(0.95);
}

.step p.bubble-visible {
  animation: textBubble 0.7s ease forwards;
}

@keyframes textBubble {
  0% { transform: scale(0.95); opacity: 0; }
  60% { transform: scale(1.02); opacity: 1; }
  80% { transform: scale(0.98); }
  100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 1100px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* =========================
   BLOCCO PROMO SOTTO IL METODO
========================= */

.process-promo {
  margin-top: 80px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 60px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.391);
}

.promo-container {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  flex-direction: row-reverse;
}

/* =========================
   VIDEO CAROUSEL
========================= */

.promo-image {
  position: relative;
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 14px;
  overflow: hidden;
  height: 400px;
  width: 400px;
}

.promo-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  z-index: 1;
}

.promo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease-in-out;
  opacity: 1;
  filter: brightness(0.7);
  position: relative;
  z-index: 0;
}

.promo-video.fade-out {
  opacity: 0;
}

.video-arrow {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 5;
  padding: 0;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.video-arrow.prev { left: 10px; }
.video-arrow.next { right: 10px; }

.video-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%) rotate(-45deg);
  box-sizing: border-box;
}

.video-arrow.prev::after {
  transform: translate(-50%, -50%) rotate(135deg);
}

.video-arrow.next::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.video-arrow:hover {
  transform: translateY(-50%) scale(1.2);
}
.video-arrow:hover::after {
  border-color: var(--accent);
}

.video-arrow:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.video-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.video-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.video-dots button.active {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.video-progress {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
  z-index: 5;
}

.video-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffffff);
  transition: width 0.25s linear;
}

.video-controls-hidden .video-arrow,
.video-controls-hidden .video-dots {
  opacity: 0;
  pointer-events: none;
}

.promo-image:hover .video-arrow,
.promo-image:hover .video-dots {
  opacity: 1;
  pointer-events: auto;
}

.promo-text {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.promo-text::before {
  content: "";
  width: 40px;
  height: 2px;
  margin-bottom: 20px;
}

.promo-text h3 {
  font-family: "Work Sans", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 30px;
  text-align: left;
}

.promo-text p {
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
  margin-bottom: 30px;
}

.promo-text .btn-process {
  font-family: "Work Sans", sans-serif;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 300;
  align-self: flex-start;
  background-color: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.promo-text .btn-process:hover {
  transform: translateY(-2px);
  background-color: #fff;
  color: var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* =========================
   ABOUT
========================= */

.about {
  position: relative;
  padding: 80px 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.about::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(255, 255, 255);
  z-index: 0;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.about-image {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
}

.about-image img {
  max-width: 80%;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.02);
}

.about-text {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-text h2 {
  font-family: "Work Sans", sans-serif;
  font-size: 1.3rem;
  margin-bottom: 50px;
  text-align: center;
  letter-spacing: 0.1rem;
  font-weight: 500;
}

.about-text p {
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--primary);
  font-weight: 300;
  margin-bottom: 20px;
}

.about-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.about-text a:hover {
  text-decoration: underline;
  color: #d50952;
}

.about-social {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-top: 10px;
}

.about-social a {
  font-size: 1.5rem;
  color: var(--primary);
  transition: color 0.3s;
}

.about-social a:hover {
  color: var(--accent);
}

/* =========================
   CONTACT
========================= */

.contact {
  background: var(--primary);
  color: var(--white);
  padding: 80px 20px;
}

.contact h2 {
  font-family: "Work Sans", sans-serif;
  font-size: 1.3rem;
  margin-bottom: 50px;
  text-align: center;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  font-weight: 500;
}

.contact-intro {
  max-width: 620px;
  margin: 0 auto 50px;
  text-align: center;
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-family: "Work Sans", sans-serif;
}

.contact-note {
  text-align: center;
  font-family: "Work Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 10px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px;
  font-family: inherit;
  border: none;
  outline: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
}
.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}
.contact-form button {
  font-family: "Work Sans", sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  letter-spacing: 0.1rem;
  border: none;
  cursor: pointer;
}

.contact-form .btn-primary {
  background: var(--white);
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 8px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.contact-hidden {
  position: absolute;
  left: -9999px;
}

.contact-form .btn-primary:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.contact-form .btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  min-height: 24px;
  margin-top: 6px;
  text-align: center;
  font-family: "Work Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
}

.form-status.is-success {
  color: rgba(255, 255, 255, 0.95);
}

.form-status.is-error {
  color: #ffd7d7;
}

.contact-privacy-note {
  max-width: 600px;
  margin: 10px auto 0;
  text-align: center;
  font-family: "Work Sans", sans-serif;
  font-size: 0.8rem;
  line-height: 1.5;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
}

.contact-privacy-note a {
  color: #ffffff;
  text-decoration: underline;
}

.contact-privacy-note a:hover {
  color: #d50952;
  opacity: 0.85;
}

/* =========================
   FOOTER
========================= */

.footer {
  padding: 10px 0;
  text-align: center;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: #111;
  color: #ffffff;
}
.footer-claim {
  font-family: "Work Sans", sans-serif;
  font-size: 0.65rem;
  font-weight: 300;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 10px;
}
.footer-claim span {
  color: var(--accent);
  font-weight: 300;
}

.footer-links {
  margin-bottom: 10px;
  font-size: 0.7rem;
}

.footer-links a {
  color: #ffffff;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #d50952;
}

/* =========================
   POLICY PAGES
========================= */

.policy-page {
  min-height: 100vh;
  padding: 140px 20px 80px;
  background-image: url("sfondochisono.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.policy-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 0;
}

.policy-page .container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 50px 40px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(2px);
}

.policy-page h1 {
  font-family: "Inter", sans-serif;
  font-size: 1.6rem;
  margin-bottom: 40px;
  text-align: center;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--primary);
  position: relative;
}

.policy-page h1::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  margin: 18px auto 0;
}

.policy-page h2 {
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08rem;
  color: var(--primary);
  margin-top: 36px;
  margin-bottom: 14px;
  text-align: left;
  position: relative;
}

.policy-page h2::after {
  content: none;
}

.policy-page p {
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 300;
  color: var(--primary);
  margin-bottom: 18px;
}

.policy-page strong {
  font-weight: 600;
  color: var(--primary);
}

.policy-page a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.policy-page a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.policy-page ul,
.policy-page ol {
  margin: 0 0 20px 22px;
  padding: 0;
}

.policy-page li {
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.8;
  font-weight: 300;
  color: var(--primary);
  margin-bottom: 8px;
}

.policy-page hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  margin: 30px 0;
}

.policy-back {
  display: inline-block;
  margin-bottom: 30px;
  font-family: "Work Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 12px 22px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.policy-back:hover {
  background: var(--primary);
  color: var(--white);
  text-decoration: none;
}

.policy-contact-box {
  margin-top: 30px;
  padding: 24px;
  border-radius: 10px;
  background: rgba(176, 141, 87, 0.08);
  border-left: 3px solid var(--accent);
}

.policy-contact-box p:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .policy-page {
    padding: 120px 16px 60px;
  }
  .policy-page .container {
    padding: 34px 22px;
    border-radius: 10px;
  }
  .policy-page h1 {
    font-size: 1.25rem;
    margin-bottom: 30px;
  }
  .policy-page h2 {
    font-size: 0.95rem;
    margin-top: 28px;
  }
  .policy-page p,
  .policy-page li {
    font-size: 0.95rem;
    line-height: 1.75;
  }
  .policy-back {
    font-size: 0.72rem;
    padding: 10px 18px;
  }
}

/* =========================
   EFFETTI JS (scroll reveal)
========================= */

.slide-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.slide-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-down {
  opacity: 0;
  transform: translateY(-80px);
  transition: opacity 1.6s ease, transform 1.6s ease;
}
.slide-down.visible {
  opacity: 1;
  transform: translateY(0);
}

.slideup {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.8s ease, transform 1.8s ease;
}
.slideup.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-left {
  transform: translateX(-50px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-right {
  transform: translateX(50px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.zoom-out {
  transform: scale(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.zoom-out.visible {
  opacity: 1;
  transform: scale(1);
}

.rotate-in {
  transform: rotate(-15deg);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.rotate-in.visible {
  opacity: 1;
  transform: rotate(0deg);
}

.flip-y {
  transform-origin: center;
  transform: perspective(400px) rotateY(90deg);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.flip-y.visible {
  opacity: 1;
  transform: perspective(400px) rotateY(0deg);
}

@keyframes bounce-in {
  0% { opacity: 0; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { transform: scale(1); }
}
.bounce {
  animation-fill-mode: forwards;
  animation-duration: 0.6s;
  animation-timing-function: ease-out;
}
.bounce:not(.visible) {
  opacity: 0;
}
.bounce.visible {
  animation-name: bounce-in;
}

/* =========================
   RESPONSIVE — TABLET/DESKTOP MEDIO
========================= */

@media (max-width: 1024px) {
  .services-grid,
  .process-steps,
  .portfolio-grid,
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================
   RESPONSIVE — MOBILE
========================= */

@media (max-width: 767px) {

  /* NAV */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 25px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 999;
  }

  .nav.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  .nav a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05rem;
    margin: 0;
    text-align: center;
    transition: color 0.3s, transform 0.3s;
  }

  .nav a:hover {
    transform: scale(1.05);
  }

  .nav.active a {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInUp 0.4s forwards;
  }

  .nav.active a:nth-child(1) { animation-delay: 0.1s; }
  .nav.active a:nth-child(2) { animation-delay: 0.2s; }
  .nav.active a:nth-child(3) { animation-delay: 0.3s; }
  .nav.active a:nth-child(4) { animation-delay: 0.4s; }
  .nav.active a:nth-child(5) { animation-delay: 0.5s; }

  .btn-nav {
    border: none;
    font-size: 1.1rem;
    padding: 8px 18px;
  }

  /* HAMBURGER */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    z-index: 1001;
  }

  .hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #000;
    border-radius: 2px;
    transition: all 0.4s ease;
  }

  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { transform: scaleX(0); opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* LOGO */
  .logo img {
    height: 50px;
    transition: height 0.4s ease;
  }

  .header.shrink .logo img {
    height: 40px;
  }

  /* HERO */
  .hero-wrapper {
    min-height: 80vh;
  }

  .hero-slide {
    background-attachment: scroll;
  }

  #hero1 { background-image: url("heromobile1.webp"); }
  #hero2 { background-image: url("heromobile2.webp"); }

  .hero-strip {
    flex-direction: column;
    text-align: center;
    min-height: 0;
    border-top: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.533);
      background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.586) 0%,
    rgba(0, 0, 0, 0.783) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(4px);
  }

  .hero-strip-logo {
    flex: none;
    margin-left: 0;
    padding: 14px 8px;
  }

  .hero-strip-logo::after {
    top: auto;
    bottom: 0;
    left: 20%;
    right: 20%;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22) 50%, transparent);
  }

  .hero-strip-logo img {
    max-width: 100px;
    height: auto;
  }

  .hero-strip-text {
    padding: 18px 20px;
  }

  .hero-strip-text h1 {
    font-size: 1.3rem;
    letter-spacing: 0.8px;
    gap: 0.3em;
    margin: 0 0 0.9rem 0;
  }

  .hero-strip-text h1 .dot {
    width: 4px;
    height: 4px;
  }

  .btn-primary {
    padding: 10px 26px;
    font-size: 0.85rem;
  }

  .hero-next {
    display: none;
  }

  /* SERVIZI */
  .services {
    padding: 80px 20px;
  }

  .services h2 {
    font-size: 1.3rem;
    margin-bottom: 30px;
    letter-spacing: 0.08rem;
    text-align: center;
  }

  .services-intro {
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 100%;
    margin-bottom: 50px;
    text-align: center;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service {
    padding: 34px 28px;
    border: none;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    text-align: center;
  }

  .service::after {
    display: none;
  }

  .service-icon {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
    margin-left: auto;
    margin-right: auto;
  }

  .service-tag {
    margin-left: auto;
    margin-right: auto;
  }

  .service h3 {
    font-size: 1.05rem;
  }

  .service p {
    font-size: 0.92rem;
    line-height: 1.75;
    max-width: 100%;
  }

  /* PORTFOLIO / FEATURED */
  .featured-projects {
    padding: 60px 16px;
  }

  .featured-projects h2 {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 0.05rem;
  }

  .featured-intro {
    font-size: 1rem;
    line-height: 1.45;
    max-width: 100%;
    margin-bottom: 35px;
    text-align: center;
  }

  .featured-filters {
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    padding-bottom: 0;
  }

  .filter-btn {
    padding: 8px 18px;
    font-size: 0.75rem;
  }

  .filter-btn::after {
    display: none;
  }

  .featured-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .featured-item {
    aspect-ratio: 4 / 3;
    border-radius: 2px;
  }

  .featured-overlay {
    padding: 16px;
  }

  .featured-overlay h3 {
    font-size: 0.9rem;
  }

  .featured-overlay p {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .featured-cta {
    margin-top: 25px;
  }

  .btn-outline {
    padding: 12px 28px;
    font-size: 0.75rem;
  }

  /* PROCESS / METODO */
  .process {
    padding: 80px 16px;
  }

  .process h2 {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 0.05rem;
  }

  .process-intro {
    font-size: 1rem;
    line-height: 1.45;
    max-width: 100%;
    margin-bottom: 35px;
    text-align: center;
  }

.process-steps{
  display:flex;
  gap:20px;
  overflow-x:auto;
  padding:16px 16px 24px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.step{
  flex:0 0 250px;
  scroll-snap-align: center;
  background: rgba(255,255,255,0.85);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 10px 24px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.06);
}

.step::before{
  display:none; /* il bagliore radiale ora è inutile, anzi confonde i bordi */
}

  .step-icon {
    width: 50px;
    height: 50px;
    font-size: 26px;
  }

  .step span {
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
    margin-bottom: 15px;
  }

  .step h3 {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }

  .step p {
    font-size: 0.88rem;
    margin-top: 10px;
  }

  /* PROMO */
  .process-promo {
    flex-direction: column;
    padding: 40px 12px;
    gap: 25px;
  }

  .promo-container {
    flex-direction: column;
    gap: 50px;
  }

  .promo-text {
    order: 1;
    width: 100%;
    flex: none;
    text-align: center;
  }

  .promo-image {
    order: 2;
    width: 100%;
    flex: none;
    height: 400px;
  }

  .video-dots {
    bottom: 12px;
  }

  .video-arrow {
    display: none;
  }

  .promo-text h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
  }

  .promo-text p {
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 20px;
  }

  .promo-text .btn-process {
    padding: 12px 28px;
    font-size: 0.95rem;
    align-self: center;
  }

  /* ABOUT */
  .about-container {
    flex-direction: column;
    gap: 30px;
  }

  .about-text {
    order: 1;
    text-align: center;
  }

  .about-image {
    order: 2;
    flex: 1 1 100%;
    max-height: 400px;
    width: 100%;
  }

  .about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
  }

  .about-text h2 {
    font-size: 1.4rem;
  }

  .about-text p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .about-social {
    justify-content: center;
  }

  /* CONTACT */
  .contact {
    padding: 80px 15px;
  }

  .contact h2 {
    font-size: 1.4rem;
  }

  .contact-intro {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .contact-form {
    gap: 15px;
  }

  .contact-note {
    font-size: 0.75rem;
  }

  .contact-form input,
  .contact-form textarea {
    padding: 12px;
    font-size: 0.95rem;
    text-align: center;
  }

  .contact-form textarea {
    min-height: 120px;
  }

  .contact-form button,
  .contact-form .btn-primary {
    font-size: 0.9rem;
    padding: 12px 28px;
  }

  /* FOOTER */
  .footer {
    font-size: 0.55rem;
    padding: 25px 15px;
  }

  .footer-claim {
    font-size: 0.6rem;
    margin-bottom: 8px;
  }
}

@media (max-width: 480px) {
  .services-grid,
  .process-steps,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================
   RESPONSIVE — TABLET (769–1024px)
========================= */

@media (min-width: 769px) and (max-width: 1024px) {

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgb(250, 249, 248);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-15px);
    transition: all 0.4s ease;
    z-index: 999;
  }

  .nav.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav a,
  .btn-nav {
    margin-left: 0;
    font-size: 1rem;
  }

  .hamburger {
    display: flex;
  }

  .nav-link-animated {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .logo img {
    height: 60px;
  }

  .hero-wrapper {
    min-height: 90vh;
  }

  .services {
    padding: 100px 40px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }

  .featured-item {
    height: 240px;
  }

  .process {
    padding: 100px 40px;
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .about-container {
    flex-direction: row;
    align-items: center;
    gap: 40px;
  }

  .about-text,
  .about-image {
    flex: 1;
  }

  .contact {
    padding: 100px 40px;
  }

  .contact-form {
    max-width: 700px;
    margin: 0 auto;
  }

  .footer {
    font-size: 0.7rem;
    padding: 35px 30px;
  }
}