 /* RICOMINCIO DA QUI */ 
/* FONTS*/
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-BlackItalic.otf);font-weight:900;font-style:italic;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-Black.otf);font-weight:900;font-style:normal;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-ExtraBold.otf);font-weight:800;font-style:normal;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-ExtraBoldItalic.otf);font-weight:800;font-style:italic;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-Bold.otf);font-weight:700;font-style:normal;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-BoldItalic.otf);font-weight:700;font-style:italic;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-SemiBold.otf);font-weight:600;font-style:normal;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-SemiBoldItalic.otf);font-weight:600;font-style:italic;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-Medium.otf);font-weight:500;font-style:normal;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-MediumItalic.otf);font-weight:500;font-style:italic;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-Regular.otf);font-weight:400;font-style:normal;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-RegularItalic.otf);font-weight:400;font-style:italic;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-Light.otf);font-weight:300;font-style:normal;font-display:swap;}
@font-face{font-family:"Serotiva";src:url(/assets/font/Serotiva-LightItalic.otf);font-weight:300;font-style:italic;font-display:swap;}

/* =========================
   RESET & ROOT
========================= */
*{margin:0;padding:0;box-sizing:border-box;}
html{scroll-behavior:smooth;}

:root{
  --pad:24px;
  --hamburger-size:32px;
  --report-col-width:min(680px,44vw);
  --content-x:48%;
  --content-w:50%;
  --text-light:#EAE9E8;
  --text-dark:#253126;
  --gray-dark:#A7A6A6;
  --gray-light:#D1D0D1;
  --bg:#EAE9E8;
  --bg-dark:#253126;
  --accent:#ff3b30;
  --video-steps:3;
}

body{
  background:var(--bg);
  font-family:"tt-commons-pro",sans-serif;
  font-weight:400;
  color:var(--text-dark); /* Unificato: il colore scuro vince sul chiaro per il contenuto */
}

/* =========================
   HERO MEDIA & VIDEO WRAPPER
========================= */
.video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--video-steps, 4) * 100vh);
  z-index: 0;
}

.hero-media {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  background-color: var(--bg-dark);
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  transition: border-radius 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body.is-scrolled .hero-media {
  border-bottom-left-radius: 30px !important;
  border-bottom-right-radius: 30px !important;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* Unificato l'overlay scuro */
  z-index: 1;
  pointer-events: none;
}

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

/* HEADER */
/* --- LOGO & HEADER --- */
.hero-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: clamp(10px, 2vw, 24px) clamp(16px, 3vw, 48px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
  }

/* --- LOGO WRAP --- */
.logo-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    height: 40px;
    --r: 6px;
    border-radius: var(--r);
    transition: background-color 300ms ease;
    pointer-events: auto;
  }
  
  /* Stato quando si inizia a scrollare */
  body.ui-scrolled .logo-wrap {
    background-color: #D1D0D1; /* Il tuo grigio --gray-light */
  }
  
  /* Rimuovi assolutamente il vecchio blur */
  .logo-blur {
    display: none !important;
  }
  
  .logo img {
    height: 28px;
    width: auto;
    display: block;
    transition: opacity 300ms ease; /* Per rendere fluido il cambio src */
  }

/* =========================
   HERO LAYOUT
========================= */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: var(--pad);
  width: 100%;
}

.hero-overlay {
  position: relative;
  z-index: 20;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-content {
    /* Cambia da clamp(80px, 12vh, 24px) a quello di Technology */
    margin-top: clamp(80px, 12vh, 56px); 
    margin-left: clamp(16px, 3vw, calc(var(--pad)/4));
    z-index: 10;
    pointer-events: none;
}

.hero-content h1 {
  font-family: "Serotiva", serif;
  font-size: clamp(42px, 7vw, 100px);
  line-height: 1;
  font-weight: 600;
  color: var(--text-light);
}

.hero-description {
  z-index: 10;
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 300;
  line-height: 1.3;
  max-width: 1200px;
  margin-top: auto;
  margin-bottom: clamp(24px, 5vh, 60px);
  margin-left: clamp(16px, 3vw, calc(var(--pad) / 4));
  color: var(--text-light);
  pointer-events: none;
}

/* Stato iniziale per i titoli e descrizioni */
.hero-content h1, 
.hero-description {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

/* Classe attivata da JS */
body.is-loaded .hero-content h1,
body.is-loaded .hero-description {
    opacity: 1;
    transform: translateY(0);
}

/* Ritardo per la descrizione (per far apparire prima il titolo) */
body.is-loaded .hero-description {
    transition-delay: 0.4s;
}

/* =========================
   WHAT WE DO
========================= */
.whatwedo {
  position: relative;
  z-index: 1;
  height: calc(var(--steps, 3) * 100vh);
}

.whatwedo-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  pointer-events: none;
}

.whatwedo-top {
  position: absolute;
  top: 140px;
  left: 0; right: 0;
  padding: 0 clamp(16px, 3vw, calc(var(--pad) * 2));
}

.whatwedo-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 200;
  color: var(--text-light);
}

.whatwedo-line {
  margin-top: 18px;
  height: 1.5px;
  background: rgba(167, 166, 166, 0.4);
  position: relative;
  overflow: hidden;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
}

.whatwedo-line-progress {
  position: absolute;
  left: 0; top: 0;
  height: 1.5px;
  width: 0%;
  background: var(--text-light);
}

.whatwedo-textwrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  height: 100%;
}

.whatwedo-item {
  position: absolute;
  top: 225px;
  left: var(--content-x);
  width: var(--content-w);
  opacity: 0;
  transition: opacity 220ms ease;
  will-change: opacity;
}

.whatwedo-item.is-active { opacity: 1; }

.whatwedo-item p {
  font-size: clamp(24px, 3.8vw, 46px);
  line-height: 1.1;
  font-weight: 300;
  color: var(--text-light);
}

.whatwedo-item .p-base { color: var(--gray-dark); opacity: 0.4; }

.whatwedo-item .p-reveal {
  position: absolute;
  inset: 0;
  color: var(--text-light);
  pointer-events: none;
}

.wwd-lines { display: block; }
.wwd-line { display: block; white-space: nowrap; }
.wwd-word { display: inline; white-space: pre; }

.p-reveal .wwd-word {
  opacity: 0;
  transition: opacity 140ms linear;
  will-change: opacity;
}

@media (prefers-reduced-motion: reduce) {
  .p-reveal .wwd-word { transition: none; }
}

/* ============================================================
   SUBSCRIBE HORIZONTAL SECTION (VERSIONE FINALE ALLINEATA)
   ============================================================ */

/* Contenitore principale: gestisce la durata dello scroll verticale */
.subscribe-horizontal-container {
    position: relative;
    height: 600vh; /* Durata dell'effetto scroll */
    background: var(--bg);
    z-index: 10;
  }
  
  /* Sticky Wrapper: mantiene testo e cards fissi mentre scorrono */
  .subscribe-sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Cambia da flex-start a center */
    justify-content: center; 
    transition: border-radius 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
  }
  
  /* Arrotondamento dinamico attivato da JS */
  body.is-scrolled .subscribe-sticky-wrapper {
    border-bottom-left-radius: 30px !important;
    border-bottom-right-radius: 30px !important;
  }
  
  /* --- TESTATA: REPLICA ESATTA DELLO STILE LEADERSHIP --- */
  .subscribe-top {
    position: relative;
    width: 100%;
    /* Riduciamo il padding superiore ed eliminiamo quello inferiore */
    padding: 40px clamp(16px, 3vw, 48px) 0; 
    display: block;
    background: var(--bg);
    z-index: 20; 
    opacity: 1 !important;
}

.subscribe-label {
    position: absolute;
    left: clamp(16px, 3vw, 48px);
    /* Allinea il pallino al nuovo padding del contenitore */
    top: 40px; 
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.4; 
}

.subscribe-slider-track {
    display: flex;
    gap: 18px !important;
    /* Usiamo il padding superiore per distanziarci dal testo sopra */
    /* Riduciamo il padding inferiore per staccarci dal bordo dello schermo */
    padding: 60px clamp(16px, 3vw, 48px) 40px; 
    will-change: transform;
}
  
  .subscribe-text {
    width: var(--content-w);
    margin-left: var(--content-x);
    font-size: clamp(20px, 2.5vw, 28px);
    line-height: 1.4; 
    font-weight: 300;
    color: #253126;
    /* Reset totale di margini che potrebbero spostare la prima riga rispetto all'etichetta */
    margin-top: 0;
    padding-top: 0;
  }
  

  .subscribe-text, .subscribe-label {
    opacity: 1 !important;
  }

  /* Responsive: gestione allineamento su mobile */
@media (max-width: 980px) {
    .subscribe-top {
      padding-top: 60px;
    }
    .subscribe-label {
      position: static;
      margin-bottom: 24px;
    }
    .subscribe-text {
      width: 100%;
      margin-left: 0;
    }
  }
  
  /* Stile Card */
  .subscribe-card {
    flex-shrink: 0;
    width: clamp(320px, 32vw, 420px);
    max-height: 70vh; 
    background: var(--bg-dark);
    border-radius: 24px;
    padding: 28px;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  
  .subscribe-card-code { 
    font-size: clamp(24px, 2vw, 32px); 
    font-weight: 300; 
    letter-spacing: -0.02em;
  }
  
  .subscribe-card-media {
    width: 100%;
    aspect-ratio: 1.1 / 1;
    border-radius: 16px;
    overflow: hidden;
  }
  
  .subscribe-card-media img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
  }
  
  .subscribe-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 200;
    line-height: 1.25;
    color: #EAE9E8;
    padding-top: 16px;
  }
  
  .subscribe-card-keys { color: #EAE9E8; display: flex; flex-direction: column; gap: 4px; }
  .subscribe-card-values { text-align: right; display: flex; flex-direction: column; gap: 4px; font-weight: 300; }
  
  .subscribe-card-action {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.25;
  }
 
  /* RESET E NUOVA STRUTTURA FRECCIA GRAFICA */
.subscribe-card-arrow {
    position: relative; 
    width: 24px; 
    height: 24px;
    background: transparent; /* Rimosso il cerchio bianco */
    border-radius: 0;        /* Rimosso l'arrotondamento */
    display: block;          /* Cambiato da flex a block per posizionamento assoluto degli span */
}

.subscribe-card-arrow span {
    position: absolute;
    background-color: var(--text-light); /* Colore iniziale (chiaro) */
    transition: all 0.3s ease;
    transform-origin: right center; 
}

/* Linea orizzontale centrale */
.subscribe-card-arrow span:nth-child(1) {
    width: 20px; 
    height: 1.5px;
    top: 50%;
    right: 2px;
    transform: translateY(-50%);
}

/* Punta superiore */
.subscribe-card-arrow span:nth-child(2) {
    width: 10px; 
    height: 1.5px;
    top: 50%;
    right: 2px;
    transform: translateY(-50%) rotate(-45deg); /* Ruotata per puntare a destra */
}

/* Punta inferiore */
.subscribe-card-arrow span:nth-child(3) {
    width: 10px; 
    height: 1.5px;
    top: 50%;
    right: 2px;
    transform: translateY(-50%) rotate(45deg); /* Ruotata per puntare a destra */
}

/* --- EFFETTO HOVER SULLA CARD --- */
.subscribe-card:hover .subscribe-card-arrow span {
    background-color: var(--accent); /* Diventa rossa al passaggio del mouse */
}

  /* --- RESPONSIVE --- */
  @media (max-width: 980px) {
    .subscribe-label {
      position: static;
      margin-bottom: 24px;
    }
    .subscribe-text {
      width: 100%;
      margin-left: 0;
    }
  }
  
  @media (max-height: 750px) {
    .subscribe-card { padding: 20px; gap: 12px; }
    .subscribe-card-media { aspect-ratio: 1.3 / 1; }
  }

@media (max-width: 980px) {
  :root {
    --content-x: 0%;
    --content-w: 100%;
  }

  .whatwedo-item {
    left: clamp(24px, 4vw, calc(var(--pad) * 2));
    right: clamp(24px, 4vw, calc(var(--pad) * 2));
    width: auto;
  }

  .whatwedo-item .p-base,
  .whatwedo-item .p-reveal {
    padding: 0;
  }
}
