:root {
    --bg-main: #f8fafc;
    --b2c-glow: #38bdf8;
    --b2b-glow: #1e3a8a;
    
    /* Nuevas Fuentes Seleccionadas */
    --font-label: 'Space Grotesk', sans-serif;
    --font-title: 'DM Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    overflow: hidden; 
    width: 100vw;
    height: 100dvh; /* dvh evita que Safari corte el borde inferior */
}

/* =========================================
   CURSOR GLOW (Linterna)
========================================= */
.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(255,255,255,0) 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 999;
    margin-top: -250px;
    margin-left: -250px;
    transition: opacity 0.3s ease;
}

/* =========================================
   LAYOUT PRINCIPAL
========================================= */
.funnel-container {
    display: flex;
    width: 100%;
    height: 100dvh; /* dvh evita que Safari corte el borde inferior */
    position: relative;
}

/* Flotación 3D del Logo (Parallax Estático) */
.center-brand {
    display: none; /* Oculto en Desktop */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
    animation: floatLogo 6s ease-in-out infinite;
}

@keyframes floatLogo {
    0% { transform: translate(-50%, -50%); }
    50% { transform: translate(-50%, -55%); }
    100% { transform: translate(-50%, -50%); }
}

.brand-glass {
    width: 320px;
    height: 90px;
    border-radius: 20px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    padding: 10px 20px;
}

.brand-glass img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: scale(1.15); /* Aumenta el logo visualmente para llenar mejor el espacio */
}

.brand-logo {
    width: 70%;
    height: auto;
    transform: translateY(-3px); /* Corrección óptica por el espacio en blanco del PNG */
}

/* =========================================
   MITADES (SPLIT HALVES)
========================================= */
.split-half {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: flex 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- B2C HALF (Light Gray / White) --- */
.b2c-half { 
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%); 
    color: #0f172a;
    border-right: 1px solid rgba(0,0,0,0.05);
}
.b2c-half .light-text { color: #334155; font-weight: 300; }
.b2c-half .bold-text { 
    font-weight: 800;
    /* Brillo Metálico Azul Cian */
    background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #0284c7 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}
.b2c-half .micro-copy { color: #475569; }
.b2c-half .subtitle { color: #475569; }

/* --- B2B HALF (Deep Blue Tech) --- */
.b2b-half { 
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%); 
    color: #ffffff;
}
.b2b-half .light-text { color: #f8fafc; font-weight: 300; }
.b2b-half .bold-text { 
    font-weight: 800;
    /* Brillo Metálico Azul Cian Brillante */
    background: linear-gradient(90deg, #38bdf8 0%, #7dd3fc 50%, #38bdf8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}
.b2b-half .micro-copy { color: #94a3b8; }
.b2b-half .subtitle { color: #cbd5e1; }

/* =========================================
   TEXTURAS DE ONDAS CUÁNTICAS ANIMADAS
========================================= */
.b2c-half::before, .b2b-half::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    background-repeat: repeat-x;
    pointer-events: none;
}

/* 3 Capas de ondas paralelas desplazándose a distintas velocidades */
.b2c-half::before {
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q250,100 500,50 T1000,50' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-opacity='0.05'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q250,100 500,50 T1000,50' fill='none' stroke='%230284c7' stroke-width='4' stroke-opacity='0.03'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q250,100 500,50 T1000,50' fill='none' stroke='%2338bdf8' stroke-width='1' stroke-opacity='0.08'/%3E%3C/svg%3E");
    background-size: 1000px 30%, 1500px 40%, 800px 50%;
    background-position: 0px 85%, 0px 15%, 0px 50%;
    animation: wavePanC 20s linear infinite;
}

.b2b-half::before {
    background-image: 
        url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q250,100 500,50 T1000,50' fill='none' stroke='%23ffffff' stroke-width='2' stroke-opacity='0.02'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q250,100 500,50 T1000,50' fill='none' stroke='%237dd3fc' stroke-width='4' stroke-opacity='0.01'/%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 100' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 Q250,100 500,50 T1000,50' fill='none' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.03'/%3E%3C/svg%3E");
    background-size: 1000px 30%, 1500px 40%, 800px 50%;
    background-position: 0px 85%, 0px 15%, 0px 50%;
    animation: wavePanB 25s linear infinite;
}

@keyframes wavePanC {
    100% { background-position: 1000px 85%, -1500px 15%, 800px 50%; }
}
@keyframes wavePanB {
    100% { background-position: 1000px 85%, -1500px 15%, 800px 50%; }
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* Atmósfera Expandida en Hover */
.bg-glow {
    position: absolute;
    width: 150%;
    height: 150%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
    z-index: 0;
}
.b2c-half .bg-glow { background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, transparent 60%); }
.b2b-half .bg-glow { background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%); }

@media (hover: hover) and (min-width: 769px) {
    .split-half:hover {
        flex: 1.3;
    }
    .split-half:hover .bg-glow {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    .b2c-half:hover .star-btn span {
        background: #1e3a8a;
        color: #ffffff;
    }
    .b2b-half:hover .star-btn span {
        background: #ffffff;
        color: #1e3a8a;
    }
}

/* =========================================
   CONTENIDO INTERNO Y TIPOGRAFÍA
========================================= */
.content-wrapper {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

.micro-copy {
    font-family: var(--font-label);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.25em; /* Ultra-wide spacing para High-End */
    text-transform: uppercase;
}

.split-title {
    font-family: var(--font-title);
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
}

.subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.5;
    font-weight: 400;
    max-width: 85%;
}

/* =========================================
   ANIMACIONES EN CASCADA
========================================= */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
}
.fade-in-up.start-fade {
    animation: simpleFadeUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Delays para efecto cascada */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes simpleFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   BOTONES PREMIUM (MAGNETIC FEEL)
========================================= */
.cta-wrapper {
    margin-top: 1rem;
}

.star-btn {
    position: relative;
    padding: 2px;
    border-radius: 50px;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; /* Evitar subrayado en enlaces */
}

/* Botones Magnéticos: se acercan levemente en hover */
.star-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

.star-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%) rotate(0deg);
    animation: rotateBorder 4s linear infinite;
    z-index: -1;
}

/* Borde rotatorio distinto para cada mitad */
.b2c-half .star-btn::before {
    background: conic-gradient(from 0deg, transparent 0%, transparent 40%, #0ea5e9 50%, transparent 60%, transparent 100%);
}
.b2b-half .star-btn::before {
    background: conic-gradient(from 0deg, transparent 0%, transparent 40%, #ffffff 50%, transparent 60%, transparent 100%);
}

@keyframes rotateBorder {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.star-btn span {
    display: block;
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 48px;
    transition: all 0.3s ease;
}

.b2c-half .star-btn span {
    background: #ffffff;
    color: #1e3a8a;
}
.b2b-half .star-btn span {
    background: #1e3a8a;
    color: #ffffff;
}

/* =========================================
   MOBILE RESPONSIVE
========================================= */
@media (max-width: 768px) {
    .funnel-container {
        flex-direction: column;
    }
    .split-half {
        flex: 1;
        width: 100%;
        border-right: none;
        padding-top: 0;
    }
    .b2c-half {
        padding-bottom: 2.5rem; /* Eleva el contenido superior para alejarlo del logo */
    }
    .b2b-half {
        padding-top: 2.5rem; /* Empuja el contenido inferior para alejarlo del logo */
    }
    .center-brand {
        display: block; /* Visible en Mobile */
    }
    .brand-glass {
        width: 80px; /* Contenedor circular */
        height: 80px; 
        border-radius: 50%; /* Círculo perfecto */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.5);
        box-shadow: 0 15px 35px rgba(0,0,0,0.1), 0 5px 15px rgba(0,0,0,0.05);
        padding: 5px; /* Ajuste para el isotipo redondo */
    }
    .content-wrapper {
        padding: 1rem;
        gap: 0.8rem;
    }
    .split-title {
        font-size: 2.2rem;
    }
    .subtitle {
        font-size: 0.95rem;
        max-width: 100%;
        padding: 0 1.5rem;
    }
    .cursor-glow {
        display: none;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #fff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  z-index: 99999;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  background-color: #20ba5a;
}

.whatsapp-float::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: inherit;
  opacity: 0.3;
  z-index: -1;
  animation: waPulse 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes waPulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@media (max-width: 767px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .whatsapp-float svg {
    width: 24px;
    height: 24px;
  }
}
