/* 
   SISTEMA DE DISEÑO: PublicidadYSEO
   Estilo: Editorial Premium / Dynamic Showcase
   Firma Visual: The Fluid Grid
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta Light (Default) */
    --primary: #7B2CBF;
    --primary-rgb: 123, 44, 191;
    --secondary: #3A86FF;
    --accent: #CCFF00;
    --accent-dark: #b2e600;
    --bg-body: #ffffff;
    --bg-alt: #f8f9fa;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --border: rgba(0,0,0,0.1);
    --header-bg: rgba(255, 255, 255, 0.8);
    
    /* Espaciado y Bordes */
    --radius: 12px;
    --container: 1200px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    /* Paleta Dark */
    --bg-body: #0A0A0A;
    --bg-alt: #121212;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border: rgba(255,255,255,0.1);
    --header-bg: rgba(10, 10, 10, 0.8);
}

/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- CABECERA --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    height: 80px;
    display: flex;
    align-items: center;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

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

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

.actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    display: none;
}

/* --- BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.3);
}

.btn-accent {
    background: var(--accent);
    color: #000;
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-3px);
}

/* --- HERO SECTION (Asimétrico) --- */
.hero {
    padding: 180px 0 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.hero-visual {
    position: relative;
    z-index: 2;
}

.hero-visual img.anim-float {
    animation: heroFloat 6s ease-in-out infinite;
}

.hero-visual img.anim-pulse {
    animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
        box-shadow: 0 40px 70px rgba(0,0,0,0.15);
    }
}

@keyframes heroPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }
    50% {
        transform: scale(1.05) rotate(-1deg);
        box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    }
}

.partner-logo {
    height: 35px;
    width: auto;
    filter: grayscale(1) brightness(0.2) opacity(0.5);
    transition: all 0.3s ease;
}

[data-theme="dark"] .partner-logo {
    filter: grayscale(1) brightness(2) opacity(0.5);
}

.partner-logo:hover {
    filter: grayscale(0) brightness(1) opacity(1);
}

.service-img-circle {
    width: 100%;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.5s ease;
}

.service-img-circle:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 45px rgba(0,0,0,0.12);
}

.placeholder-img {
    background: var(--bg-alt);
    border: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius);
    aspect-ratio: 4/5;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Firma Visual: Elementos flotantes */
.float-element {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.float-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -50px;
    right: -50px;
}

.float-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    bottom: -20px;
    left: -20px;
}

/* --- SECCIONES COMUNES --- */
section {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* --- SERVICIOS GRID --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-alt);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --- TEMA TOGGLE --- */
.theme-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
}

/* --- REVEAL ANIMATIONS --- */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: all 1s ease-out;
}

.reveal-up { transform: translateY(30px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }

.reveal-up.active, .reveal-left.active, .reveal-right.active {
    opacity: 1;
    transform: translate(0);
}

/* Las imágenes dentro de elementos revelados heredan la flotación al activarse */
.reveal-left.active img, .reveal-right.active img {
    animation: heroFloat 6s ease-in-out infinite;
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }
.delay-5 { transition-delay: 1.0s; }

/* --- GO TO TOP --- */
.go-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.3);
}

.go-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-top-btn:hover {
    background: var(--secondary);
    transform: translateY(-5px);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-body);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .menu-toggle {
        display: block !important;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .hero-btns {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    .section-title h2 {
        font-size: 2.2rem;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
}
