@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --text: #111;
  --muted: #666;
  --surface: rgba(255, 255, 255, 0.88);
  --border: #d8d8d8;
  --shadow: 0 10px 35px rgba(0, 0, 0, 0.14);
  --radius: 14px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  color: var(--text);
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f4f4f4;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.hero {
  position: fixed;
  inset: 0;
  height: 100vh;
  background: url("assets/immagini/background2.PNG") center / cover no-repeat;
  z-index: 0;
}

.intro-overlay {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 24px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
}

.intro-overlay img {
  width: min(400px, 82vw);
  height: auto;
}

.intro-overlay p {
  margin-top: 12px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  letter-spacing: 0.02em;
}

.hero-cta {
  margin-top: 28px;
  padding: 11px 18px;
  border: 1px solid rgba(255,255,255,0.85);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
  background: #fff;
  color: #111;
  transform: translateY(-2px);
}

.main-content {
  position: relative;
  z-index: 1;
  margin-top: 88vh;
  padding: 90px 0 60px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-radius: 28px 28px 0 0;
}

.main-inner {
  width: min(100% - 40px, 1000px);
  margin: 0 auto;
}

.intro-section h1 {
  margin-bottom: 24px;
  text-align: center;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

.main-content h2 {
  margin: 55px 0 16px;
  font-size: clamp(1.65rem, 3vw, 2rem);
}

.main-content p {
  margin-bottom: 24px;
  line-height: 1.75;
  font-size: 1.05rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  margin-bottom: 55px;
}

.social-icons a {
  display: inline-flex;
  border-radius: 50%;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icons a:hover {
  transform: translateY(-3px) scale(1.04);
  opacity: 0.8;
}

.social-icons img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}


/* SEZIONE PORTFOLIO -------------------------------------------- */

.portfolio-section {
  scroll-margin-top: 30px;
}

.slideshow-container {
  position: relative;
  width: min(100%, 560px);
  margin: 34px auto 20px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
}

.slide {
  display: none;
  width: 100%;
  height: 100%;
}

.slide.active {
  display: block;
  animation: fade 0.45s ease;
}

.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes fade {
  from { opacity: 0.3; }
  to { opacity: 1; }
}

.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.prev:hover,
.next:hover {
  background: rgba(0, 0, 0, 0.76);
}

.prev { left: 12px; }
.next { right: 12px; }

.slide-counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #fff;
  font-size: 0.78rem;
}

.portfolio-grid {
  display: grid;

  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;

  /* 3 colonne visibili */
  grid-auto-columns: calc((100% - 48px) / 3);

  column-gap: 24px;
  row-gap: 30px;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;

  padding: 10px 4px 22px;

  scrollbar-width: thin;
}

.portfolio-item {
  min-width: 0;
  scroll-snap-align: start;
}

.portfolio-item h3 {
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.portfolio-item .slideshow-container {
  width: 100%;
  max-width: none;
  margin: 0;
}

.portfolio-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}



/* SEZIONE CONTATTI -------------------------------------------- */

.contatti {
  margin-top: 70px;
  padding: 42px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 18px;
  box-shadow: var(--shadow);
  scroll-margin-top: 30px;
}

.contatti h2 {
  margin-top: 0;
}

.contatti > .inner > p {
  color: #444;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field {
  margin-bottom: 18px;
}

.contact-form label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
}

.optional {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: #111;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #555;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}


/* SEZIONE PRIVACY --------------------------------------------  */

.privacy-consent {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 400 !important;
  line-height: 1.5;
}

.privacy-consent input {
  width: auto;
  margin-top: 4px;
  flex: 0 0 auto;
}

.privacy-consent a,
.site-footer a,
.privacy-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.honeypot {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.form-buttons {
  display: flex;
  gap: 14px;
  margin-top: 24px;
}

.form-buttons button {
  padding: 12px 20px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.form-buttons button:hover {
  transform: translateY(-1px);
  opacity: 0.86;
}

.button-primary {
  background: #111;
  color: #fff;
}

.button-secondary {
  background: #dedede;
  color: #111;
}

.form-message {
  margin: 0 0 24px;
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.5;
}

.form-message.success {
  background: #eaf7ed;
  border: 1px solid #9acaa4;
}

.form-message.error {
  background: #fff0f0;
  border: 1px solid #dda1a1;
}

.site-footer {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 38px 20px;
  background: #111;
  color: #fff;
  text-align: center;
}

.site-footer p {
  margin: 7px 0;
}

.site-credits {
    margin-top: 18px;
    font-size: 0.78rem;
    opacity: 0.55;
    letter-spacing: 0.3px;
}

.privacy-hero {
  min-height: 34vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  text-align: center;
  background: linear-gradient(180deg, #d8d8d8 0%, #f4f4f4 100%);
}

.privacy-overlay h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.privacy-content {
  padding: 70px 20px;
  background: #fff;
}

.privacy-content .inner {
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.75;
}

.privacy-content h2 {
  margin: 36px 0 10px;
  font-size: 1.35rem;
}

.privacy-content p {
  margin-bottom: 18px;
}

.privacy-back {
  margin-top: 45px;
  text-align: center;
}

@media (max-width: 700px) {
  .main-content {
    margin-top: 82vh;
    padding-top: 65px;
  }

  .main-inner {
    width: min(100% - 28px, 1000px);
  }

  .main-content p {
    font-size: 1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contatti {
    margin-top: 50px;
    padding: 28px 18px;
  }

  .form-buttons {
    flex-direction: column-reverse;
  }

  .form-buttons button {
    width: 100%;
  }

  .slideshow-container {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Lightbox video */

.video-lightbox {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, 0.92);

  display: none;
  align-items: center;
  justify-content: center;

  z-index: 9999;

  padding: 30px;
}

.video-lightbox.active {
  display: flex;
}

.video-lightbox video {
  width: auto;
  height: auto;

  max-width: 90vw;
  max-height: 90vh;

  object-fit: contain;

  border-radius: 8px;
}

.video-close {
  position: absolute;

  top: 20px;
  right: 30px;

  background: none;
  border: none;

  color: white;

  font-size: 45px;
  cursor: pointer;

  z-index: 10000;
}


/* =========================================
   IMAGE LIGHTBOX
========================================= */

.portfolio-item .slide img {
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background: rgba(0, 0, 0, 0.94);

  z-index: 9999;
}

.image-lightbox.active {
  display: flex;
}

.image-lightbox img {
  width: auto;
  height: auto;

  max-width: 92vw;
  max-height: 90vh;

  object-fit: contain;

  border-radius: 8px;

  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);

  cursor: default;
}

.image-close {
  position: absolute;

  top: 20px;
  right: 30px;

  border: none;

  background: transparent;

  color: #fff;

  font-size: 45px;
  line-height: 1;

  cursor: pointer;

  z-index: 10000;
}


/* COLLABORAZIONI LOGHI */
/* =========================
   CLIENTI E COLLABORAZIONI
========================= */

.clients-section {
  margin-top: 70px;
  text-align: center;
}

.clients-section h2 {
  margin-bottom: 35px;
  font-size: 1.25rem;
  font-weight: 600;
}

.clients-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 45px;
}

.clients-logos img {
  width: auto;
  height: 55px;
  max-width: 130px;
  object-fit: contain;

  opacity: 0.7;

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.clients-logos img:hover {
  opacity: 1;
  transform: scale(1.08);
}


/* Smartphone */

@media (max-width: 600px) {

  .clients-logos {
    gap: 28px;
  }

  .clients-logos img {
    height: 42px;
    max-width: 100px;
  }

}

/* =========================================
   PORTFOLIO RESPONSIVE
========================================= */

/* Tablet: 2 colonne visibili, sempre 2 righe */
@media (max-width: 1000px) {
  .portfolio-grid {
    grid-auto-columns: calc((100% - 24px) / 2);
  }
}

/* Smartphone: 1 colonna visibile, sempre 2 righe */
@media (max-width: 600px) {
  .portfolio-grid {
    grid-auto-columns: 85%;
    column-gap: 16px;
    row-gap: 24px;
  }
}
