/* ==========================================================================
   SISTEMA DE DISEÑO - KREO IA STUDIO (DARK LUXURY)
   ========================================================================== */

:root {
    /* FONDOS */
    --bg-primary: #000000;
    --bg-secondary: #09090B;
    --bg-tertiary: #18181B;

    /* ACENTO PRIMARIO (NARANJA/FUEGO) */
    --primary-50:  #fff4ed;
    --primary-100: #ffeed3;
    --primary-200: #ffd4a3;
    --primary-300: #ffb466;
    --primary-400: #ff9433;
    --primary-500: #ff6600; /* Principal */
    --primary-600: #e65c00; /* Hover/Activos */
    --primary-700: #cc5200; /* Gradientes profundos */
    --primary-800: #993d00;
    --primary-900: #662900;
    
    /* Variable para RGBA dinámico */
    --primary-rgb: 255, 102, 0;

    /* TEXTOS */
    --text-primary: #FFFFFF;
    --text-secondary: #E4E4E7;
    --text-tertiary: #A1A1AA;
    --text-quaternary: #71717A;

    /* ACENTOS SECUNDARIOS */
    --success: #22C55E;
    --info: #3B82F6;
    --warning: #F59E0B;
}

/* ==========================================================================
   RESET & ESTILOS GLOABLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px;
}

/* TIPOGRAFÍA - JERARQUÍA */
h1, h2, h3, h4, h5, h6, .display-font {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

h1 { font-size: 76px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 48px; font-weight: 700; line-height: 1.2; }
h3 { font-size: 24px; font-weight: 600; line-height: 1.3; }

.body-large { font-size: 20px; line-height: 1.6; }
.label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-quaternary); }

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

/* ==========================================================================
   COMPONENTES CORE
   ========================================================================== */

/* GLASSMORPHISM CARD */
.glass-card {
    background: linear-gradient(
        135deg,
        rgba(var(--primary-rgb), 0.08) 0%,
        rgba(var(--primary-rgb), 0.04) 50%,
        rgba(var(--primary-rgb), 0.08) 100%
    );
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 25px 50px -12px rgba(var(--primary-rgb), 0.35);
    transform: translateY(-4px);
}

/* PRIMARY BUTTON */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--primary-600) 0%,
        var(--primary-500) 30%,
        var(--primary-400) 60%,
        var(--primary-500) 100%
    );
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    color: #ffffff;
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 
        0 0 0 1px rgba(var(--primary-rgb), 0.5),
        0 4px 24px rgba(var(--primary-rgb), 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    filter: brightness(1.1);
    box-shadow: 
        0 0 0 2px rgba(var(--primary-rgb), 0.8),
        0 8px 40px rgba(var(--primary-rgb), 0.6);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    padding: 16px 32px;
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb), 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary-500);
}

/* GLOW EFFECTS */
.glow-primary {
    filter: drop-shadow(0 0 20px rgba(var(--primary-rgb), 0.6))
            drop-shadow(0 0 40px rgba(var(--primary-rgb), 0.4))
            drop-shadow(0 0 60px rgba(var(--primary-rgb), 0.3));
}

.glow-text {
    text-shadow: 
        0 0 10px rgba(var(--primary-rgb), 0.8),
        0 0 20px rgba(var(--primary-rgb), 0.6),
        0 0 40px rgba(var(--primary-rgb), 0.4);
}

/* ==========================================================================
   LAYOUT & SECCIONES
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

/* NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    padding: 16px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 44px;
    width: auto;
}

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

.nav-link {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* HERO SECTION */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(var(--primary-rgb), 0.15) 0%, transparent 50%);
    z-index: 0;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text-col {
    max-width: 600px;
}

.hero-label {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 100px;
    color: var(--primary-400);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero-title {
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary-300) 0%, var(--primary-500) 50%, var(--primary-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.hero-visual-col {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    border-radius: 24px;
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.hero-visual-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.2) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 1;
}

/* PARTICLES */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-500);
    opacity: 0;
    animation: float-particle 20s infinite ease-in-out;
}

/* SOCIAL PROOF / LOGOS */
.social-proof {
    padding: 60px 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(var(--primary-rgb), 0.05);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.05);
}

.proof-metrics {
    text-align: center;
    margin-bottom: 40px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    color: var(--text-secondary);
}

.proof-metrics strong {
    color: var(--primary-500);
    font-weight: 800;
}

.logos-track {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    opacity: 0.6;
}

.logos-track img {
    height: 40px;
    filter: grayscale(100%) brightness(200%);
    transition: all 0.3s ease;
}

.logos-track img:hover {
    filter: grayscale(0%) brightness(100%);
    transform: scale(1.05);
}

/* SECCIÓN TÍTULOS */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-tertiary);
}

/* SERVICIOS / FLIP CARDS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.service-card-flip {
    perspective: 1000px;
    height: 450px;
    cursor: pointer;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Hover/Focus states para Flip */
@media (min-width: 1024px) {
    .service-card-flip:hover .service-card-inner {
        transform: rotateY(180deg);
    }
}
.service-card-flip.flipped .service-card-inner {
    transform: rotateY(180deg);
}

.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

/* Front */
.service-card-front {
    background: var(--bg-secondary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 24px 32px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    text-align: left;
}

.service-title-front {
    color: var(--text-primary);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.service-card-front:hover .service-image {
    transform: scale(1.05);
}

/* Back */
.service-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 40px;
    border-color: rgba(var(--primary-rgb), 0.3);
}

.service-title-back {
    color: var(--primary-500);
    margin-bottom: 16px;
    font-size: 28px;
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    flex-grow: 1;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 13px;
    color: var(--primary-300);
    font-weight: 500;
}

/* PORTFOLIO / INFO SECTION */
.portfolio-section {
    position: relative;
    background: radial-gradient(circle at right, rgba(var(--primary-rgb), 0.05) 0%, transparent 50%);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
}

.about-image {
    width: 100%;
    border-radius: 24px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.about-glow {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    border: 2px solid var(--primary-500);
    z-index: -1;
    opacity: 0.5;
}

.stat-box {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item h4 {
    font-size: 40px;
    color: var(--primary-500);
    line-height: 1.1;
    margin-bottom: 8px;
}

.stat-item p {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* CTA FINAL */
.cta-section {
    padding: 120px 0;
    text-align: center;
    position: relative;
}

.cta-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    z-index: 0;
    border-radius: 50%;
    filter: blur(60px);
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 56px;
    margin-bottom: 24px;
}

.cta-content p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* FOOTER */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand img {
    height: 40px;
    margin-bottom: 24px;
}

.footer-brand p {
    color: var(--text-tertiary);
    max-width: 300px;
}

.footer-links h4 {
    color: var(--text-primary);
    font-size: 18px;
    margin-bottom: 24px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-tertiary);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-500);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-quaternary);
    font-size: 14px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-500);
    color: white;
}

/* ==========================================================================
   ANIMACIONES CLAVE
   ========================================================================== */

/* Animación de Entrada para el Hero */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(2deg); }
    50% { transform: translateY(-10px) rotate(-2deg); }
    75% { transform: translateY(-30px) rotate(1deg); }
}

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0); opacity: 0.4; }
    25% { transform: translate(100px, -100px); opacity: 0.8; }
    50% { transform: translate(-50px, -200px); opacity: 0.6; }
    75% { transform: translate(-100px, -100px); opacity: 0.8; }
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Intersection Observer Classes */
.reveal-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 1024px) {
    h1 { font-size: 56px; }
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text-col { margin: 0 auto; }
    .hero-cta { justify-content: center; }
    .about-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 42px; }
    h2 { font-size: 36px; }
    section { padding: 60px 0; }
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }
    .services-grid { grid-template-columns: 1fr; }
    .service-card-flip { height: 400px; }
    .cta-content h2 { font-size: 40px; }
    .stat-box { flex-direction: column; gap: 24px; text-align: center; }
    
    /* Mostrar Footer vertical en móvil */
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { margin: 0 auto; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
