/* Hero Section */
.hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    overflow: hidden;
}

/* Logo Text (Left) */
.logo {
    position: absolute;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
    z-index: 10;
    opacity: 0;
    animation: fadeInText 1.8s ease-out 3s forwards;
    /* Ensure proper vertical alignment baseline */
    display: flex;
    align-items: center;
}

.logo-text {
    font-size: clamp(1.75rem, 3vw, 2rem);
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.02em;
    /* Ensure text baseline alignment */
    line-height: 1;
}

/* Logo Icon (Right) */
.logo-icon-right {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-lg);
    z-index: 10;
    opacity: 0;
    animation: fadeInText 1.8s ease-out 3s forwards;
    /* Vertically center align with text logo */
    display: flex;
    align-items: center;
}

.logo-icon {
    /* Make it bigger and match the vertical center of text logo */
    height: clamp(2.5rem, 5vw, 3.5rem);
    width: auto;
    /* No filter needed - SVG is already white */
    /* Vector SVG will scale perfectly sharp at any size */
    shape-rendering: geometricPrecision;
}

/* 3 Dots Decoration */
.dots-decoration {
    position: absolute;
    top: calc(var(--spacing-lg) + 18px);
    right: var(--spacing-lg);
    z-index: 10;
    display: flex;
    gap: 4px;
    opacity: 0;
    animation: fadeInText 1.8s ease-out 3s forwards;
}

.dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 50%, #ffffff 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease-in-out infinite;
}

/* Animation Container */
.animation-container {
    position: relative;
    width: 100%;
    max-width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animation Layers */
.animation-layer {
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.animation-layer-bg {
    position: relative;
    z-index: var(--z-bg-layer);
    width: 100%;
    height: auto;
    display: block;
}

.animation-layer-top {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: var(--z-top-layer);
    /* FIX 9: Remove width/height auto to prevent clipping - canvas size controlled by JS */
    /* Position will be controlled via JavaScript */
}

/* Hero Content */
.hero-content {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 0 var(--spacing-md);
    opacity: 0;
    animation: fadeInText 1.8s ease-out 3s forwards;
}

@keyframes fadeInText {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 50%, #ffffff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    animation: gradientShift 8s ease-in-out infinite;
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: var(--text-secondary);
    line-height: 1.3;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        /* FIX 19: Use dvh for proper mobile layout, JS locks canvas rendering */
        min-height: 100dvh;
    }

    .animation-container {
        /* FIX 19: Use dvh for proper mobile layout, JS locks canvas rendering */
        min-height: 100dvh;
        height: 100dvh;
    }

    .animation-layer-bg {
        width: 100%;
        /* FIX 19: Use dvh for proper mobile layout, JS locks canvas rendering */
        height: 100dvh;
        position: absolute;
        top: 0;
        left: 0;
    }

    .animation-layer-top {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .hero-content {
        /* FIX 10: Use dvh for better mobile viewport stability */
        bottom: 20dvh;
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .hero-content {
        /* FIX 10: Use dvh for better mobile viewport stability */
        bottom: 9dvh;
    }
}
