@import url('https://fonts.googleapis.com/css2?family=Cambo&display=swap');

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


body {
    font-family: "Cambo", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 18px;
    line-height: 1.6;
    color: #111;
    background-color: #6CACE4;
    padding: 0 5vw;
}

/* Title section */
.title-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.title-section h1 {
    font-size: 2em;
    font-family: "Cambo", serif;
    font-weight: 400;
    font-style: normal;
    margin-bottom: 1rem;
    color: white;
    letter-spacing: -0.02em;
}

.title-section .subtitle {
  
  font-family: "Cambo", serif;
  font-weight: 400;
  font-style: normal;
  margin-bottom: 1em;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.01em;
}

.intro-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.intro-text {
    text-align: center;


}

.intro-text p {
    font-size: 1em;
    line-height: 1.6;
    color: white;
    margin-left: 10em;
    margin-block-end: 3em;
    margin-right: 10em;
    text-align: justify;
    hyphens: auto;
}

.highlight {
  color: rgb(3, 77, 151);
  font-weight: bold;
}

/* Pitch section */
.pitch-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.pitch-container {
    width: 100%;
}

#pitch-viz {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#pitch-viz svg {
    width: 100%;
    height: 100%;
}

#scrolly {
    position: relative;
    padding: 1rem;
}


.sticky-figure {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#formation-section {
    height: 100vh;
    width: 100vw;
}


.formation-grid {
    display: flex;
    gap: 1em;
    justify-content: center;
    align-items:center;
    height: 80vh;
  
}

#formation-viz {
    flex: 0 0 50%;
}

.formation-explanation{
  flex: 0 0 40%;
}

.formation-explanation p {
  display: block;    
  text-align: justify;
  padding: 1em;
  color: white;
  font-size: 1em;
  line-height: 1.6;
}


#formation-viz {
    display: flex;
    justify-content: center;
    height: 65vh;
    align-items: center;
    aspect-ratio: 3 / 2;
    padding-right: 5em;
}


h2{
    font-size: 1.8rem;
    color: white;
    padding-left: 1.2rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: start;
    justify-content: start;
    text-align: left;
}

  
#pitch-viz {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 3 / 2;
    margin: 0 auto;
}

.transition-section {
    height: 100vh;
    margin-top: 7em;
    padding: 7em;
    margin-bottom: 7em;
}
  
.transition-message {
 
  display: flex;
  flex-direction: column;
  align-items: center;

}
.transition-message h1 {   
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    text-align: center;
    opacity: 0.9;
    padding-bottom: 0.5em;
    
}

.transition-message p {
    display: block;
    font-size: 1em;
    color: white;
    text-align: justify;
    padding-bottom: 1.5rem;

}


#pitch-viz svg,
#formation-viz svg {
    height: 80%;
}
  
article {
    position: relative;
    padding: 0;
    max-width: 30rem;
    margin: 0 auto;
   
}

.step {
    margin: 0 auto 80vh auto;
    padding: 1em;
    background: rgba(70, 131, 180, 0.876);
    border-radius: 20px;
}

.step p {
    text-align: justify;
    padding: 1em;
    font-size: 1em;
    color: white;
}

.step.is-active {
    transform: scale(1.02);
    transition: all 0.3s ease;
} 

.normal-scroll {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.split-screen {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 3em;
    height: 100vh;
    padding: 2em;
    align-items: center;
  }
  
  .viz-container {
    flex: 8;
    position: sticky;
    display: flex;
    justify-content: center;
    align-items: center;
    mix-blend-mode:normal;
  
  }
  
  .viz-container img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    border: 3px solid rgb(3, 77, 151);    
    border-radius: 12px;
    filter:  contrast(0.8) saturate(0.8);
  }
  

  .explanation {
    flex: 2;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    color: white;
    font-size: 1.2rem;
    line-height: 1.6;
    border-radius: 12px;
    text-align: justify;
  }
  
  .scroll-stack {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    backdrop-filter: blur(10px);
  }

  .stack-disabled .scroll-step {
    opacity: 0 !important;
    transform: translateY(40px) !important;
    transition: none !important;
  }
  
  .scroll-step {
    opacity: 0;
    transform: translateY(150px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    margin-bottom: 0.2rem;
  }

  .scroll-step.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .scroll-step.visible-false {
    opacity: 0;
    transform: translateY(40px);
  }
  
  
  .scroll-step p {
    font-size: 1.1rem;
    color: white;
    text-align: justify;
    margin-bottom: 1rem;
  }
  


.scroll-spacer {
    height: 100vh;
    color: #cd3b58;
}




#lollipop-chart-section {
    display: flex;
    width: 100%;
    height: 100vh;
    gap: 1.5em;
    box-sizing: border-box;

  }
  
.lollipop-viz-container,
.shot-explanation {
    min-width: 0;
}
  

.lollipop-viz-container {
    flex: 0 1 50%; 
}

.shot-explanation {
    flex: 0 1 40%;
    background-color: rgba(255,255,255,0.07);  
    backdrop-filter: blur(10px);
    padding: 1em;
    color: white;
    font-size: 1em;
    line-height: 1.6;
    border-radius: 12px;
    text-align: justify; 
    overflow-y: auto;    
}
  
.lollipop-viz-container svg {
    height: auto;

    
}

.shot-explanation p{
    margin-bottom: 1em;
}

#xt-section {
    display: flex;
    width: 100%;
    height: 100vh;
    gap: 1rem;
    box-sizing: border-box;
    padding: 2rem;
    align-items: center;
  }
  
  .xt-container {
    flex: 0 1 40%;        
    min-width: 0;       
    overflow: visible;
  }
  
  .xt-container svg {
    width: 100%;
    height: auto;
    overflow: visible;
  }
  
  .xt-explanation {
    flex: 0 1 45%;        
    min-width: 0;  
    padding: 1rem;
    color: white;
    line-height: 1.6;
    border-radius: 12px;
    text-align: justify;
    overflow-y: auto;
  }
  
  .xt-explanation p {
    font-size: 1em;
    margin-bottom: 1em;
  }

#messi-influence {
    display: flex;
    flex-direction: column;
    height: 100vh;             
    align-items: center;
    mix-blend-mode:luminosity;  
    margin-bottom: 50%;
    
  }
  
.messi-image {
  flex: 0 0 40vh;              
  overflow: hidden;
  border-radius:130px;
}

.messi-image img { 
  width: auto;
  height: 100%;
  object-fit:contain;          
  display: block;
  margin: auto; 
 padding-bottom: 1.5em; 
}

 
#messi-table, 
#messi-table table, 
#messi-table th, 
#messi-table td {
  mix-blend-mode: normal;
}


#messi-table table {
  border-collapse: collapse;
  margin: auto;   
  margin-top: 0.1em;    
  margin-bottom: 1em;                      
  border-style: solid solid solid solid;  
  border-width: 1.5px 1.5px 1.5px 1.5px;         
  border-color: white;
}

#messi-table th {
  background-color: rgba(3, 77, 151, 0.673);  
  color: white;                             
}

#messi-table tr {
  background-color: rgba(3, 77, 151, 0.478);  
  color: white;                             
}


#messi-table th:first-child,
#messi-table td:first-child {
  border-right: 1.5px solid white;
}




.messi-explanation {
  flex: 1 1 60vh;
  padding: 1rem;
  backdrop-filter: blur(10px);
  border-radius: 8px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 75vw;
}


.messi-explanation p {
  font-size: 1em;
  color: white;
  text-align: justify;
  margin-bottom: 1em;
}

.tooltip {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 999;
  max-width: 250px;            
  white-space: normal;         
  background: white;
  color: black;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  font-size: 0.7em;
  
}

#igm-section.split-screen {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
    position: relative;
    height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
  }
  
  #igm-section .viz-container {
    flex: 7;                    
    position: relative;         
    overflow: visible;          
    padding: 2rem 30px 40px 40px;
    box-sizing: border-box;
 
  }
  
  #igm-section .viz-container svg {
    width: 100%;
    height: 100%;
    display: block;
    box-sizing: border-box;
    overflow: visible;
  }
  
  #opponent-select {
    position: absolute;        
    top: 1rem;                 
    left: 1rem;                
    z-index: 10;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.3em 0.6em;
    font-size: 1rem;
  }

 .igm-explanation {
    flex: 3;    
    height:fit-content;              
    padding: 2rem;
    background-color: rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    
  }

  .igm-explanation p{
    padding-bottom: 1em;
    color: white;
    font-size: 1em;
    text-align: justify;
  }

  #line-chart svg {
    padding-top: 0em; 
  }
  

.team-button {
  padding: 0.4em 0.8em;
  font-size: 0.8em;
  border: none;
  border-radius: 4px;
  background: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background 0.2s;
}
  
.team-button:hover {
  background: rgba(255,255,255,1);
}

.team-button.active {
  background: steelblue;
  color: white;
}

#team-legend {
  font-size: 0.7em;
  color: black;
}


#logo-section .logo-step {
    height:100vh;
  }
  
#logo-section.scrolly {
  position: relative;
}

#logo-dot-viz {
  width: 100%;
  height: 100%;
  shape-rendering:crispEdges;
}

.credit-section {
  padding: 0.5rem 1rem;
  text-align: center;
}
.credit-section .image-credit {
  font-size: 0.8rem;
  color: #666;
}

  