/* ============================================
   HERO SECTION — "El Orbe de Inteligencia"
   ============================================ */

/* Hero Layout Override */
.hero {
    padding: 160px 0 120px;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: transparent;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(0, 228, 255, 0.06) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.hero .container {
    display: block;
    position: relative;
    z-index: 2;
}

.hero-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
}

/* ---- Retro Grid (Perspective Floor) ---- */
.retro-grid {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    perspective: 400px;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.retro-grid-lines {
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 120%;
    transform: rotateX(60deg);
    transform-origin: bottom center;
    background-image:
        linear-gradient(to right, rgba(0, 228, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(123, 44, 191, 0.05) 1px, transparent 1px);
    background-size: 60px 40px;
    animation: retro-grid-scroll 15s linear infinite;
}

@keyframes retro-grid-scroll {
    0% {
        transform: rotateX(60deg) translateY(0);
    }
    100% {
        transform: rotateX(60deg) translateY(40px);
    }
}

/* Fade out edges of retro grid */
.retro-grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to bottom, rgba(2, 11, 35, 1) 0%, transparent 40%),
        linear-gradient(to right, rgba(2, 11, 35, 0.8) 0%, transparent 20%, transparent 80%, rgba(2, 11, 35, 0.8) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ---- Interactive Orb ---- */
.orb-container {
    position: relative;
    width: 320px;
    height: 320px;
    margin: 0 auto 30px;
    flex-shrink: 0;
}

#orb-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    border-radius: 50%;
}

.orb-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(0, 228, 255, 0.4) 0%,
        rgba(123, 44, 191, 0.2) 40%,
        transparent 70%
    );
    filter: blur(30px);
    z-index: 1;
    animation: orb-pulse 4s ease-in-out infinite;
}

@keyframes orb-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
}

/* Orbiting Rings */
.orb-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    border: 1px solid transparent;
    pointer-events: none;
    z-index: 0;
}

.orb-ring-1 {
    width: 250px;
    height: 250px;
    margin-top: -125px;
    margin-left: -125px;
    border-color: rgba(0, 228, 255, 0.15);
    animation: ring-orbit-1 8s linear infinite;
    transform: rotateX(65deg) rotateZ(0deg);
}

.orb-ring-2 {
    width: 290px;
    height: 290px;
    margin-top: -145px;
    margin-left: -145px;
    border-color: rgba(123, 44, 191, 0.12);
    animation: ring-orbit-2 12s linear infinite;
    transform: rotateX(65deg) rotateZ(60deg);
}

.orb-ring-3 {
    width: 330px;
    height: 330px;
    margin-top: -165px;
    margin-left: -165px;
    border-color: rgba(0, 228, 255, 0.08);
    animation: ring-orbit-3 16s linear infinite;
    transform: rotateX(65deg) rotateZ(120deg);
}

/* Small dot on each ring */
.orb-ring::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00E4FF;
    box-shadow: 0 0 8px #00E4FF, 0 0 15px rgba(0, 228, 255, 0.5);
}

@keyframes ring-orbit-1 {
    from { transform: rotateX(65deg) rotateZ(0deg); }
    to   { transform: rotateX(65deg) rotateZ(360deg); }
}

@keyframes ring-orbit-2 {
    from { transform: rotateX(65deg) rotateZ(60deg); }
    to   { transform: rotateX(65deg) rotateZ(420deg); }
}

@keyframes ring-orbit-3 {
    from { transform: rotateX(65deg) rotateZ(120deg); }
    to   { transform: rotateX(65deg) rotateZ(480deg); }
}


/* ---- Hero H1 Impact (Apple-style) ---- */
.hero-content h1 {
    font-size: 4.8rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.04em;
}

.hero-impact-line {
    display: block;
}

.hero-accent-line {
    background: linear-gradient(135deg, #00E4FF 0%, #7B2CBF 60%, #00E4FF 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: heroGradientShift 6s ease-in-out infinite;
}

@keyframes heroGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text {
    background: linear-gradient(135deg, #00E4FF, #7B2CBF);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #A2B2C9;
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* ---- Word Rotation ---- */
.word-rotate-wrapper {
    display: inline-block;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    height: 1.1em;
    vertical-align: -0.05em;
}

.word-rotate {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    line-height: inherit;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-weight: 700;
    /* Color gradient animado */
    background: linear-gradient(135deg, #00E4FF, #7B2CBF, #FF6E3A);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: wordColorShift 4s ease-in-out infinite;
}

@keyframes wordColorShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.word-rotate.slide-up {
    transform: translateY(-110%);
    opacity: 0;
}

.word-rotate.slide-down {
    transform: translateY(110%);
    opacity: 0;
}


/* ---- Border Beam CTA Button ---- */
.btn-border-beam {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 42px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    z-index: 1;
}

.btn-border-beam:hover {
    background: rgba(0, 228, 255, 0.1);
    border-color: rgba(0, 228, 255, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 228, 255, 0.3), 0 0 20px rgba(123, 44, 191, 0.2);
    color: #fff;
}

.btn-border-beam-text {
    position: relative;
    z-index: 3;
}

/* Border Beam animation */
.border-beam {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
}

.border-beam::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    background: conic-gradient(
        from 0deg,
        transparent 0%,
        transparent 70%,
        #00E4FF 78%,
        #7B2CBF 85%,
        #00E4FF 92%,
        transparent 100%
    );
    animation: border-beam-spin 3s linear infinite;
}

.border-beam::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background: rgba(2, 11, 35, 0.95);
    z-index: 1;
}

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


/* ---- Responsive ---- */
@media (max-width: 992px) {
    .hero {
        padding: 140px 0 80px;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 3.2rem;
    }

    .orb-container {
        width: 260px;
        height: 260px;
    }

    .orb-ring-1 {
        width: 200px; height: 200px;
        margin-top: -100px; margin-left: -100px;
    }
    .orb-ring-2 {
        width: 240px; height: 240px;
        margin-top: -120px; margin-left: -120px;
    }
    .orb-ring-3 {
        width: 270px; height: 270px;
        margin-top: -135px; margin-left: -135px;
    }

    .word-rotate-wrapper {
        min-width: 140px;
    }
    .hero-line-1,
    .hero-line-2 {
        white-space: normal;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 120px 0 60px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
        letter-spacing: -0.02em;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .orb-container {
        width: 200px;
        height: 200px;
    }

    .orb-ring-1 {
        width: 160px; height: 160px;
        margin-top: -80px; margin-left: -80px;
    }
    .orb-ring-2 {
        width: 190px; height: 190px;
        margin-top: -95px; margin-left: -95px;
    }
    .orb-ring-3 {
        width: 210px; height: 210px;
        margin-top: -105px; margin-left: -105px;
    }

    .btn-border-beam {
        padding: 14px 32px;
        font-size: 1rem;
    }

    .word-rotate-wrapper {
        min-width: 120px;
    }
    .hero-line-1,
    .hero-line-2 {
        white-space: normal;
    }
}
