:root {
  --negro-carbon: #0A0A0A;
  --blanco-puro: #FFFFFF;
  --dorado-suave: #D4AF37;
  --gris-grafito: #3A3A3A;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Configuración para Scroll Fluido (Lenis) */
html.lenis { height: auto; } 
.lenis.lenis-smooth { scroll-behavior: auto; }

body { 
  background: var(--negro-carbon); 
  color: var(--blanco-puro); 
  font-family: 'Montserrat', sans-serif; 
  overflow-x: hidden;
}

/* --- SCROLLBAR PERSONALIZADO --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--negro-carbon); }
::-webkit-scrollbar-thumb { 
  background: #333; 
  border-radius: 4px; 
  border: 1px solid var(--negro-carbon);
}
::-webkit-scrollbar-thumb:hover { background: var(--dorado-suave); }

/* --- PRELOADER --- */
#preloader { 
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
  background: var(--negro-carbon); z-index: 9999; 
  display: flex; justify-content: center; align-items: center; 
  transition: all 0.5s ease; 
}
#preloader.hide { opacity: 0; visibility: hidden; }
.spinner { 
  width: 50px; height: 50px; 
  border: 3px solid rgba(212, 175, 55, 0.3); 
  border-radius: 50%; 
  border-top-color: var(--dorado-suave); 
  animation: spin 1s linear infinite; 
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- HEADER --- */
header { 
  display: flex; justify-content: space-between; align-items: center; 
  padding: 18px 5%; 
  background: rgba(10, 10, 10, 0.90); 
  backdrop-filter: blur(12px); 
  position: sticky; top: 0; z-index: 100; 
  border-bottom: 1px solid rgba(212, 175, 55, 0.1); 
  transition: all 0.3s ease;
}

.brand { display:flex; align-items:center; gap:14px; text-decoration:none; color:inherit; }
.logo img { display:block; height: 50px; width: auto; transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
.brand:hover .logo img { transform: scale(1.1) rotate(5deg); }

.wordmark { font-family: 'Playfair Display', serif; font-weight:700; font-size:24px; letter-spacing:1px; color:var(--blanco-puro); text-transform:uppercase; }
.tagline { font-family: 'Montserrat', sans-serif; font-size:10px; color:var(--dorado-suave); letter-spacing:1.5px; margin-top:2px; text-transform: uppercase; font-weight: 600; }

/* --- NAV --- */
nav { display: flex; gap: 24px; align-items:center; }
nav a { color: #ccc; text-decoration: none; transition: 0.3s; font-weight:500; font-size:13px; letter-spacing: 0.5px; position: relative; }
nav a:hover { color: var(--dorado-suave); }
nav a::after { content: ''; position: absolute; width: 0; height: 1px; bottom: -4px; left: 0; background-color: var(--dorado-suave); transition: width 0.3s; }
nav a:hover::after { width: 100%; }

.menu-btn { display: none; cursor: pointer; font-size: 26px; color:var(--dorado-suave); background:transparent; border:none; }
.mobile-menu { display: none; flex-direction: column; background: var(--negro-carbon); padding: 20px; gap: 15px; border-bottom: 1px solid var(--gris-grafito); position: absolute; top: 100%; left: 0; width: 100%; z-index: 99;}
.mobile-menu a { color: #ddd; text-decoration: none; padding:10px; border-bottom: 1px solid #222; }

/* --- HERO --- */
.hero { padding: 140px 5%; background: radial-gradient(circle at top right, #1a1a1a, var(--negro-carbon) 60%); min-height: 85vh; display: flex; flex-direction: column; justify-content: center; }
.hero h1 { font-size: clamp(40px, 5vw, 64px); font-weight: 900; font-family: 'Playfair Display', serif; color:var(--blanco-puro); line-height: 1.1; margin-bottom: 20px; }
.hero h1 span { color: var(--dorado-suave); }
.hero p { max-width: 650px; color: #ccc; font-size: 18px; line-height:1.6; font-weight: 300; margin-bottom: 30px; }

.btn { display: inline-block; padding: 16px 36px; background: var(--dorado-suave); color: var(--negro-carbon); border-radius: 4px; font-weight: 700; text-decoration: none; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2); }
.btn:hover { background: #C99F2E; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4); }

/* --- TECH STACK --- */
.tech-stack { padding: 30px 0; background: #080808; border-top: 1px solid #151515; border-bottom: 1px solid #151515; overflow: hidden; width: 100%; }
.slider { width: 100%; overflow: hidden; position: relative; }
.slide-track { display: flex; width: calc(200px * 14); animation: scroll 30s linear infinite; }
.slide { width: 200px; font-family: 'Playfair Display', serif; font-size: 20px; color: #444; font-weight: bold; display: flex; align-items: center; justify-content: center; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-200px * 7)); } }

/* --- SECCIONES GENERALES --- */
/* Aumentado el padding vertical de 60px a 100px para mayor espacio entre secciones */
section { padding: 100px 15%; } 

/* Aumentado el margen inferior de los h2 de 50px a 80px para separar el título de las tarjetas */
h2 { 
  font-size: clamp(24px, 4vw, 32px); 
  margin-bottom: 80px; 
  font-family: 'Playfair Display', serif; 
  color: var(--blanco-puro); 
  text-align: center; 
  letter-spacing: 2px; 
  text-transform: uppercase; 
  line-height: 1.2; 
}

/* =========================================
   SECCIÓN: ¿CÓMO TRABAJAMOS? (PROCESO)
   ========================================= */
.process-container { display: flex; flex-wrap: wrap; gap: 20px; }
.step-card { 
  flex: 1; min-width: 250px; background: #121212; padding: 40px 30px; 
  border-radius: 4px; border: 1px solid #222; position: relative; 
  transition: transform 0.4s ease; overflow: hidden; 
}
.step-card:hover { transform: translateY(-5px); border-color: var(--dorado-suave); }

/* Número como marca de agua sutil */
.step-number { 
  font-size: 110px; color: rgba(212, 175, 55, 0.05); font-weight: 900; 
  position: absolute; top: -15px; right: -10px; z-index: 1; pointer-events: none; 
}

/* Título corregido (de h4 a h3 según HTML) */
.step-card h3 { 
  color: var(--dorado-suave); margin-bottom: 15px; font-family: 'Playfair Display', serif; 
  font-size: 1.25rem; text-transform: uppercase; position: relative; z-index: 2; letter-spacing: 1px; 
}
.step-card p { color: #888; font-size: 14px; line-height: 1.7; position: relative; z-index: 2; }

/* --- SERVICES --- */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.card { padding: 40px 35px; background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); border-radius: 4px; border: 1px solid var(--gris-grafito); transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); cursor: pointer; }
.card-icon svg { width: 42px; height: 42px; fill: var(--dorado-suave); margin-bottom: 25px;}
.card h3 { font-family: 'Playfair Display', serif; margin-bottom: 15px; color: var(--blanco-puro); font-size: 1.15rem; letter-spacing: 0.5px; text-transform: uppercase; }
.card p { color:#aaa; font-size:14px; line-height:1.7; }
.card:hover { border-color: var(--dorado-suave); transform: translateY(-10px); background: rgba(255, 255, 255, 0.05); box-shadow: 0 15px 35px -10px rgba(0,0,0,0.6); }

/* =========================================
   THE SELECTION (MÁS COMPACTO)
   ========================================= */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
  gap: 30px; max-width: 950px; margin: 0 auto;
}

.selection-card { text-decoration: none; display: block; position: relative; }
.selection-img-container { position: relative; overflow: hidden; border-radius: 4px; border: 1px solid #222; aspect-ratio: 4/5; background: #111; }
.selection-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s ease, filter 0.3s ease; filter: grayscale(20%); }
.selection-card:hover .selection-img { transform: scale(1.05); filter: grayscale(0%); }

.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.4s ease; }
.selection-card:hover .overlay { opacity: 1; }
.btn-ver-menu { color: var(--dorado-suave); border: 1px solid var(--dorado-suave); padding: 10px 20px; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; background: rgba(10, 10, 10, 0.85); backdrop-filter: blur(4px); font-weight: 600; }

.selection-info { margin-top: 20px; text-align: center; }
.selection-info h3 { color: #fff; font-family: 'Playfair Display', serif; font-size: 16px; letter-spacing: 0.5px; margin-bottom: 8px; text-transform: uppercase; }
.selection-info p { color: #666; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }

/* --- FAQ --- */
.faq-item { border-bottom: 1px solid #222; margin-bottom: 10px; }
.faq-question { width: 100%; background: transparent; border: none; padding: 25px 0; text-align: left; font-size: 16px; color: var(--blanco-puro); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; font-family: 'Montserrat', sans-serif; text-transform: uppercase; letter-spacing: 0.5px; }
.faq-question:hover { color: var(--dorado-suave); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-answer p { color: #999; padding-bottom: 25px; line-height: 1.7; font-size: 14px; }
.arrow { font-size: 12px; transition: 0.3s; }
.faq-item.active .arrow { transform: rotate(180deg); color: var(--dorado-suave); }

/* --- CONTACTO --- */
.contact-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; margin-top: 50px; }
.contact-card { background: #111; border: 1px solid #333; padding: 45px 30px; border-radius: 8px; width: 100%; max-width: 280px; transition: transform 0.3s, border-color 0.3s; display: flex; flex-direction: column; align-items: center; }
.contact-card:hover { transform: translateY(-5px); }
.contact-icon { font-size: 40px; margin-bottom: 20px; }
.contact-card h3 { color: white; font-family: 'Playfair Display', serif; margin-bottom: 12px; font-size: 18px; }
.contact-card p { color: #999; font-size: 13px; line-height: 1.7; margin-bottom: 30px; text-align: center; }
.btn-card { width: 100%; border: none; border-radius: 4px; padding: 13px; font-weight: 700; font-size: 12px; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; text-align: center; transition: all 0.3s ease; cursor: pointer; }

.card-whatsapp:hover { border-color: #25D366; }
.btn-whatsapp { background: #25D366; color: white; }
.card-email:hover { border-color: #fff; }
.btn-email { background: transparent; border: 1px solid #666; color: white; }
.card-instagram:hover { border-color: #E1306C; }
.btn-instagram { background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); color: white; }
.card-facebook:hover { border-color: #1877F2; }
.btn-facebook { background: #1877F2; color: white; }

/* --- FOOTER & MISC --- */
footer { padding: 60px 5%; background: var(--negro-carbon); border-top: 1px solid var(--gris-grafito); text-align: center; }
footer p { color:#666; font-size: 12px; letter-spacing: 1px; margin-bottom: 25px;}

.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background-color: #25D366; border-radius: 50px; display: flex; justify-content: center; align-items: center; box-shadow: 0px 4px 15px rgba(0,0,0,0.5); z-index: 1000; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }

.reveal { opacity: 0; transform: translateY(60px) scale(0.98); transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform, opacity; }
.reveal.active { opacity: 1; transform: translateY(0) scale(1); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* --- RESPONSIVE --- */
@media(max-width: 768px) {
  section { padding: 80px 8%; } /* Padding ligeramente menor en móvil */
  h2 { margin-bottom: 60px; }
  .menu-btn { display: block; }
  nav { display: none; }
  .hero h1 { font-size: 38px; }
  .step-number { font-size: 80px; }
  .step-card h3 { font-size: 1.15rem; }
  .selection-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
  .overlay { opacity: 1; background: rgba(0,0,0,0.2); align-items: flex-end; padding-bottom: 15px; }
  .btn-ver-menu { padding: 8px 16px; font-size: 9px; }
}
/* =========================================
   ESTILOS DEL MODAL
   ========================================= */
.modal-container { 
  display: none; 
  position: fixed; 
  z-index: 1100; /* Asegura que esté por encima de todo */
  left: 0; 
  top: 0; 
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.85); 
  backdrop-filter: blur(8px); /* Efecto de desenfoque de fondo */
  justify-content: center; 
  align-items: center; 
  opacity: 0; 
  transition: opacity 0.4s ease; 
}

/* Clase que se añade con JS para mostrarlo */
.modal-container.show { 
  display: flex; 
  opacity: 1; 
}

.modal-content { 
  background: #0A0A0A; /* Fondo negro carbón */
  border: 1px solid #D4AF37; /* Borde dorado suave */
  padding: 50px 30px; 
  border-radius: 4px; 
  width: 90%; 
  max-width: 500px; 
  position: relative; 
  text-align: center; 
  transform: scale(0.8); 
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.modal-container.show .modal-content { 
  transform: scale(1); 
}

.close-modal { 
  position: absolute; 
  top: 15px; 
  right: 20px; 
  color: #666; 
  font-size: 32px; 
  cursor: pointer; 
  transition: color 0.3s;
}

.close-modal:hover { 
  color: #D4AF37; 
}

#modal-title { 
  color: #D4AF37; 
  font-family: 'Playfair Display', serif; 
  font-size: 26px; 
  margin-bottom: 15px; 
  text-transform: uppercase; 
  letter-spacing: 1px;
}

#modal-desc { 
  color: #bbb; 
  margin-bottom: 35px; 
  line-height: 1.7; 
  font-size: 15px; 
  font-weight: 300;
}

.btn-modal { 
  display: inline-block; 
  padding: 14px 28px; 
  background: #D4AF37; 
  color: #0A0A0A; 
  border-radius: 4px; 
  text-decoration: none; 
  font-weight: 700; 
  font-size: 12px;
  text-transform: uppercase; 
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.btn-modal:hover { 
  background: #C99F2E; 
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

/* Ajuste para móviles */
@media(max-width: 768px) {
  .modal-content { 
    padding: 40px 20px; 
    width: 95%; 
  }
}

/* --- HERO REFINADO --- */
.hero h1 { 
  font-size: clamp(32px, 4.5vw, 54px); /* Reducido de 64px a 54px */
  font-weight: 800; /* Menos pesado que 900 */
  font-family: 'Playfair Display', serif; 
  color: var(--blanco-puro); 
  line-height: 1.15; 
  margin-bottom: 25px;
  letter-spacing: -0.5px; /* Letras un poco más juntas para estilo moderno */
}

.hero p {
  font-size: 16px; /* Texto más pequeño es más elegante */
  max-width: 580px;
  color: #999; /* Gris más suave para resaltar el título */
  line-height: 1.8;
  font-weight: 400;
}
/* --- TECH STACK (SLIDER) --- */
.tech-stack { 
  padding: 40px 0; 
  background: #080808; 
  border-top: 1px solid #151515; 
  border-bottom: 1px solid #151515; 
  overflow: hidden; 
}

.slide-track { 
  display: flex; 
  width: calc(250px * 14); 
  animation: scroll 45s linear infinite; /* Animación más lenta para elegancia */
}

.slide { 
  width: 250px; 
  font-family: 'Montserrat', sans-serif; /* Montserrat es más limpia para esto */
  font-size: 13px; 
  color: #333; /* Color muy tenue */
  font-weight: 600; 
  letter-spacing: 3px;
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

@keyframes scroll { 
  0% { transform: translateX(0); } 
  100% { transform: translateX(calc(-250px * 7)); } 
}
/* --- CONTACT GRID REFINADO --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Columnas más estrechas */
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-card {
  background: #111;
  border: 1px solid #222;
  padding: 45px 25px;
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  text-align: center;
}

.contact-icon { 
  font-size: 32px; /* Iconos más pequeños */
  margin-bottom: 20px; 
  opacity: 0.8;
}

.contact-card h3 { 
  font-size: 16px; /* Título más pequeño y elegante */
  font-family: 'Playfair Display', serif;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.contact-card p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
}

.btn-card {
  font-size: 11px;
  padding: 10px 20px;
  letter-spacing: 1px;
  font-weight: 600;
}
/* --- FAQ MINIMALISTA --- */
#faq { max-width: 800px; margin: 0 auto; padding-top: 50px; }

.faq-item { border-bottom: 1px solid #1a1a1a; }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 30px 0;
  color: #fff;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.faq-question:hover { color: var(--dorado-suave); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.faq-item.active .faq-answer { max-height: 1000px; transition: max-height 1s ease-in-out; }

.faq-answer p {
  color: #777;
  padding-bottom: 30px;
  line-height: 1.8;
  font-size: 14px;
}
/* OPTIMIZACIÓN MÓVIL */
@media (max-width: 768px) {
  /* Desactivar desenfoque costoso en móviles */
  header, .card, .modal-container {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  /* Usar fondos sólidos o con transparencia simple como alternativa */
  header {
    background: rgba(10, 10, 10, 0.98) !important; /* Casi sólido */
  }
  
  .card {
    background: #111 !important; /* Fondo sólido en lugar de vidrio */
    box-shadow: none !important; /* Quitar sombras pesadas */
    border: 1px solid #333;
  }

  /* Opcional: Pausar animaciones que no están en pantalla o simplificarlas */
  .slide-track {
    will-change: transform; /* Ayuda un poco al navegador */
  }
}