/* Professional Journey Storytelling - Modern Corporate */

/* ===== PREMIUM GRADIENT MESH BACKGROUND ===== */
.corporate-gradient-bg {
  background: 
    /* Layer 1: Base premium gradient */
    linear-gradient(135deg, 
      #f8fafc 0%,     /* Pure white start */
      #f1f5f9 15%,    /* Subtle slate tint */
      #e2e8f0 35%,    /* Light slate */
      #cbd5e1 55%,    /* Medium slate */
      #94a3b8 75%,    /* Stronger slate */
      #64748b 100%    /* Deep slate finish */
    ),
    /* Layer 2: Mesh overlay pattern */
    radial-gradient(circle at 25% 25%, rgba(0, 87, 183, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 75% 75%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(147, 197, 253, 0.04) 0%, transparent 70%);
  
  position: relative;
  /* Premium texture overlay */
  background-size: 100% 100%, 800px 800px, 600px 600px, 400px 400px;
  background-repeat: no-repeat, repeat, repeat, repeat;
}

/* ===== SUBTLE PREMIUM BACKGROUND SYSTEM ===== */
.corporate-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Background fisso premium - niente sweep */
  background: 
    /* Layer 1: Subtle premium gradient */
    linear-gradient(135deg, 
      rgba(248, 250, 252, 0.6) 0%,    /* Light premium */
      rgba(241, 245, 249, 0.4) 50%,   /* Medium premium */
      rgba(226, 232, 240, 0.3) 100%   /* Deep premium */
    ),
    /* Layer 2: Texture overlay */
    radial-gradient(circle at 25% 75%, rgba(15, 23, 42, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 75% 25%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
  
  z-index: 0;
  pointer-events: none;
  backdrop-filter: blur(0.3px);
  -webkit-backdrop-filter: blur(0.3px);
}

/* Additional premium texture layer */
.corporate-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    /* Subtle grain texture */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(148, 163, 184, 0.01) 2px,
      rgba(148, 163, 184, 0.01) 4px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 2px,
      rgba(203, 213, 225, 0.008) 2px,
      rgba(203, 213, 225, 0.008) 4px
    );
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
}

/* ===== ATTO 1: LOGO HERO STAGE ===== */
.logo-hero-stage {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: transparent; /* Trasparente - usa il background principale */
  z-index: 30; /* Più alto per assicurare visibilità durante i primi 5s */
  opacity: 1;
  animation: logoStageReveal 3s ease-out forwards, logoStageExit 2s ease-in-out 3s forwards;
}

.logo-hero {
  width: 390px; /* 30% più grande: 300 + (300 * 0.3) = 390px */
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: logoEntrance 2s ease-out 0.5s forwards;
  filter: drop-shadow(0 10px 30px rgba(29, 78, 216, 0.15));
  margin-bottom: 40px; /* Spazio per progress bar */
}

/* ===== CORPORATE PROGRESS BAR ===== */
.corporate-progress-container {
  width: 320px;
  height: 6px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 3px;
  overflow: hidden;
  opacity: 0;
  animation: progressContainerReveal 0.8s ease-out 1.5s forwards, progressContainerExit 0.5s ease-in-out 8s forwards;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.corporate-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, 
    #1e293b 0%, 
    #334155 25%, 
    #475569 50%, 
    #64748b 75%, 
    #1e293b 100%
  );
  background-size: 200% 100%;
  border-radius: 3px;
  animation: progressFill 6.5s cubic-bezier(0.4, 0, 0.2, 1) 2s forwards, progressShimmer 2s ease-in-out 2s infinite;
  position: relative;
  overflow: hidden;
}

.corporate-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: progressSweep 1.5s ease-in-out 2.5s infinite;
}

/* Progress bar animations */
@keyframes progressContainerReveal {
  to { opacity: 1; }
}


@keyframes progressContainerExit {
  to { 
    opacity: 0; 
    visibility: hidden; 
  }
}

@keyframes progressFill {
  0% { width: 0%; }
  15% { width: 10%; }   /* Lento all'inizio */
  30% { width: 25%; }   /* Atto 1 completo */
  50% { width: 60%; }   /* Durante Atto 2 (journey) */
  70% { width: 85%; }   /* Fine Atto 2 */
  100% { width: 100%; } /* Completo prima di Atto 3 */
}

@keyframes progressShimmer {
  0%, 100% { 
    background-position: -200% 0; 
  }
  50% { 
    background-position: 200% 0; 
  }
}

@keyframes progressSweep {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes logoStageReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes logoEntrance {
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

@keyframes logoStageExit {
  to { 
    opacity: 0; 
    visibility: hidden; 
  }
}

/* ===== MINIMAL PARTICLES ===== */
.golden-particles {
  position: relative;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(148, 163, 184, 0.4);
  border-radius: 50%;
  opacity: 0;
  animation: floatMinimal 15s ease-in-out infinite;
}

.particle-1 { top: 15%; left: 20%; animation-delay: 0s; }
.particle-2 { top: 70%; right: 15%; animation-delay: 5s; }
.particle-3 { top: 40%; left: 80%; animation-delay: 10s; }
.particle-4 { bottom: 60%; left: 30%; animation-delay: 3s; }
.particle-5 { top: 85%; right: 40%; animation-delay: 8s; }
.particle-6 { top: 25%; left: 60%; animation-delay: 12s; }

@keyframes floatMinimal {
  0%, 100% { 
    opacity: 0; 
    transform: translateY(0px); 
  }
  30% { 
    opacity: 0.3; 
    transform: translateY(-15px); 
  }
  70% { 
    opacity: 0.2; 
    transform: translateY(-8px); 
  }
}

/* ===== ATTO 2: JOURNEY PATH REVELATION ===== */
.growth-journey {
  pointer-events: none;
  opacity: 0;
  animation: journeyStageEnter 1s ease-out 5s forwards;
  z-index: 5; /* Medio - appare dopo il logo, prima del content */
}

.journey-svg {
  position: relative;
  z-index: -1; /* SVG dietro tutto nel parent growth-journey */
}

.growth-path {
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: drawJourneyPath 3s ease-out 5.5s forwards;
}

@keyframes journeyStageEnter {
  to { opacity: 1; }
}

@keyframes drawJourneyPath {
  to { stroke-dashoffset: 0; }
}

/* ===== PROFESSIONAL MILESTONES ===== */
.milestone {
  position: absolute;
  opacity: 0;
  transform: scale(0) translateY(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 6; /* Leggermente sopra il path, ma sotto il content finale */
}

.milestone-1 {
  top: 62.5%;
  left: 4%;
  animation: milestoneReveal 1.2s ease-out 6.5s forwards;
}

.milestone-2 {
  top: 42%;
  left: 50%;
  transform: translateX(-50%);
  animation: milestoneReveal 1.2s ease-out 7s forwards;
}

.milestone-3 {
  top: 30%;
  right: 4%;
  animation: milestoneReveal 1.2s ease-out 7.5s forwards;
}

.milestone-icon {
  width: 60px;
  height: 60px;
  background: 
    linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%),
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  margin-bottom: 12px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  box-shadow: 
    0 8px 32px rgba(30, 41, 59, 0.25),
    0 4px 16px rgba(51, 65, 85, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.milestone-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: rotate(45deg);
  transition: transform 0.6s ease;
}

.milestone:hover .milestone-icon::before {
  transform: rotate(45deg) translate(50%, 50%);
}

.milestone-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.milestone-label {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  text-align: center;
  background: 
    linear-gradient(135deg, #1e293b 0%, #334155 100%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  padding: 12px 20px;
  border-radius: 24px;
  box-shadow: 
    0 8px 32px rgba(30, 41, 59, 0.3),
    0 4px 16px rgba(51, 65, 85, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.milestone-label::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.6s ease;
}

.milestone:hover .milestone-label::before {
  left: 100%;
}

@keyframes milestoneReveal {
  0% { 
    opacity: 0; 
    transform: scale(0) translateY(20px); 
  }
  70% { 
    opacity: 1; 
    transform: scale(1.1) translateY(-5px); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

/* ===== REMOVED: Business metrics (ridondanti) ===== */

/* ===== ATTO 3: CONTENT CROWN ===== */
/* Main content container - NASCOSTO all'inizio, poi PIENO subito */
section#hero.corporate-hero .container {
  opacity: 0;
  visibility: hidden;
  animation: contentStageRevealInstant 0.1s ease-out 8s forwards;
}

@keyframes contentStageRevealInstant {
  to { 
    opacity: 1; 
    visibility: visible; 
  }
}

.corporate-fade-in {
  opacity: 0;
  transform: translateX(-40px);
  animation: horizonTitleReveal 1.2s ease-out 8.5s forwards;
}

/* Nascondi il container del subtitle inizialmente */
.hero-subtitle-container {
  opacity: 0;
  visibility: hidden;
  animation: subtitleContainerReveal 0.1s ease-out 9.5s forwards;
}

@keyframes subtitleContainerReveal {
  to { 
    opacity: 1; 
    visibility: visible; 
  }
}

.corporate-slide-up {
  opacity: 0;
  transform: translateX(40px);
  animation: horizonSubtitleReveal 1.2s ease-out 9.6s forwards;
}

.corporate-buttons {
  opacity: 0;
  transform: translateX(40px);
  animation: horizonButtonsReveal 1.2s ease-out 10.2s forwards;
}

/* ===== PREMIUM TYPOGRAPHY SYSTEM ===== */
.hero-title {
  color: #1e293b !important; /* Deep slate per sofisticazione */
  font-weight: 800 !important; /* Extra bold per impatto premium */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: -0.025em !important; /* Tight tracking per modernità */
  text-shadow: 0 2px 8px rgba(30, 41, 59, 0.15) !important; /* Shadow subtile per depth */
  /* Rimosso gradient text per evitare blur - colore solido premium */
}

.hero-subtitle {
  color: #475569 !important; /* Medium slate per contrasto bilanciato */
  font-weight: 400 !important; /* Regular weight per eleganza */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  letter-spacing: 0.01em !important; /* Slightly loose per leggibilità */
  line-height: 1.6 !important; /* Generous line height per readability */
  text-shadow: 0 1px 2px rgba(71, 85, 105, 0.1) !important;
  /* RIMOSSO opacity: 0.9 - conflitto con animazione */
}

/* Opacity finale SOLO dopo animazione */
.hero-subtitle.corporate-slide-up {
  opacity: 0; /* Iniziale per animazione */
}

.hero-subtitle.corporate-slide-up.animation-complete {
  opacity: 0.9 !important; /* Finale dopo animazione */
}

/* Premium font loading optimization */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CLEAN SLIDE ANIMATIONS ===== */
@keyframes horizonTitleReveal {
  0% { 
    opacity: 0; 
    transform: translateX(-40px);
  }
  100% { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

@keyframes horizonSubtitleReveal {
  0% { 
    opacity: 0; 
    transform: translateX(40px);
  }
  100% { 
    opacity: 0.9; /* Opacity finale corretta - 0.9 invece di 1 per hierarchy */
    transform: translateX(0); 
  }
}

@keyframes horizonButtonsReveal {
  0% { 
    opacity: 0; 
    transform: translateX(40px);
  }
  100% { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

/* ===== PREMIUM CTA BUTTON SYSTEM ===== */
.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: 
    linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  color: white;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 18px 36px;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 32px rgba(30, 41, 59, 0.25),
    0 4px 16px rgba(51, 65, 85, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  font-size: 16px;
  letter-spacing: 0.025em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cta-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.8s ease;
}

.cta-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent, rgba(255, 255, 255, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: exclude;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
}

.cta-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 16px 48px rgba(30, 41, 59, 0.35),
    0 8px 24px rgba(51, 65, 85, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  background: 
    linear-gradient(135deg, #334155 0%, #475569 50%, #64748b 100%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
}

.cta-primary:hover::before {
  left: 100%;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  color: #1e293b;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 18px 36px;
  border-radius: 14px;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(30, 41, 59, 0.1);
  font-size: 16px;
  letter-spacing: 0.025em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 
    0 4px 20px rgba(30, 41, 59, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.cta-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(30, 41, 59, 0.05), transparent);
  transition: left 0.6s ease;
}

.cta-secondary:hover {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(30, 41, 59, 0.2);
  transform: translateY(-2px) scale(1.01);
  color: #334155;
  box-shadow: 
    0 8px 28px rgba(30, 41, 59, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.cta-secondary:hover::before {
  left: 100%;
}

/* ===== COUNTER ANIMATION ===== */
@keyframes countUp {
  from { 
    transform: translateY(20px);
    opacity: 0;
  }
  to { 
    transform: translateY(0);
    opacity: 1;
  }
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  /* Riduzione padding top dell'hero section per eliminare spazio vuoto */
  .corporate-hero {
    padding-top: 60px !important; /* Ridotto da default per minimizzare gap */
    min-height: 80vh !important; /* Ridotto per compattare */
  }
  
  /* Logo più piccolo e posizionato meglio su mobile */
  .logo-hero {
    width: 220px !important; /* Più piccolo del desktop (390px) */
  }
  
  .logo-hero-stage {
    padding-top: 40px !important; /* Ridotto gap tra menu e logo */
  }
  
  /* Journey path e milestone ottimizzati per mobile */
  .growth-journey {
    pointer-events: none;
    opacity: 1;
    z-index: 5;
  }
  
  .milestone {
    display: flex !important;
    z-index: 15;
  }
  
  /* Riposiziona milestone con variazioni di altezza */
  .milestone-1 {
    top: 48% !important;
    left: 15% !important;
    animation: milestoneReveal 1.2s ease-out 6.5s forwards !important;
  }
  
  .milestone-2 {
    top: 45% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    animation: milestoneReveal 1.2s ease-out 7s forwards !important;
  }
  
  .milestone-3 {
    top: 42% !important;
    right: 15% !important;
    animation: milestoneReveal 1.2s ease-out 7.5s forwards !important;
  }
  
  /* Content container ottimizzato */
  .corporate-hero .container {
    z-index: 20 !important;
    position: relative !important;
    padding-top: 20px !important; /* Ridotto per compattare */
  }
  
  /* Typography più compatta su mobile */
  .hero-title {
    font-size: 2.2rem !important; /* Ridotto per mobile */
    line-height: 1.2 !important;
    margin-bottom: 15px !important;
  }
  
  .hero-subtitle {
    font-size: 1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 25px !important;
  }
  
  /* Progress bar mobile optimization */
  .corporate-progress-container {
    width: 280px !important; /* Più piccolo su mobile */
  }
}
  
  .business-metrics {
    position: relative;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    margin: 10px;
  }
  
  .metric-card {
    display: inline-block;
    margin: 5px;
    padding: 12px 16px;
  }
  
  .metric-number {
    font-size: 24px;
  }
  
  .milestone-icon {
    width: 50px; /* Leggermente più grande per mobile */
    height: 50px;
    margin-bottom: 8px;
  }
  
  .milestone-label {
    font-size: 12px; /* Più leggibile su mobile */
    padding: 8px 14px; /* Padding ridotto per mobile */
    letter-spacing: 0.8px; /* Ridotto per mobile */
  }
}

/* ===== EASE-BACK TIMING FUNCTION ===== */
@supports (animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55)) {
  .milestone {
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  }
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .corporate-gradient-bg,
  .particle,
  .growth-path,
  .milestone,
  .metric-card,
  .corporate-fade-in,
  .corporate-slide-up,
  .corporate-buttons {
    animation: none;
  }
  
  .milestone {
    opacity: 1;
    transform: scale(1);
  }
  
  .metric-card {
    opacity: 1;
    transform: translateY(0);
  }
  
  .corporate-fade-in,
  .corporate-slide-up,
  .corporate-buttons {
    opacity: 1;
    transform: translateY(0);
  }
}