/* ========================================
   TOUCH YOUR BRAND — Stile Globale
   ======================================== */

/* --- Font self-hosted (GDPR compliant) --- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/space-grotesk-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Variabili Brand --- */
:root {
  --arancione: #FF6000;
  --arancione-scuro: #cc4d00;
  --nero: #0a0a0a;
  --grigio-scuro: #111111;
  --grigio-medio: #1a1a1a;
  --grigio-testo: #9a9a9a;
  --grigio-chiaro: #f2f0ed;
  --nero-testo: #1a1a1a;
  --bianco: #ffffff;
  --font: 'Space Grotesk', sans-serif;
  --transizione: 0.3s ease;
  --raggio: 4px;
}

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

html {
  scroll-behavior: smooth;
}

/* scroll lock gestito interamente in JS via inline styles */

body {
  font-family: var(--font);
  background-color: var(--nero);
  color: var(--bianco);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Sfumatura arancione globale fissa */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255,96,0,0.14) 0%, rgba(204,77,0,0.06) 30%, transparent 65%),
    radial-gradient(ellipse at 80% 20%, rgba(255,120,0,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 70%, rgba(255,80,0,0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}


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

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

/* --- Tipografia --- */
h1 { font-size: clamp(2.5rem, 8vw, 6rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.1; }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); font-weight: 600; }
p  { font-size: 1rem; color: var(--grigio-testo); line-height: 1.8; }

.uppercase { text-transform: uppercase; letter-spacing: 0.08em; }
.accent    { color: var(--arancione); }

/* --- Layout --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
  position: relative;
  z-index: 1;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transizione), padding var(--transizione);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255, 96, 0, 0.2);
}

.navbar.menu-aperto {
  background: rgba(10, 10, 10, 0.98);
}

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

.navbar-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.navbar-links a {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bianco);
  transition: color var(--transizione);
}

.navbar-links a:hover,
.navbar-links a.attivo {
  color: var(--arancione);
}

.navbar-cta {
  background: var(--arancione);
  color: var(--nero) !important;
  padding: 0.6rem 1.4rem;
  border-radius: var(--raggio);
  font-weight: 700 !important;
  transition: background var(--transizione) !important;
}

.navbar-cta:hover {
  background: var(--arancione-scuro) !important;
  color: var(--bianco) !important;
}

/* Hamburger menu mobile */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bianco);
  transition: all var(--transizione);
}

/* --- Pulsanti --- */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  border-radius: var(--raggio);
  transition: all var(--transizione);
}

.btn-primario {
  background: var(--arancione);
  color: var(--nero);
}

.btn-primario:hover {
  background: var(--arancione-scuro);
  color: var(--bianco);
  transform: translateY(-2px);
}

.btn-secondario {
  background: transparent;
  color: var(--bianco);
  border: 2px solid var(--bianco);
}

.btn-secondario:hover {
  background: var(--bianco);
  color: var(--nero);
  transform: translateY(-2px);
}

/* --- Sezione sfondo pattern arancione --- */
.sezione-pattern {
  position: relative;
  overflow: hidden;
}

.sezione-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 60% 35%, #cc5500 0%, #7b2e00 45%, #1a0800 100%);
  opacity: 0.15;
  z-index: 0;
}

.sezione-pattern > * {
  position: relative;
  z-index: 1;
}

/* --- Tag sezione --- */
.tag-sezione {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--arancione);
  margin-bottom: 1rem;
}

/* --- Linea decorativa --- */
.linea-arancione {
  width: 60px;
  height: 3px;
  background: var(--arancione);
  margin: 1.5rem 0;
}

/* --- Card servizio --- */
.card-servizio {
  background: var(--grigio-medio);
  border: 1px solid rgba(255, 96, 0, 0.1);
  border-radius: var(--raggio);
  padding: 2.5rem;
  transition: all var(--transizione);
}

.card-servizio:hover {
  border-color: var(--arancione);
  transform: translateY(-4px);
}

.card-servizio .numero {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--arancione);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.card-servizio h3 {
  margin-bottom: 1rem;
}

/* --- Grid generica --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  align-items: center;
}

/* --- Footer --- */
footer {
  background: transparent;
  border-top: 1px solid rgba(255, 96, 0, 0.2);
  position: relative;
  z-index: 1;
  padding: 4rem 0 2rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo img {
  height: 50px;
  margin-bottom: 1rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--arancione);
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-col ul a {
  font-size: 0.9rem;
  color: var(--grigio-testo);
  transition: color var(--transizione);
}

.footer-col ul a:hover {
  color: var(--bianco);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.8rem;
}

/* --- Animazioni scroll --- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.fade-in-ritardo-1 { transition-delay: 0.1s; }
.fade-in-ritardo-2 { transition-delay: 0.2s; }
.fade-in-ritardo-3 { transition-delay: 0.3s; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    z-index: 99999;
  }

  .navbar-links.aperto {
    display: flex;
  }

  .navbar-links a {
    font-size: 1.5rem;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hamburger.aperto span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.aperto span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.aperto span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  section { padding: 4rem 0; }
}

@media (max-width: 600px) {
  .grid-3 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 375px) {
  .container { padding: 0 1.2rem; }
  .page-header { padding: 8rem 0 4rem; }
  h1 { font-size: 2.2rem; }
  .btn { padding: 0.85rem 1.8rem; font-size: 0.82rem; }
}

/* Case study grid */
.case-study-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 768px) {
  .case-study-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Focus visibili per navigazione da tastiera */
:focus-visible {
  outline: 2px solid var(--arancione);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Instagram floating button --- */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #833AB4, #FD1D1D, #FF6000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  box-shadow: 0 4px 20px rgba(131, 58, 180, 0.4);
  transition: transform var(--transizione), box-shadow var(--transizione);
  cursor: pointer;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 32px rgba(131, 58, 180, 0.6);
}

.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: #ffffff;
  display: block;
}

/* --- Sezioni chiare (alternanza) --- */
.sezione-chiara {
  background: var(--grigio-chiaro);
}

.sezione-chiara h2,
.sezione-chiara h3,
.sezione-chiara .numero-item .etichetta,
.sezione-chiara .step h3,
.sezione-chiara .testimonial-nome,
.sezione-chiara .cta-contenuto h2 {
  color: var(--nero-testo);
}

.sezione-chiara p,
.sezione-chiara .testimonial-handle,
.sezione-chiara .step p,
.sezione-chiara .hero-sottotitolo {
  color: #555;
}

.sezione-chiara .tag-sezione {
  background: var(--arancione);
  color: var(--bianco);
  border-color: var(--arancione);
}

.sezione-chiara .testimonial-card {
  background: var(--bianco);
  border-color: rgba(255, 96, 0, 0.12);
}

.sezione-chiara .testimonial-card:hover {
  border-color: var(--arancione);
}

.sezione-chiara .testimonial-testo {
  color: #333;
}

.sezione-chiara .step {
  border-color: rgba(255, 96, 0, 0.25);
}

.sezione-chiara .linea-arancione {
  background: var(--arancione);
}

/* --- Sezione testimonial --- */
.sezione-testimonial {
  background: transparent;
}

.grid-testimonial {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.testimonial-card {
  background: var(--grigio-medio);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--raggio);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transizione);
}

.testimonial-video {
  background: var(--grigio-medio);
  border: 1px solid rgba(255, 96, 0, 0.2);
  border-radius: var(--raggio);
  overflow: hidden;
  min-height: 250px;
  position: relative;
  cursor: pointer;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2;
  border-radius: var(--raggio);
  transition: opacity 0.3s ease;
}

.video-overlay.nascosto {
  opacity: 0;
  pointer-events: none;
}

.video-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bianco);
  text-align: center;
  max-width: 80%;
  line-height: 1.5;
  padding: 0 0.5rem;
}

.video-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--arancione);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--bianco);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(255, 96, 0, 0.4);
}

.video-play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(255, 96, 0, 0.6);
}

.testimonial-card:hover {
  border-color: rgba(255, 96, 0, 0.3);
}

.testimonial-virgolette {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--arancione);
  opacity: 0.35;
  line-height: 0.7;
  margin-bottom: 1.5rem;
  font-family: Georgia, serif;
}

.testimonial-testo {
  font-size: 0.95rem;
  color: var(--bianco);
  line-height: 1.75;
  font-style: italic;
  flex: 1;
  margin-bottom: 2rem;
}

.testimonial-autore {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-foto {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 96, 0, 0.4);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
  flex-shrink: 0;
}

.testimonial-nome {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--bianco);
  display: block;
  margin-bottom: 0.2rem;
}

.testimonial-handle {
  font-size: 0.8rem;
  color: var(--arancione);
  display: block;
}

/* --- Hero layout centrato --- */
.hero-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.hero-immagine img {
  width: 100%;
  border-radius: var(--raggio);
  box-shadow: 0 30px 80px rgba(255, 96, 0, 0.18);
}

@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-immagine {
    order: -1;
  }

  .hero-immagine img {
    max-height: 340px;
    object-fit: cover;
  }

  .grid-testimonial {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .testimonial-card {
    padding: 1.2rem;
  }

  .testimonial-virgolette {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
  }

  .testimonial-testo {
    font-size: 0.8rem;
  }

  .testimonial-autore {
    gap: 0.5rem;
  }

  .testimonial-nome {
    font-size: 0.7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .testimonial-handle {
    font-size: 0.6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }

  .testimonial-foto {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .testimonial-autore > div {
    overflow: hidden;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
  }

  .testimonial-video {
    min-height: 200px;
  }
}

/* Barra progresso scroll — solo mobile */
.scroll-progress {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 4px;
  height: 100vh;
  z-index: 1002;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
}

.scroll-progress-bar {
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, #FF6000, #ff8533, #FF6000);
  border-radius: 4px;
  transition: height 0.05s linear;
  box-shadow: 0 0 12px rgba(255, 96, 0, 0.6), 0 0 4px rgba(255, 96, 0, 0.9);
  position: relative;
}

.scroll-progress-bar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF6000;
  box-shadow: 0 0 16px rgba(255, 96, 0, 0.8), 0 0 6px rgba(255, 96, 0, 1);
}

@media (max-width: 768px) {
  .scroll-progress {
    display: block;
  }
}

/* Mobile piccoli */
@media (max-width: 500px) {
  .page-header {
    padding: 7rem 0 3rem !important;
  }

  section {
    padding: 3rem 0 !important;
  }

  h1 {
    font-size: 1.8rem !important;
  }

  h2 {
    font-size: 1.4rem !important;
  }

  .container {
    padding: 0 1.2rem;
  }

  .grid-2 {
    gap: 2rem;
  }

  .testimonial-video {
    min-height: 180px;
  }
}

/* --- Cookie Consent Banner --- */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: rgba(17, 17, 17, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 96, 0, 0.2);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-testo {
  flex: 1;
  min-width: 200px;
}

.cookie-testo strong {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.cookie-testo p {
  font-size: 0.8rem;
  color: #9a9a9a;
  margin: 0;
  line-height: 1.5;
}

.cookie-link {
  font-size: 0.75rem;
  color: #FF6000;
  text-decoration: underline;
}

.cookie-azioni {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-azioni button {
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cookie-azioni button:hover { opacity: 0.8; }

#cookie-accetta {
  background: #FF6000;
  color: #ffffff;
  border: none;
}

#cookie-rifiuta {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.4);
}

@media (max-width: 600px) {
  #cookie-banner::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
  }

  #cookie-banner {
    top: 50%;
    bottom: auto;
    left: 1.25rem;
    right: 1.25rem;
    transform: translateY(-50%);
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 96, 0, 0.35);
    border-top: 1px solid rgba(255, 96, 0, 0.35);
  }

  .cookie-azioni {
    width: 100%;
    flex-direction: column;
    gap: 0.6rem;
  }

  .cookie-azioni button {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}
