@import url('./variables.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- HEADER --- */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
}

.logo {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 0.6;
}

/* --- SECCIÓN 1: HERO INTRO --- */
.hero-intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 60px;
  padding: 60px 0 100px 0;
}

.intro-text h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 24px;
  font-family: var(--font-serif);
}

.links-inline {
  display: flex;
  gap: 16px;
}

.links-inline a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid var(--text-main);
  padding-bottom: 2px;
}

.intro-visual {
  display: flex;
  justify-content: center;
}

/* --- GRID DE PREMIOS --- */
.awards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.award-item h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.award-item p {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- SECCIÓN 2: N26 (OSCURA) --- */
.project-section.n26-section {
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  padding: 120px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  margin-top: 60px;
}

.n26-section .section-title {
  font-size: 40px;
  font-weight: 400;
  font-family: var(--font-serif);
  line-height: 1.2;
  margin: 16px 0;
}

.n26-section .stars {
  color: #fbbf24;
  font-size: 12px;
  display: block;
  margin-bottom: 20px;
}

.n26-section .text-lead {
  color: #a1a1aa;
  font-size: 15px;
  margin-bottom: 30px;
}

.n26-section .cta-link {
  color: var(--text-inverse);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid var(--text-inverse);
  padding-bottom: 2px;
}

.project-visual {
  display: flex;
  justify-content: center;
}

/* --- SECCIÓN 3: WORLDPACKERS (CLARA) --- */
.project-section.wp-section {
  background-color: var(--bg-primary);
  color: var(--text-main);
  padding: 120px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.wp-section .section-title {
  font-size: 40px;
  font-weight: 400;
  font-family: var(--font-serif);
  line-height: 1.2;
  margin: 16px 0;
}

.wp-section .stars {
  color: #fbbf24;
  font-size: 12px;
  display: block;
  margin-bottom: 20px;
}

.wp-section .text-lead {
  color: var(--text-muted);
  font-size: 15px;
}

/* Responsive básico para pantallas pequeñas */
@media (max-width: 900px) {
  .hero-intro, .awards-grid, .n26-section, .wp-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .awards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- FOOTER EMPRESARIAL OSCURO (CORNER TO CORNER) --- */
.site-footer {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background-color: var(--bg-dark);
  color: var(--text-inverse);
  padding: 80px 0;
  border-top: 1px solid var(--border-dark);
  margin-top: 100px; /* Separación de la sección anterior */
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-info h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.footer-info p {
  color: #a1a1aa;
  font-size: 14px;
}

.footer-socials {
  display: flex;
  gap: 24px;
}

.footer-socials a {
  color: var(--text-inverse);
  font-size: 16px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-socials a:hover {
  opacity: 0.6;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --- Estilos Profesionales para Tarjetas de Especialización (About) --- */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.spec-card {
  background: #ffffff;
  padding: 45px;
  border: 1px solid #e5e7eb;
  border-radius: 0px; /* Cero bordes redondeados, aspecto cuadrado y corporativo */
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.spec-card:hover {
  border-color: #111111;
}

.spec-title {
  font-size: 20px;
  font-family: var(--font-sans);
  color: #111111;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e5e7eb; /* Línea divisoria elegante debajo del título */
  font-weight: 600;
}

.spec-desc {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.7;
}

/* --- Estilos para la sección de Cierre / CTA --- */
.cta-banner-section {
  padding: 80px 40px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.cta-banner-container {
  max-width: 800px;
  margin: 0 auto;
}

.cta-banner-title {
  font-size: 32px;
  font-family: var(--font-serif);
  color: #0e0d0d;
  margin-bottom: 20px;
  font-weight: 400;
}

.cta-banner-text {
  font-size: 16px;
  color: #232324;
  line-height: 1.6;
  margin-bottom: 30px;
}

.cta-banner-btn {
  display: inline-block;
  background: #000000;       /* Fondo negro como en tu imagen */
  color: #ffffff;            /* Texto blanco */
  padding: 16px 40px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #000000; /* Borde negro para la transición */
  border-radius: 0px;        /* Bordes rectos y minimalistas */
  
  /* Aquí está la magia del "smooth": cubic-bezier le da ese toque natural */
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-banner-btn:hover {
  background: #ffffff;       /* El fondo se vuelve blanco */
  color: #000000;            /* El texto se vuelve negro */
  border-color: #ffffff;
  
  /* Se eleva un poco hacia arriba */
  transform: translateY(-5px); 
  
  /* Proyecta una sombra difuminada para dar efecto de profundidad */
  box-shadow: 0 12px 24px rgba(255, 255, 255, 0.15); 
}

.cta-banner-btn:active {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(255, 255, 255, 0.1);
}

/* Footer limpio y pegado al bloque anterior */
.site-footer {
  background-color: #111111;
  color: #ffffff;
  padding: 60px 0;
  border-top: 1px solid #222222;
  position: relative;
  width: 100%;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

/* --- ANIMACIONES DINÁMICAS Y SMOOTH --- */

/* 1. Animación dinámica y divertida para el título principal */
@keyframes titleReveal {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.hero-intro h1 {
  display: inline-block;
  animation: titleReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 2. Animación Smooth para el resto de elementos al cargar */
@keyframes smoothFadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-intro .intro-visual,
.hero-intro .links-inline,
.awards-grid,
.project-section {
  animation: smoothFadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.3s;
}

.project-section {
  animation-timeline: view();
  animation-range: entry 0% cover 30%;
}

/* Transición suave general para enlaces y elementos interactivos */
a, button, .award-item, .spec-card {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-header .logo a {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.main-header .logo a:hover {
  transform: scale(1.05) translateY(-2px);
  color: #888888; /* Puedes cambiar este gris por el color de acento de la marca */
}

/* --- Animaciones al hacer Scroll --- */

/* Elementos que suben suavemente */
.scroll-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Elementos que entran desde la derecha (ideal para imágenes) */
.scroll-slide-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Clase que el JavaScript agregará para activar la animación */
.scroll-fade-up.is-visible,
.scroll-slide-right.is-visible {
  opacity: 1;
  transform: translate(0, 0);
}

/* Retrasos escalonados para elementos en grupo (como las tarjetas) */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* --- MEDIA QUERIES RESPONSIVE PARA TODO EL SITIO --- */

/* Pantallas medianas (Tablets y Laptops pequeñas / 992px hacia abajo) */
@media screen and (max-width: 992px) {
  .hero-intro h1, 
  .intro-text h1 {
    font-size: 36px !important;
  }
  
  .specs-grid {
    grid-template-columns: 1fr !important; /* Las tarjetas se ponen una debajo de otra */
  }
}

/* Pantallas pequeñas (Celulares / 768px hacia abajo) */
@media screen and (max-width: 768px) {
  
  /* 1. Header y Navegación adaptable */
  .main-header {
    flex-direction: column;
    gap: 20px;
    padding: 20px !important;
    text-align: center;
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 0;
  }

  /* 2. Títulos principales adaptados para que no se desborden */
  .hero-intro h1, 
  .intro-text h1 {
    font-size: 28px !important;
    line-height: 1.25 !important;
  }

  /* 3. Secciones generales y grids de servicios */
  section, .project-section {
    padding: 50px 20px !important;
  }

  /* Desactiva los grids complejos de servicios y los vuelve columna simple */
  div[style*="grid-template-columns: 1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  /* 4. Formularios y tarjetas de contacto */
  .specs-grid, 
  div[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  /* 5. Footer adaptado a una sola columna centrada */
  .footer-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
    padding: 0 20px !important;
  }
}