/* ==========================================================================
   DESIGN SYSTEM & VARIABLES - FUNNEL-IA WEB REFRESH
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@1,400;1,600&display=swap');

:root {
    /* Color Palette - Updated for Web Refresh */
    --color-obsidian: #02050D;
    --color-night: #06111F;
    --color-cyan: #00D5E6;
    --color-blue: #2979FF;
    --color-green: #16C784;
    --color-paper: #F7F8FA;
    --color-ink: #101114;
    --color-white: #FFFFFF;
    --color-text-secondary-dark: #A7B0C0;
    --color-text-secondary-light: #5E6470;
    
    /* Active Themes Variables (Defaults to Light/Editorial) */
    --bg-primary: var(--color-paper);
    --text-primary: var(--color-ink);
    --text-secondary: var(--color-text-secondary-light);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-editorial: 'Playfair Display', serif;
    
    /* Border Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* Shadow Palette */
    --shadow-subtle: 0 4px 18px rgba(0, 0, 0, 0.03);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.06);
    --shadow-dark: 0 20px 40px rgba(0, 0, 0, 0.3);
    
    /* Transitions */
    --transition-fast: all 0.2s ease-in-out;
    --transition-normal: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Container Widths */
    --container-width: 1200px;
    --container-narrow: 800px;
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

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

ul {
    list-style: none;
}

/* ==========================================================================
   THEMES (EDITORIAL CLARO vs PREMIUM OSCURO)
   ========================================================================== */
.theme-light {
    --bg-primary: var(--color-paper);
    --text-primary: var(--color-ink);
    --text-secondary: var(--color-text-secondary-light);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.theme-dark {
    --bg-primary: var(--color-obsidian);
    --bg-secondary: var(--color-night);
    --text-primary: var(--color-white);
    --text-secondary: var(--color-text-secondary-dark);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* ==========================================================================
   LAYOUT CONTAINERS & GRID
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.align-center {
    align-items: center;
}

.text-center {
    text-align: center;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

h2 {
    font-size: 2rem;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.editorial-italic {
    font-family: var(--font-editorial);
    font-style: italic;
    font-weight: 400;
}

@media (min-width: 768px) {
    h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    p {
        font-size: 1.25rem;
    }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(41, 121, 255, 0.1); /* Blue with opacity */
    color: var(--color-blue);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.theme-dark .badge {
    background-color: rgba(0, 213, 230, 0.15); /* Cyan */
    color: var(--color-cyan);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    outline: none;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--color-blue);
    outline-offset: 2px;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.875rem;
}

.btn-md {
    padding: 14px 28px;
    font-size: 1rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--color-blue);
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(41, 121, 255, 0.2);
}

.btn-primary:hover {
    background-color: #1a65eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 121, 255, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-dark .btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.theme-dark .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-whatsapp {
    background-color: var(--color-green);
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(22, 199, 132, 0.2);
}

.btn-whatsapp:hover {
    background-color: #12b073;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 199, 132, 0.3);
}

.btn-icon {
    margin-right: 8px;
    font-size: 1.1em;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.header {
    background-color: rgba(247, 248, 250, 0.85); /* var(--color-paper) with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-fast);
}

.theme-dark .header, .header.dark-scrolled {
    background-color: rgba(2, 5, 13, 0.85); /* var(--color-obsidian) */
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 32px;
    width: auto;
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

@media (max-width: 480px) {
    .header-cta .btn-secondary {
        display: none;
    }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
section {
    padding: 120px 0;
    position: relative;
}

/* ==========================================================================
   HERO SECTION (Editorial Claro)
   ========================================================================== */
.hero-section {
    padding-top: 180px;
    padding-bottom: 100px;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

.hero-subtitle {
    font-size: 1.35rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }
}

/* ==========================================================================
   VIDEO NARRATIVE SECTION (Premium Oscuro)
   ========================================================================== */
.video-narrative-section {
    position: relative;
    padding: 0;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.video-background video.active {
    opacity: 1;
    z-index: 2;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(2,5,13,0.9) 0%, rgba(2,5,13,0.4) 50%, rgba(2,5,13,0.8) 100%);
    z-index: 3;
}

.video-content {
    position: relative;
    z-index: 4;
    text-align: center;
    max-width: 800px;
    padding: 0 24px;
}

.video-text {
    font-family: var(--font-editorial);
    font-style: italic;
    font-size: 2rem;
    line-height: 1.4;
    color: var(--color-white);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
    display: none;
}

.video-text.active {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

@media (min-width: 768px) {
    .video-text {
        font-size: 3rem;
    }
}

/* ==========================================================================
   LAS CUATRO PUERTAS (Editorial Claro)
   ========================================================================== */
.doors-section {
    background-color: var(--color-paper);
}

.door-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-normal);
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

.door-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.door-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

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

/* Door Specific Accents */
.door-card.door-sitios::before { background: var(--color-cyan); }
.door-card.door-empleado::before { background: var(--color-green); }
.door-card.door-growth::before { background: var(--color-blue); }
.door-card.door-business::before { background: var(--color-obsidian); }

.door-number {
    font-family: var(--font-editorial);
    font-style: italic;
    font-size: 1.5rem;
    color: rgba(0,0,0,0.2);
    margin-bottom: 24px;
}

.door-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--color-ink);
}

.door-message {
    font-family: var(--font-editorial);
    font-style: italic;
    font-size: 1.25rem;
    color: var(--color-ink);
    margin-bottom: 24px;
    line-height: 1.4;
}

.door-card p {
    font-size: 1rem;
    flex-grow: 1;
    margin-bottom: 32px;
}

.door-card .btn {
    width: 100%;
    margin-top: auto;
}

/* ==========================================================================
   METODO (Premium Oscuro)
   ========================================================================== */
.method-section {
    background-color: var(--color-night);
    text-align: center;
}

.method-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 60px;
}

@media (min-width: 768px) {
    .method-steps {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }
}

.method-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 20px;
}

.method-step::after {
    content: '→';
    position: absolute;
    right: -15px;
    top: 30px;
    color: var(--color-cyan);
    font-size: 1.5rem;
    opacity: 0.5;
}

@media (max-width: 767px) {
    .method-step::after {
        content: '↓';
        right: auto;
        bottom: -20px;
        top: auto;
    }
}

.method-step:last-child::after {
    display: none;
}

.step-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background-color: rgba(0, 213, 230, 0.1);
    color: var(--color-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.method-step h4 {
    font-size: 1.25rem;
    color: var(--color-white);
    margin-bottom: 10px;
}

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

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-brand .logo {
    justify-content: center;
    margin-bottom: 20px;
}

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

.footer-tagline {
    font-family: var(--font-editorial);
    font-style: italic;
    color: var(--color-text-secondary-dark);
    font-size: 1.25rem;
    margin-bottom: 40px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
}

.footer-links a {
    color: var(--color-text-secondary-dark);
    font-size: 0.95rem;
}

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

.footer-copy {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    width: 100%;
    color: var(--color-text-secondary-dark);
    font-size: 0.85rem;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }

/* ==========================================================================
   FLOATING WHATSAPP BUTTON (TULIO)
   ========================================================================== */
.floating-wa-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-green, #16C784);
    color: var(--color-white, #FFFFFF);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(22, 199, 132, 0.4);
    z-index: 9999;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: visible;
}

.floating-wa-btn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--color-green, #16C784);
    border-radius: 50%;
    z-index: -1;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

.floating-wa-btn svg {
    width: 32px;
    height: 32px;
    transition: transform 0.3s ease;
}

.floating-wa-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(22, 199, 132, 0.6);
    color: var(--color-white, #FFFFFF);
}

.floating-wa-btn:hover svg {
    transform: scale(1.1);
}

.floating-wa-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%) translateX(20px);
    background-color: var(--color-obsidian, #02050D);
    color: var(--color-white, #FFFFFF);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.floating-wa-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--color-obsidian, #02050D);
}

.theme-dark .floating-wa-tooltip {
    background-color: var(--color-paper, #F7F8FA);
    color: var(--color-ink, #101114);
}

.theme-dark .floating-wa-tooltip::after {
    border-color: transparent transparent transparent var(--color-paper, #F7F8FA);
}

.floating-wa-btn:hover .floating-wa-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}
