/* Enhanced Hero Typography and Animations */

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Common styles for both pages */
#hero .hero-content,
#hero-section .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(0, 14, 23, 0.5); /* Lighter semi-transparent background */
    backdrop-filter: blur(5px);
    border-radius: 12px;
    box-shadow: 
        0 0 25px rgba(0, 0, 0, 0.5),
        0 0 50px rgba(56, 182, 255, 0.25); /* Enhanced blue glow */
    border: 1px solid rgba(56, 182, 255, 0.4);
    animation: pulse-shadow 4s infinite ease-in-out;
    overflow: visible; /* For the light beam effect */
    box-sizing: border-box;
}

/* Light beam effect on hero content */
#hero .hero-content::before,
#hero-section .hero-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(56, 182, 255, 0.08) 0%,
        rgba(56, 182, 255, 0.05) 20%,
        rgba(56, 182, 255, 0.03) 40%,
        rgba(56, 182, 255, 0.01) 60%,
        transparent 80%
    );
    z-index: -1;
    opacity: 0.7;
    animation: rotate-light 25s infinite linear;
    pointer-events: none;
    border-radius: 12px;
}

/* Mobile break for headings - using <br> instead of span */
.mobile-break-line {
    display: none; /* Hidden by default on desktop */
}

/* Enhanced typography for headings */
#hero .hero-content h2,
#hero-section .hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(56, 182, 255, 0.9),
        0 0 20px rgba(56, 182, 255, 0.5),
        0 0 30px rgba(56, 182, 255, 0.3);
    letter-spacing: 1px;
    position: relative;
    width: 100%;
    max-width: 100%;
    /* Better text wrap control */
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.2;
    text-align: center;
    /* Remove flex that might cause issues */
    display: block;
}

/* Make sure <br> tags work properly in headings */
#hero .hero-content h2 br,
#hero-section .hero-content h1 br {
    display: block;
    content: '';
    margin: 0.2em 0; /* Add space between lines */
}

/* Animated heading specific styles */
.animated-heading {
    position: relative;
    padding: 10px 0;
    animation: fade-in-up 1s forwards;
    display: block;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
    width: 100%;
}

/* Add animation to each line of the heading for a typewriter effect */
.animated-heading br {
    display: block;
    content: "";
    margin-top: 10px;
    line-height: 1.5;
}

/* Tech-style heading animation - simplified */
.animated-heading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38b6ff, transparent);
    animation: line-scan 8s infinite;
}

.animated-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38b6ff, transparent);
    animation: line-scan-reverse 8s infinite;
}

/* Enhanced paragraph styles */
#hero .hero-content p,
#hero-section .hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #f0f0f0;
    text-shadow: 
        0 0 15px rgba(0, 0, 0, 0.9),
        0 0 5px rgba(56, 182, 255, 0.8);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    position: relative;
    opacity: 0;
    animation: fade-in-up 1s forwards 0.5s;
}

/* Button enhancements */
#hero .hero-content .btn-primary,
#hero-section .hero-content .cta-button {
    padding: 12px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0062a3, #38b6ff);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(56, 182, 255, 0.4);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    animation: fade-in-up 1s forwards 0.8s;
}

#hero .hero-content .btn-primary:hover,
#hero-section .hero-content .cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(56, 182, 255, 0.6);
}

#hero .hero-content .btn-primary::before,
#hero-section .hero-content .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: all 0.6s ease;
    z-index: 1;
}

#hero .hero-content .btn-primary:hover::before,
#hero-section .hero-content .cta-button:hover::before {
    animation: shine 1.5s infinite;
}

#hero .hero-content .btn-primary i,
#hero-section .hero-content .cta-button i {
    font-size: 1.2rem;
    animation: pulse-icon 2s infinite ease-in-out;
}

/* Add a tech grid background to hero content */
#hero .hero-content::after,
#hero-section .hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(56, 182, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 182, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
    border-radius: 12px;
    opacity: 0.6;
    animation: grid-move 35s infinite linear;
}

/* Video overlay - LIGHTER to make video more visible */
#hero::before,
#hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 14, 23, 0.4) 0%, 
        rgba(0, 25, 50, 0.3) 50%, 
        rgba(0, 14, 23, 0.4) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Light rays through the video - Fixed to prevent overflow */
#hero::after,
#hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    mix-blend-mode: overlay;
    opacity: 0.7;
    animation: light-sweep 15s infinite alternate ease-in-out;
    z-index: 1;
    pointer-events: none;
}

/* Animations */
@keyframes line-scan {
    0% {
        left: -100%;
    }
    40%, 60% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes line-scan-reverse {
    0% {
        left: 100%;
    }
    40%, 60% {
        left: -100%;
    }
    100% {
        left: -100%;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes pulse-shadow {
    0%, 100% {
        box-shadow: 
            0 0 25px rgba(0, 0, 0, 0.5),
            0 0 50px rgba(56, 182, 255, 0.15);
    }
    50% {
        box-shadow: 
            0 0 25px rgba(0, 0, 0, 0.5),
            0 0 70px rgba(56, 182, 255, 0.35);
    }
}

@keyframes grid-move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 40px 40px;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes rotate-light {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes light-sweep {
    0% {
        opacity: 0.4;
        transform: rotate(0deg) scale(1);
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 0.4;
        transform: rotate(10deg) scale(1.2);
    }
}

/* Neon pulse effect for hero text */
@keyframes neon-pulse {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(56, 182, 255, 0.9),
            0 0 20px rgba(56, 182, 255, 0.5),
            0 0 30px rgba(56, 182, 255, 0.3);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(56, 182, 255, 1),
            0 0 30px rgba(56, 182, 255, 0.8),
            0 0 45px rgba(56, 182, 255, 0.5);
    }
}

/* Typewriter effect for main heading */
.typewriter-text {
    display: inline-block;
    overflow: hidden;
    border-right: 3px solid #38b6ff;
    white-space: nowrap;
    margin: 0 auto;
    animation: 
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite,
        neon-pulse 4s infinite ease-in-out;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #38b6ff }
}

/* Video enhancement - subtle zoom effect - Adjusted to prevent overflow */
#hero video,
#hero-section video {
    animation: subtle-zoom 20s infinite alternate ease-in-out;
    object-fit: cover; /* Ensure video covers the container properly */
    width: 100%;
    height: 100%;
}

@keyframes subtle-zoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Show line break on mobile */
    .mobile-break-line {
        display: block;
    }
    
    /* Hero section - reduce padding and adjust centering on mobile */
    #hero,
    #hero-section {
        padding: 0 !important; /* Remove all padding to allow proper flex centering */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
        height: 100vh !important;
        margin-top: 0 !important;
    }
    
    #hero .hero-content,
    #hero-section .hero-content {
        padding: 1.5rem;
        max-width: 90%;
        width: 90%;
        /* Ensure container doesn't clip content */
        overflow: visible;
        /* Remove top positioning on mobile - let flexbox handle centering */
        top: 0 !important;
        /* Use transform to fine-tune vertical position - adjust down for better centering */
        transform: translateY(8vh) !important;
        margin-top: 0 !important;
    }
    
    #hero .hero-content h2,
    #hero-section .hero-content h1 {
        font-size: 2rem;
        line-height: 1.3;
        width: 100%;
        display: block;
        white-space: normal;
        /* Improved text wrapping for mobile */
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
        /* Ensure proper spacing on all sides */
        margin: 0 auto 1.5rem auto;
        padding: 0.2rem 0;
    }
    
    /* Ensure <br> tags work on mobile */
    #hero .hero-content h2 br,
    #hero-section .hero-content h1 br {
        display: block;
        margin: 0.1em 0;
    }
    
    .animated-heading {
        padding: 8px 0;
    }
    
    #hero .hero-content p,
    #hero-section .hero-content p {
        font-size: 1.1rem;
    }
    
    #hero .hero-content .btn-primary,
    #hero-section .hero-content .cta-button {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    /* Disable typewriter effect on mobile */
    .typewriter-text {
        white-space: normal !important;
        overflow: visible !important;
        border-right: none !important;
        animation: fade-in-up 1s forwards !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* Hero section - further adjust for smaller mobile screens */
    #hero,
    #hero-section {
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
        height: 100vh !important;
        margin-top: 0 !important;
    }
    
    #hero .hero-content,
    #hero-section .hero-content {
        padding: 1.25rem;
        width: 85%;
        /* Ensure container doesn't clip content */
        overflow: visible;
        /* Remove top positioning and adjust vertical position */
        top: 0 !important;
        /* Adjust down for better centering on smaller screens */
        transform: translateY(5vh) !important;
        margin-top: 0 !important;
    }
    
    #hero .hero-content h2,
    #hero-section .hero-content h1 {
        font-size: 1.7rem;
        line-height: 1.4;
        /* Additional text wrapping and spacing fixes */
        padding: 0.15rem 0;
        /* Ensure text stays within viewport width */
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }
    
    .animated-heading {
        padding: 6px 0;
    }
    
    #hero .hero-content p,
    #hero-section .hero-content p {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    #hero .hero-content .btn-primary,
    #hero-section .hero-content .cta-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    /* Hero section - adjust for extra small screens */
    #hero,
    #hero-section {
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 100vh !important;
        height: 100vh !important;
        margin-top: 0 !important;
    }
    
    #hero .hero-content,
    #hero-section .hero-content {
        padding: 1rem;
        width: 90%;
        /* Adjust vertical position for extra small screens */
        top: 0 !important;
        transform: translateY(5vh) !important;
        margin-top: 0 !important;
    }
    
    #hero .hero-content h2,
    #hero-section .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        /* Further reduce padding to fit container */
        padding: 0.1rem 0;
    }
    
    .animated-heading {
        padding: 5px 0;
    }
    
    #hero .hero-content p,
    #hero-section .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    
    #hero .hero-content .btn-primary,
    #hero-section .hero-content .cta-button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* Hero sections - ensure they contain everything properly */
#hero,
#hero-section {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
} 