/* ==========================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================== */
:root {
    --rgb-bg: 5, 10, 25;
    --rgb-cyan: 0, 255, 230;
    --rgb-magenta: 255, 0, 180;
    --rgb-white: 245, 247, 250;
    --rgb-gray: 140, 150, 170;
    
    --font-title: 'Space Grotesk', sans-serif;
    --font-body: 'Urbanist', sans-serif;
    
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

html {
    scroll-behavior: smooth;
    background-color: rgb(var(--rgb-bg));
    color: rgb(var(--rgb-white));
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* ==========================================
   SISTEMA DE CENTRADO MAESTRO (MOBILE FIRST)
   ========================================== */
section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 60px 5%; /* Menos padding en móviles */
}

@media (min-width: 768px) {
    section { padding: 80px 5%; } /* Más padding en PC */
}

.centered-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ==========================================
   BACKGROUND DINÁMICO
   ========================================== */
#quantum-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; pointer-events: none;
}

.ambient-glow {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2;
    background: radial-gradient(circle at 10% 20%, rgba(var(--rgb-cyan), 0.04) 0%, transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(var(--rgb-magenta), 0.04) 0%, transparent 50%);
    pointer-events: none;
}

main { position: relative; z-index: 3; width: 100%; }

/* ==========================================
   ANIMACIONES AL SCROLL
   ========================================== */
.scroll-reveal {
    opacity: 0; transform: translateY(40px);
    transition: all 1s cubic-bezier(0.215, 0.610, 0.355, 1);
}
.scroll-reveal.active { opacity: 1; transform: translateY(0); }

/* ==========================================
   COMPONENTES VISUALES
   ========================================== */
.welcome-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 6vw, 6.5rem);
    font-weight: 700; line-height: 1.1; text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 30%, rgba(var(--rgb-cyan), 0.8) 70%, rgb(var(--rgb-magenta)));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: titlePulse 6s infinite alternate ease-in-out;
}

.welcome-tagline {
    font-size: clamp(1rem, 2.5vw, 1.8rem); font-weight: 300; letter-spacing: 4px;
    text-transform: uppercase; color: rgba(var(--rgb-cyan), 0.9); margin-top: 20px;
}

.scroll-indicator {
    position: absolute; bottom: 40px; display: flex; flex-direction: column;
    align-items: center; color: rgb(var(--rgb-gray)); gap: 10px;
}
.scroll-indicator i { animation: bounce 2s infinite; color: rgb(var(--rgb-magenta)); }

.section-header { margin-bottom: 40px; }
.section-tag { color: rgb(var(--rgb-magenta)); letter-spacing: 4px; font-weight: 700; display: block; margin-bottom: 10px; }
.section-title { font-family: var(--font-title); font-size: clamp(1.8rem, 4vw, 3.5rem); }

/* Grillas y Biografía (Mobile First: 1 columna por defecto) */
.bio-container {
    display: grid; grid-template-columns: 1fr; gap: 40px; width: 100%; text-align: center; align-items: center;
}

@media (min-width: 768px) {
    .bio-container { grid-template-columns: 1fr 1fr; text-align: left; }
}

.presentacion-img {
    max-width: 100%; height: auto; border-radius: 12px;
    border: 1px solid var(--glass-border); margin-top: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-left: 100px;
}

.stat-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 20px; text-align: center; margin-bottom: 15px;
}
.stat-number { font-size: 2.5rem; font-weight: 700; color: rgb(var(--rgb-cyan)); }

@media (min-width: 768px) {
    .stat-card { padding: 30px; margin-bottom: 20px; }
    .stat-number { font-size: 3rem; }
}

/* Carrusel y Paquetes */
.brand-carousel-track { display: flex; gap: 20px; justify-content: center; flex-direction: column; width: 100%; }

@media (min-width: 768px) {
    .brand-carousel-track { flex-direction: row; flex-wrap: wrap; gap: 30px; }
}

.brand-node {
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px;
    padding: 30px 20px; text-align: center; flex: 1; width: 100%;
    transition: all 0.4s ease;
}

@media (min-width: 768px) {
    .brand-node { min-width: 280px; max-width: 350px; padding: 40px 30px; }
}

.brand-node.highlight { border-color: rgba(var(--rgb-cyan), 0.5); transform: translateY(-5px); }
.brand-node:hover { border-color: rgba(var(--rgb-magenta), 0.4); transform: translateY(-5px); }

.brand-logo-placeholder { font-size: 2rem; color: rgba(var(--rgb-white), 0.5); margin-bottom: 15px; }
.brand-node:hover .brand-logo-placeholder { color: rgb(var(--rgb-cyan)); }
.brand-name { font-size: 1.2rem; font-family: var(--font-title); font-weight: 700; margin-bottom: 10px; }
.package-desc { font-size: 0.95rem; color: rgb(var(--rgb-gray)); line-height: 1.5; }

/* Grilla de Proyectos y Pilares */
.projects-grid {
    display: grid; grid-template-columns: 1fr; gap: 20px; width: 100%;
}

@media (min-width: 600px) {
    .projects-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
}

.project-card {
    border: 1px solid var(--glass-border); border-radius: 20px; min-height: 250px;
    display: flex; flex-direction: column; justify-content: flex-end; padding: 25px; text-align: left;
    background: linear-gradient(to top, rgba(var(--rgb-bg), 0.9) 10%, rgba(var(--rgb-bg), 0.2) 100%);
    transition: transform 0.4s; position: relative;
}
.project-card:hover { transform: translateY(-8px); border-color: rgba(var(--rgb-cyan), 0.3); }
.project-category { color: rgb(var(--rgb-cyan)); font-size: 0.75rem; letter-spacing: 2px; margin-bottom: 10px; }
.project-item-title { font-size: 1.3rem; margin-bottom: 10px; font-family: var(--font-title); }
.project-description { color: rgb(var(--rgb-gray)); font-size: 0.9rem; margin-bottom: 15px; }
.project-link { color: rgb(var(--rgb-magenta)); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.project-link:hover { color: rgb(var(--rgb-cyan)); }

.social-icons { display: flex; gap: 15px; margin-top: 20px; justify-content: center; }

@media (min-width: 992px) {
    .social-icons { justify-content: flex-start; }
}

.social-btn {
    width: 45px; height: 45px; border-radius: 50%; border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center; color: white; text-decoration: none;
}
.social-btn:hover { border-color: rgb(var(--rgb-cyan)); color: rgb(var(--rgb-cyan)); }

/* ==========================================
   ESTILOS PARA PÁGINAS DE PORTAFOLIO INTERNAS
   ========================================== */
.portfolio-page-section { min-height: 100vh; padding-top: 100px; justify-content: flex-start; }
.portfolio-grid { display: grid; grid-template-columns: 1fr; gap: 30px; width: 100%; margin-top: 20px; }

@media (min-width: 768px) {
    .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
}

.portfolio-card {
    background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 16px;
    overflow: hidden; display: flex; flex-direction: column; transition: transform 0.4s, border-color 0.4s;
}

.portfolio-card:hover { transform: translateY(-8px); border-color: rgba(var(--rgb-cyan), 0.4); }

.portfolio-img-wrapper { width: 100%; height: 200px; overflow: hidden; border-bottom: 1px solid var(--glass-border); position: relative;}

@media (min-width: 768px) {
    .portfolio-img-wrapper { height: 240px; }
}

/* CLASE INDIVIDUAL PARA IMÁGENES DE SOLUCIONES WEB */
.custom-web-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que no se deforme */
    object-position: top; /* Muestra siempre la parte de arriba de la web */
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.portfolio-card:hover .custom-web-img {
    transform: scale(1.08); /* Efecto zoom suave al pasar el mouse */
}

.portfolio-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; text-align: left; }
.btn-inspect { margin-top: auto; display: inline-block; border-top: 1px solid var(--glass-border); padding-top: 15px; }

/* Identidad Visual Tags */
.brand-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.brand-tag { font-size: 0.75rem; padding: 4px 10px; background: rgba(255,0,180,0.1); color: rgb(var(--rgb-magenta)); border-radius: 20px; border: 1px solid rgba(255,0,180,0.3); }

/* Identidad Visual Color Dots */
.brand-details { margin: 15px 0; display: flex; align-items: center; gap: 15px; flex-wrap: wrap;}
.detail-label { font-size: 0.85rem; color: rgb(var(--rgb-gray)); text-transform: uppercase; letter-spacing: 1px; }
.color-palette { display: flex; gap: 8px; }
.color-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.1); box-shadow: 0 2px 5px rgba(0,0,0,0.5); cursor: pointer; }

/* ==========================================
   FORMULARIO DE BRIEFING (MOBILE FIRST)
   ========================================== */
.form-container { width: 100%; max-width: 800px; margin: 0 auto; }
.glass-form { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 20px; padding: 25px; backdrop-filter: blur(10px); }

@media (min-width: 768px) {
    .glass-form { padding: 40px; }
}

.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }

@media (min-width: 768px) {
    .form-grid { grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 25px; }
}

.form-group { display: flex; flex-direction: column; text-align: left; }
.form-group.full-width { margin-bottom: 20px; }
.form-group label { font-size: 0.9rem; color: rgb(var(--rgb-gray)); margin-bottom: 8px; letter-spacing: 1px; }
.form-input { background: rgba(0, 0, 0, 0.2); border: 1px solid var(--glass-border); border-radius: 8px; padding: 15px; color: rgb(var(--rgb-white)); font-family: var(--font-body); font-size: 1rem; width: 100%; }
.form-input:focus { border-color: rgb(var(--rgb-cyan)); box-shadow: 0 0 15px rgba(var(--rgb-cyan), 0.2); background: rgba(0, 0, 0, 0.4); outline: none; }

.submit-btn { width: 100%; background: linear-gradient(135deg, rgb(var(--rgb-cyan)), rgb(var(--rgb-magenta))); color: white; border: none; padding: 15px; border-radius: 8px; font-size: 1.1rem; font-family: var(--font-title); font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 10px; }

/* ==========================================
   FOOTER (MOBILE FIRST)
   ========================================== */
footer { background: rgba(3, 6, 16, 0.8); border-top: 1px solid var(--glass-border); padding: 50px 5% 30px 5%; width: 100%; text-align: center; }

@media (min-width: 768px) {
    footer { padding: 80px 10% 40px 10%; text-align: left; }
}

.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; width: 100%; max-width: 1200px; margin-left: auto; margin-right: auto; }

@media (min-width: 992px) {
    .footer-grid { grid-template-columns: 1.5fr repeat(2, 1fr); gap: 60px; margin-bottom: 60px; }
}

.footer-brand-side h3 { font-family: var(--font-title); font-size: 1.8rem; font-weight: 700; margin-bottom: 15px; background: linear-gradient(to right, #fff, rgb(var(--rgb-cyan))); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.footer-brand-side p { color: rgb(var(--rgb-gray)); margin: 0 auto 20px auto; max-width: 300px; }

@media (min-width: 992px) {
    .footer-brand-side p { margin: 0 0 25px 0; }
}

.footer-links h4 { font-family: var(--font-title); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; color: rgb(var(--rgb-magenta)); }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a { color: rgb(var(--rgb-gray)); text-decoration: none; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 25px; display: flex; flex-direction: column; align-items: center; gap: 15px; color: rgba(140, 150, 170, 0.6); font-size: 0.9rem; max-width: 1200px; margin: 0 auto; text-align: center; }

@media (min-width: 768px) {
    .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; gap: 0; }
}

