/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    background: #000000;
    scroll-behavior: smooth;
}

/* Container */
.container {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background */
.background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    background-image: url('./img/bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
}

.background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 2;
}

/* Content Container */
.content {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    padding-bottom: 4rem;
}

/* Headline */
.headline-container {
    position: relative;
    z-index: 25;
    margin-bottom: 2rem;
    margin-top: 3rem;
    transform: translateY(40vh);
    animation: moveFromCenterToTop 3s ease-out 0.5s forwards;
}

.headline {
    font-size: clamp(2.8rem, 7vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 0.95;
    text-align: center;
    color: #ffffff;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.2),
        0 4px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    max-width: 700px;
    margin: 0 auto;
}

.headline .line {
    display: block;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.5s ease-out forwards;
}

.headline .line:nth-child(1) {
    animation-delay: 0.8s;
}

.headline .line:nth-child(2) {
    animation-delay: 1.3s;
    color: #f0f0f0;
}

.headline .line:nth-child(3) {
    animation-delay: 1.8s;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Rotating Images */
.rotating-images {
    position: relative;
    width: 70vw;
    height: 50vh;
    min-width: 800px;
    min-height: 500px;
    max-width: 1200px;
    max-height: 800px;
    margin: 2rem auto;
    z-index: 15;
    opacity: 0;
    transform: scale(0.8);
    animation: showImages 1.5s ease-out 2.8s forwards;
}

.image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.5),
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 5px 20px rgba(0, 0, 0, 0.4);
}

.image-container[data-image="1"] {
    opacity: 1;
}

.image-container[data-image="2"],
.image-container[data-image="3"],
.image-container[data-image="4"] {
    display: none;
}

.image-container.active {
    opacity: 1;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Vertical Gradient Effect */
.blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 20%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.7) 80%,
        rgba(0, 0, 0, 0.85) 100%
    );
    z-index: 2;
    pointer-events: none;
}

/* Gradient Overlays for Melting Effect */
.gradient-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        transparent 100%
    );
    z-index: 12;
    pointer-events: none;
}

.gradient-overlay-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.6) 50%,
        transparent 100%
    );
    z-index: 12;
    pointer-events: none;
}

/* CTA Button */
.cta-container {
    position: relative;
    z-index: 30;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    animation: showButton 1s ease-out 8s forwards;
}

/* Hide CTA button when text is collapsed, show when expanded */
.cta-container.expanded-only {
    opacity: 0;
    transform: translateY(30px);
    animation: none;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.text-content.expanded .cta-container.expanded-only {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Dots Animation */
.loading-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    opacity: 1;
    animation: hideDots 0.5s ease-out 10s forwards;
}

/* Loading Dots Overlay - Positioned absolutely over the button */
.loading-dots-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 16;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

/* Show loading dots when button is loading */
.loading-dots-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.loading-dots-overlay .loading-dots {
    margin-bottom: 0;
    animation: none;
}

.loading-dots-overlay .dot {
    animation: dotPulse 1.2s ease-in-out infinite;
}

.text-content.expanded .loading-dots-overlay {
    opacity: 0;
    pointer-events: none;
}

.loading-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: dotPulse 1.5s ease-in-out infinite;
}

.loading-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: 0.3s;
}

.loading-dots .dot:nth-child(3) {
    animation-delay: 0.6s;
}

.cta-button {
    position: relative;
    padding: 20px 50px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 0.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    animation: showFinalButton 0.8s ease-out 10.5s forwards, pulseButton 2s ease-in-out 11.5s infinite;
    text-transform: uppercase;
}

.cta-button span {
    position: relative;
    z-index: 2;
}

.button-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease-out;
    z-index: 1;
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
}

.cta-button:hover .button-glow {
    left: 100%;
}

.cta-button:active {
    transform: translateY(2px) scale(0.98);
}

/* Scroll Indicator */
.scroll-indicator {
    display: none;
}

.scroll-arrow {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    margin: 4px auto;
    animation: bounceDown 2s ease-in-out infinite;
}

.scroll-arrow:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-arrow:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes showText {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes showScrollIndicator {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Feature Description */
.feature-description {
    position: relative;
    max-width: 800px;
    margin: 4rem auto 0;
    padding: 0 2rem;
    text-align: left;
    z-index: 12;
    opacity: 0;
    transform: translateY(50px);
    animation: showText 1.5s ease-out 5.5s forwards;
}

/* Learn More Button - EXACT copy of Soon button */
.learn-more-button {
    position: relative;
    padding: 20px 50px;
    margin: 0 auto 2rem;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: pulseButtonDark 2s ease-in-out infinite;
    text-transform: uppercase;
    display: block;
    
    /* iOS Safari button fixes */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    -webkit-border-radius: 50px;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Button disappearing state - becomes invisible but keeps its space */
.learn-more-button.disappearing {
    opacity: 0;
    pointer-events: none;
    /* Keep transform and scale normal so dots align perfectly */
}

.learn-more-button span {
    position: relative;
    z-index: 2;
}

.learn-more-button .button-glow {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        0deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transition: bottom 0.6s ease-out;
    z-index: 1;
}

.learn-more-button:hover {
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
}

.learn-more-button:hover .button-glow {
    bottom: 100%;
}

.learn-more-button:active {
    transform: translateY(2px) scale(0.98);
}

/* Loading state for Learn More button */
.learn-more-button.loading span {
    opacity: 0;
}

.learn-more-button.loading .button-arrow {
    opacity: 0;
}

.learn-more-button.loading::after {
    content: '• • •';
    position: absolute;
    color: white;
    font-size: 1.2rem;
    letter-spacing: 8px;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.learn-more-button.loading {
    cursor: wait;
}

.button-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.learn-more-button:hover .button-arrow {
    transform: translateX(3px);
}

/* Text Content Container */
.text-content {
    position: relative;
    max-height: 100px;
    overflow: hidden;
    transition: max-height 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    mask: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 60%,
        rgba(0, 0, 0, 0.8) 75%,
        rgba(0, 0, 0, 0.4) 85%,
        rgba(0, 0, 0, 0.1) 95%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 60%,
        rgba(0, 0, 0, 0.8) 75%,
        rgba(0, 0, 0, 0.4) 85%,
        rgba(0, 0, 0, 0.1) 95%,
        transparent 100%
    );
}

.text-content.expanded {
    max-height: 2000px;
    mask: none;
    -webkit-mask: none;
    transition: max-height 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Text Blur Overlay */
.text-blur-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 20%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.6) 60%,
        rgba(0, 0, 0, 0.85) 80%,
        rgba(0, 0, 0, 1) 100%
    );
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.text-content.expanded .text-blur-overlay {
    opacity: 0;
}

.text-content {
    position: relative;
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    mask: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 60%,
        rgba(0, 0, 0, 0.8) 75%,
        rgba(0, 0, 0, 0.4) 85%,
        rgba(0, 0, 0, 0.1) 95%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 1) 0%,
        rgba(0, 0, 0, 1) 60%,
        rgba(0, 0, 0, 0.8) 75%,
        rgba(0, 0, 0, 0.4) 85%,
        rgba(0, 0, 0, 0.1) 95%,
        transparent 100%
    );
}

.text-content.expanded {
    max-height: 1000px;
    mask: none;
    -webkit-mask: none;
}

.text-content.expanded .text-blur-overlay {
    opacity: 0;
}

.feature-text {
    margin-bottom: 2.5rem;
    opacity: 1;
    transform: translateY(0);
    text-align: justify;
    text-align-last: center;
}

.text-line {
    display: block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 700;
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: #ffffff;
    text-align: justify;
    text-align-last: left;
    opacity: 1;
    transform: translateY(0);
    text-shadow: 
        0 0 15px rgba(255, 255, 255, 0.2),
        0 0 30px rgba(255, 255, 255, 0.1),
        0 2px 15px rgba(0, 0, 0, 0.4);
    text-wrap: balance;
    hyphens: auto;
    word-spacing: 0.1em;
    max-width: 85ch;
    margin: 0 auto;
}

@keyframes showFeatureDescription {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes moveFromCenterToTop {
    from {
        transform: translateY(40vh);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes moveToTop {
    from {
        transform: translateY(200px);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes showImages {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes showButton {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

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

@keyframes showFinalButton {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseButton {
    0%, 100% {
        transform: scale(1);
        background: rgba(255, 255, 255, 0.12);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
    50% {
        transform: scale(1.01);
        background: rgba(255, 255, 255, 0.14);
        box-shadow: 
            0 10px 36px rgba(0, 0, 0, 0.14),
            inset 0 1px 0 rgba(255, 255, 255, 0.18);
    }
}

@keyframes pulseButtonDark {
    0%, 100% {
        transform: scale(1);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 
            0 8px 32px rgba(0, 0, 0, 0.18),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        transform: scale(1.01);
        background: rgba(255, 255, 255, 0.1);
        box-shadow: 
            0 10px 36px rgba(0, 0, 0, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(8px);
    }
    60% {
        transform: translateY(4px);
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .rotating-images {
        width: 75vw;
        height: 45vh;
        min-width: 700px;
        min-height: 450px;
    }
}

@media (max-width: 1024px) {
    .rotating-images {
        width: 80vw;
        height: 40vh;
        min-width: 600px;
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .rotating-images {
        width: 95vw;
        height: 35vh;
        min-width: 320px;
        min-height: 300px;
        margin: 1rem auto;
        transform: scale(1);
    }

    .image-container img {
        object-fit: cover;
        object-position: center center;
    }

    .content {
        padding: 0 1rem;
    }

    /* Ensure button styling works on mobile */
    .learn-more-button {
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: none !important;
        border-radius: 50px !important;
        color: #ffffff !important;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    }
}

@media (max-width: 480px) {
    .rotating-images {
        width: 95vw;
        height: 30vh;
        min-width: 300px;
        min-height: 250px;
        margin: 1rem auto;
        transform: scale(1);
        position: relative;
        left: auto;
    }
    
    .content {
        padding: 0 0.5rem;
    }
    
    .headline-container {
        margin-top: 15vh;
        margin-bottom: 1.5rem;
    }
    
    .feature-description {
        margin-top: 2rem;
        padding: 0 1rem;
    }
    
    .feature-text {
        margin-bottom: 2rem;
    }
    
    .text-line {
        font-size: clamp(0.9rem, 2vw, 1.1rem);
        line-height: 1.4;
    }
}

/* High DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .image-container img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .image-container,
    .headline .line,
    .cta-button,
    .image-container img,
    .blur-overlay {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
