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

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

body {
  font-family: 'Montserrat', sans-serif;
  color: #ffffff;
  background-color: #000000;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* Opening frame with video */
.opening-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Video background */
.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.video-background video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

/* Centered logo */
.centered-logo {
  text-align: center;
  margin-bottom: 2rem;
  z-index: 2;
}

.centered-logo img {
  height: 140px; /* Slightly larger for better centering */
  width: auto;
}

/* Opening content */
.opening-content {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  margin-top: 3rem;
}

.vertical-line {
  width: 4px;
  height: 8rem;
  background-color: #ffffff;
  margin-right: 2rem;
}

.main-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
}

.scroll-indicator span {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-arrow {
  width: 2px;
  height: 30px;
  background-color: #ffffff;
  position: relative;
  animation: scrollDown 2s infinite;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(45deg);
}

@keyframes scrollDown {
  0%, 100% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(10px);
  }
}

/* Main content */
.main-content {
  position: relative;
  z-index: 1;
  background-color: #000000;
}

/* Content sections */
.content-section {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #ffffff;
}

.section-content {
  max-width: 800px;
}

.statement-text {
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 300;
  margin-bottom: 2rem;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 2rem;
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.pillar {
  position: relative;
  padding: 2rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 2px solid #ffffff;
}

.pillar-number {
  position: absolute;
  top: -10px;
  left: 15px;
  background-color: #000000;
  padding: 0 10px;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Animated image section breaks */
.image-break {
  width: 100%;
  height: 50vh;
  overflow: hidden;
  position: relative;
}

.parallax-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.parallax-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1);
  transition: transform 0.5s ease;
}

/* Different animation types for each image break */
.parallax-image img {
  animation: parallaxEffect 15s infinite alternate ease-in-out;
}

.reveal-image {
  position: relative;
}

.reveal-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  transform: translateX(-100%);
  animation: revealImage 1.5s forwards ease-out;
  z-index: 2;
}

.zoom-image img {
  animation: zoomEffect 20s infinite alternate ease-in-out;
}

@keyframes parallaxEffect {
  0% {
      transform: translateY(0) scale(1.1);
  }
  100% {
      transform: translateY(-30px) scale(1.1);
  }
}

@keyframes revealImage {
  0% {
      transform: translateX(0);
  }
  100% {
      transform: translateX(100%);
  }
}

@keyframes zoomEffect {
  0% {
      transform: scale(1);
  }
  100% {
      transform: scale(1.2);
  }
}

/* Intersection Observer Animation Trigger */
.image-break.in-view img {
  transform: scale(1);
}

/* Proyectos frame at the end */
.proyectos-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.proyectos-content {
  position: relative;
  z-index: 5;
}

.proyectos-link {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.5rem 4rem;
  border: 2px solid #ffffff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.proyectos-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: skewX(-30deg);
  transition: all 0.5s ease;
}

.proyectos-link:hover {
  background-color: #ffffff;
  color: #000000;
}

.proyectos-link:hover::before {
  left: 100%;
}

/* Footer */
.site-footer {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 0;
}

.footer-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-tagline {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.footer-copyright {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Responsive design */
@media (max-width: 768px) {
  .centered-logo img {
      height: 100px;
  }
  
  .vertical-line {
      height: 6rem;
      width: 3px;
      margin-right: 1.5rem;
  }
  
  .main-title {
      font-size: 2rem;
  }
  
  .pillars {
      grid-template-columns: 1fr;
  }
  
  .section-title {
      font-size: 2rem;
  }
  
  .image-break {
      height: 40vh;
  }
  
  .proyectos-link {
      font-size: 1.2rem;
      padding: 1.2rem 3rem;
  }
  
  .footer-content {
      flex-direction: column;
      gap: 1rem;
      align-items: flex-start;
  }
}

/* JavaScript to trigger animation when in view */
document.addEventListener('DOMContentLoaded', function() {
  const observer = new IntersectionObserver((entries) => {
      entries.forEach(entry => {
          if (entry.isIntersecting) {
              entry.target.classList.add('in-view');
          }
      });
  }, {threshold: 0.1});

  document.querySelectorAll('.image-break').forEach(image => {
      observer.observe(image);
  });
});