:root {
  --blue: #0046F1;
  --black: #050505;
  --ivory: #FBF7EF;
  --white: #FFFFFF;
  --transition: 0.4s ease;
}

/* FIX: El asterisco es obligatorio aquí */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html { scroll-behavior: smooth; }

body { 
  font-family: 'Inter', sans-serif; 
  background: var(--ivory); 
  color: var(--black); 
  font-weight: 200; 
  overflow-x: hidden; 
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }

section { padding: 100px 0; }

/* --- HEADER --- */
.topbar {
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 30px 0;
  background: transparent;
  transition: var(--transition);
}

.topbar.scrolled {
  padding: 15px 0;
  background: rgba(251, 247, 239, 0.9);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  height: 40px !important;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

/* Estilo para los botones de navegación */
.nav-link {
  text-decoration: none;
  color: var(--white);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.scrolled .nav-link {
  color: var(--black);
}

.nav-link:hover {
  color: var(--blue);
}

/* BOTÓN CONTACTO AZUL */
.btn-cta-nav.azul {
  background-color: var(--blue) !important;
  color: var(--white) !important;
  padding: 10px 22px;
  border-radius: 2px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  text-decoration: none;
}

/* --- HERO (CARRUSEL) - OPTIMIZADO PARA LEGIBILIDAD --- */
/* --- HERO (CARRUSEL) - SOLUCIONES DE LEGIBILIDAD --- */
.hero { 
  position: relative; 
  height: 100vh; 
  background: black; 
  overflow: hidden;
}

.hero-slide {
  position: absolute; 
  inset: 0; 
  opacity: 0;
  background-size: cover; 
  background-position: center;
  transition: opacity 1.5s ease-in-out;
  display: flex; 
  align-items: center;
  z-index: 1;
}

.hero-slide.is-active { 
  opacity: 1; 
  z-index: 2;
}

.hero-overlay { 
  position: absolute; 
  inset: 0; 
  /* Gradiente más agresivo a la izquierda para proteger el texto */
  background: linear-gradient(90deg, 
    rgba(5, 5, 5, 0.85) 0%, 
    rgba(5, 5, 5, 0.5) 40%, 
    transparent 100%); 
  z-index: 3;
}

.hero-content { 
  position: relative; 
  color: white; 
  z-index: 10; 
  width: 100%;
  padding-left: 5%; /* Pequeño ajuste para que el texto no toque el borde */
}

.hero-kicker {
  display: inline-block;
  padding: 8px 16px;
  /* Fondo oscuro semi-transparente con desenfoque (Glassmorphism) */
  background: rgba(0, 0, 0, 0.3); 
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 3px solid var(--blue);
  border-radius: 2px;
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 30px !important;
}

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(40px, 6.5vw, 75px);
  font-weight: 200;
  line-height: 1.1;
  color: var(--white);
  /* Sombra sutil para despegar las letras del fondo */
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-description {
  font-size: 18px;
  line-height: 1.8;
  margin-top: 30px;
  max-width: 600px;
  font-weight: 300;
  /* Cambio a Ivory para suavizar la lectura */
  color: var(--ivory); 
  opacity: 0.95;
  letter-spacing: 0.3px;
  /* Sombra difusa para legibilidad */
  text-shadow: 0 5px 15px rgba(0,0,0,0.6);
}

.text-accent { 
  color: var(--blue); 
  font-weight: 600; 
}

.dot {
  width: 35px;
  height: 2px;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.dot.is-active {
  background: var(--blue);
  width: 50px;
}

/* --- CARDS SERVICIOS --- */
.cards-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 30px; 
  margin-top: 50px; 
}

.card-service { 
  background: white; 
  padding: 50px 30px; 
  border: 1px solid #eee; 
  text-align: left; 
}

.card-num { 
  color: var(--blue); 
  font-weight: 600; 
  font-size: 12px; 
  display: block; 
  margin-bottom: 15px; 
}

/* --- FOOTER --- */
.footer { 
  background: black; 
  color: white; 
  padding: 40px 0; 
}

.footer-logo { 
  height: 25px; 
  filter: brightness(0) invert(1); 
}

/* --- SECCIÓN WELCOME: DISEÑO EDITORIAL --- */
.welcome {
    background-color: #FFFFFF;
    padding: 120px 0;
}

.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.welcome-header {
    position: sticky;
    top: 150px;
}

.kicker-light {
    display: block;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 12px;
    color: var(--blue);
    margin-bottom: 20px;
    font-weight: 600;
}

.section-title-large {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.2;
    font-weight: 200;
    color: var(--black);
}

.text-italic {
    font-style: italic;
}

.lead-text {
    font-size: 24px;
    line-height: 1.5;
    margin-bottom: 40px;
    color: var(--black);
    font-weight: 300;
}

.welcome-description p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #444; /* Un tono un poco más suave para lectura larga */
}

/* Responsivo para móviles */
@media (max-width: 992px) {
    .welcome-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .welcome-header {
        position: static;
    }
}

/* --- SECCIÓN SERVICIOS: MINIMALISMO PREMIUM --- */
.services {
    background-color: #F7F7F7; 
    padding: 140px 0; 
    border-top: 1px solid #EEEEEE;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 40px;
}

.service-card {
    background: var(--white); 
    padding: 60px 45px;
    border: 1px solid #EDEDED;
    aspect-ratio: 1 / 1.1; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.05);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-num {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 30px;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.service-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    margin-bottom: 20px;
    font-weight: 300;
    line-height: 1.2;
    color: var(--black);
    letter-spacing: -0.5px;
}

.service-desc {
    font-size: 15px;
    line-height: 1.8;
    color: var(--taupe);
    font-weight: 300;
    margin-bottom: 40px;
}

/* --- BOTÓN DE SERVICIO --- */
.service-footer {
    margin-top: auto;
}

.btn-service {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: transparent;
    color: var(--black);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition);
    border: none;
}

.btn-service::after {
    content: "→";
    margin-left: 10px;
    font-size: 16px;
    transition: var(--transition);
}

.btn-service:hover {
    color: var(--blue);
    transform: translateX(8px);
}

/* Responsivo */
@media (max-width: 1024px) {
    .services-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .services { padding: 80px 0; }
    .services-grid { grid-template-columns: 1fr; }
    .service-card { aspect-ratio: auto; padding: 50px 35px; }
}


/* --- SECCIÓN PROYECTOS: GALERÍA DE VISIÓN --- */
.projects {
    background-color: var(--black); /* Fondo negro para que las fotos brillen */
    padding: 140px 0;
    color: var(--white);
}

.projects-header {
    margin-bottom: 80px;
    max-width: 700px;
}

.section-subtitle {
    margin-top: 20px;
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255,255,255,0.6);
    font-weight: 300;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.project-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5; /* Formato vertical tipo revista */
}

.project-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.project-item:hover .project-img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-cat {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--blue);
    margin-bottom: 10px;
}

.project-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 300;
    color: var(--white);
}

/* --- SECCIÓN CONTACTO: MINIMALISTA --- */
.contact {
    background-color: var(--ivory);
    padding: 150px 0;
    text-align: center;
}

.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 200;
    color: var(--black);
    margin-bottom: 30px;
}

.contact-lead {
    font-size: 18px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 50px;
    font-weight: 300;
}

.contact-email {
    font-family: 'Inter', sans-serif;
    font-size: clamp(20px, 3vw, 32px);
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.contact-email:hover {
    letter-spacing: 1px;
    opacity: 0.8;
}

.contact-line {
    width: 60px;
    height: 3px;
    background-color: var(--blue);
    margin: 30px auto 0;
}

/* --- FOOTER ESTILO BDS ADAPTADO --- */
.footer {
    background-color: #050505;
    padding: 80px 0 40px;
    color: var(--white);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 40px;
}

.footer-logo {
    height: 40px !important;
    width: auto !important;
    display: block;
    margin-bottom: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    /* FIX: Reseteamos cualquier propiedad de círculo o fondo que pueda heredar */
    background: transparent !important;
    border-radius: 0 !important;
    filter: none !important;
    border: none !important;
}

.footer-tagline {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
}

.footer-nav {
    display: flex;
    gap: 30px;
}

.footer-nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: var(--transition);
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--blue);
}

/* Iconos Sociales Circulares */
.footer-socials {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08); 
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition);
}

.social-icon.whatsapp:hover {
    background-color: #25D366 !important; 
    transform: translateY(-3px);
}

.social-icon:hover {
    background: var(--blue);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    opacity: 0.4;
    margin-top: 20px;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: var(--white);
    text-decoration: none;
}

/* Responsivo */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    .footer-nav {
        flex-direction: column;
        gap: 20px;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

.legal-page {
    background: var(--white);
    padding: 150px 0;
    min-height: 100vh;
    color: var(--black);
}

.btn-back {
    display: inline-block;
    margin-bottom: 40px;
    text-decoration: none;
    color: var(--blue);
    font-weight: 600;
    font-size: 14px;
}

.legal-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 200;
    margin-bottom: 40px;
}

.legal-body {
    max-width: 800px;
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

.legal-body h3 {
    margin: 30px 0 15px;
    font-weight: 600;
}

.legal-footer {
    margin-top: 60px;
    font-size: 12px;
    opacity: 0.5;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* --- RESPONSIVIDAD GLOBAL --- */

@media (max-width: 992px) {
    .container {
        padding: 0 30px;
    }
    
    .welcome-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Hero Adjustments */
    .hero-title {
        font-size: 45px; /* Tamaño más manejable en móvil */
    }

    .hero-description {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Welcome & Services */
    .welcome {
        padding: 80px 0;
    }

    .services-grid {
        grid-template-columns: 1fr; /* Una sola tarjeta por fila */
    }

    .service-card {
        aspect-ratio: auto; /* Quitamos el cuadrado forzado para que el texto respire */
        padding: 40px 30px;
    }

    /* Projects Gallery */
    .projects-grid {
        grid-template-columns: 1fr; /* Fotos grandes en vertical */
        gap: 15px;
    }

    .project-item {
        aspect-ratio: 1 / 1; /* Fotos cuadradas en móvil para ahorrar espacio */
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 15px;
    }
}

/* --- MENU BURGER STYLES --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}

.menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--white);
    transition: 0.3s;
}

.scrolled .menu-toggle .bar {
    background-color: var(--black);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--ivory);
        padding: 100px 40px;
        gap: 40px;
        text-align: center;
        box-shadow: -10px 0 20px rgba(0,0,0,0.05);
    }

    .nav-links.mobile-visible {
        display: flex;
    }

    .nav-links .nav-link {
        color: var(--black) !important;
        font-size: 18px;
    }

    /* Animación del botón al abrir */
    .menu-toggle.is-active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.is-active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.is-active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .menu-toggle.is-active .bar {
        background-color: var(--black) !important;
    }
}

@media (max-width: 768px) {
    /* --- FOOTER CENTRADO MOVIL --- */
    .footer-inner {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 40px !important;
    }

    .footer-logo {
        margin: 0 auto 15px !important;
        display: block !important;
    }

    .footer-tagline {
        display: block !important;
        text-align: center !important;
        width: 100% !important;
    }

    .footer-nav {
        flex-direction: column !important;
        align-items: center !important;
        gap: 20px !important;
    }

    .footer-socials {
        justify-content: center !important;
        width: 100% !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        gap: 20px !important;
        text-align: center !important;
        align-items: center !important;
    }

    .footer-legal {
        justify-content: center !important;
        gap: 15px !important;
    }
}