/* ============================================================
   PFT — Global Styles & Interactions
   ============================================================ */

html { 
  scroll-behavior: smooth; 
  font-size: 16px; 
}

body { 
  cursor: none; 
  background-color: #f5f0eb; 
  overflow-x: hidden; 
  margin: 0;
}

/* Disabilita cursore custom su mobile per evitare bug */
@media (max-width: 767px) { 
  body { cursor: auto; } 
}

a, button { cursor: none; }

/* Nasconde scrollbar per un look più pulito */
::-webkit-scrollbar { width: 0px; }

/* ----- Page transition (5 colonne nere) ----- */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  display: flex;
}

#page-transition .pt-col {
  flex: 1;
  background-color: #1a1a18;
  transform: translateY(0);
  transition: transform 0.9s cubic-bezier(.7, 0, .3, 1);
}

#page-transition.is-out .pt-col { 
  transform: translateY(-100%); 
}

#page-transition .pt-col:nth-child(2) { transition-delay: .07s; }
#page-transition .pt-col:nth-child(3) { transition-delay: .14s; }
#page-transition .pt-col:nth-child(4) { transition-delay: .21s; }
#page-transition .pt-col:nth-child(5) { transition-delay: .28s; }

/* ----- Custom Cursor (Pallino bianco) ----- */
#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  background-color: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
  transform: translate(-50%, -50%);
}

@media (max-width: 767px) { 
  #cursor-dot { display: none; } 
}

/* ----- GSAP Horizontal Scroll (Servizi) ----- */
#projects, .pin-spacer {
  background-color: #000 !important;
}

.project-slide {
  flex-shrink: 0;
  width: 100vw;
  height: 100vh;
}

/* Barra arancione di progresso servizi */
#projectsBar {
  background-color: #ee9637 !important;
  height: 100%;
  transition: width 0.1s ease-out;
}

/* ----- Reveal-on-scroll (Animazione entrate) ----- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}

.reveal.is-in { 
  opacity: 1; 
  transform: translateY(0); 
}

/* ----- MENU OVERLAY: EFFETTO SPOSTAMENTO + COLORE ----- */
/* ----- UNIVERSAL MENU STYLES (VERSIONE ULTRA-FORZATA) ----- */
.menu-link {
  /* 1. Forza il comportamento da blocco (senza questo non si sposta!) */
  display: inline-block !important; 
  
  /* 2. Reset totale per evitare interferenze */
  position: relative !important;
  text-decoration: none !important;
  
  /* 3. La transizione deve essere su TUTTO */
  transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1) !important;
  
  /* 4. Colore base */
  color: #ffffff !important;
}

/* EFFETTO AL PASSAGGIO */
.menu-link:hover {
  /* Sposta verso destra di 50px usando il motore grafico (translate3d) */
  transform: translate3d(50px, 0, 0) !important;
  
  /* Cambia colore in arancione */
  color: #ee9637 !important;
}

/* ----- SEZIONE BANDI: CAMBIO TEMA NERO/BIANCO ----- */
#bandi-intro-inner {
  background-color: #000000 !important;
  transition: background-color 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Classe aggiunta via JavaScript allo scroll */
#bandi-intro-inner.is-light {
  background-color: #ffffff !important;
}

/* Colore testi che si adattano al tema light */
.bandi-text { transition: color 0.8s ease; color: #ffffff; }
.bandi-text-soft { transition: color 0.8s ease; color: rgba(255,255,255,0.7); }
.bandi-grid-line { transition: border-color 0.8s ease; border-color: rgba(255,255,255,0.08); }

#bandi-intro-inner.is-light .bandi-text {
  color: #1a1a18 !important;
}

#bandi-intro-inner.is-light .bandi-text-soft {
  color: rgba(26,26,24,0.6) !important;
}

#bandi-intro-inner.is-light .bandi-grid-line {
  border-color: rgba(0,0,0,0.08) !important;
}

/* ----- ELEMENTI UI EXTRA ----- */
.hero-bg { 
  transform: translateZ(0); 
  will-change: transform; 
}

.source-card, .stat-card { 
  transition: all 0.3s ease; 
  border: 1px solid rgba(26,26,24,0.1);
}

.source-card:hover, .stat-card:hover {
  border-color: #ee9637;
  transform: translateY(-4px);
  background-color: rgba(238, 150, 55, 0.03);
}

.eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #ee9637;
  border-radius: 50%;
  margin-right: 12px;
  vertical-align: middle;
}

.chapter-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 200;
  font-size: clamp(8rem, 18vw, 22rem);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(26, 26, 24, 0.18);
  letter-spacing: -0.04em;
}

.chapter-num-light { 
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18); 
}

/* ----- MARQUEE ANIMATION ----- */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}