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

:root {
    --primary: #00d4ff;
    --secondary: #ff6b35;
    --dark: #0a0e27;
    --darker: #050714;
    --light: #f8f9fa;
}

/* Space Background */
.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #000000;
    transform-origin: center center;
    will-change: transform;
}

.stars-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 60px 70px, #fff, transparent),
        radial-gradient(1px 1px at 50px 50px, #ddd, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 10px, #eee, transparent),
        radial-gradient(1px 1px at 20px 120px, #ddd, transparent),
        radial-gradient(2px 2px at 110px 30px, #fff, transparent),
        radial-gradient(1px 1px at 150px 150px, #eee, transparent),
        radial-gradient(1px 1px at 175px 95px, #fff, transparent),
        radial-gradient(2px 2px at 10px 100px, #ddd, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
}

.stars-layer-2 {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 40px 60px, #fff, transparent),
        radial-gradient(1px 1px at 80px 10px, #ddd, transparent),
        radial-gradient(2px 2px at 140px 140px, #eee, transparent),
        radial-gradient(1px 1px at 25px 85px, #fff, transparent),
        radial-gradient(1px 1px at 155px 45px, #ddd, transparent),
        radial-gradient(2px 2px at 95px 125px, #fff, transparent),
        radial-gradient(1px 1px at 185px 75px, #eee, transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 3s ease-in-out infinite reverse;
    opacity: 0.6;
}

.nebula-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(138, 43, 226, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 60%, rgba(0, 100, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(255, 0, 150, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 70%, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    opacity: 0.4;
}

.distant-stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 15% 25%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 45% 15%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 75% 35%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 85% 65%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 25% 75%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 55% 85%, rgba(255, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 95% 45%, rgba(255, 255, 255, 0.3), transparent);
    background-repeat: repeat;
    background-size: 300px 300px;
}

@keyframes twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Shooting Stars */
.shooting-star {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, #fff, transparent);
    animation: shoot 3s ease-in-out infinite;
    opacity: 0;
}

.shooting-star:nth-child(1) {
    top: 20%;
    left: 10%;
    width: 100px;
    animation-delay: 0s;
}

.shooting-star:nth-child(2) {
    top: 60%;
    left: 70%;
    width: 80px;
    animation-delay: 2s;
}

.shooting-star:nth-child(3) {
    top: 40%;
    left: 30%;
    width: 120px;
    animation-delay: 4s;
}

@keyframes shoot {
    0% {
        transform: translateX(0) translateY(0) rotate(-45deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(300px) translateY(300px) rotate(-45deg);
        opacity: 0;
    }
}

/* Bright Featured Stars */
.bright-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.8),
                0 0 20px 4px rgba(0, 212, 255, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.bright-star:nth-child(1) {
    top: 15%;
    left: 25%;
    animation-delay: 0s;
}

.bright-star:nth-child(2) {
    top: 70%;
    left: 80%;
    animation-delay: 0.7s;
}

.bright-star:nth-child(3) {
    top: 45%;
    left: 60%;
    animation-delay: 1.4s;
}

.bright-star:nth-child(4) {
    top: 85%;
    left: 15%;
    animation-delay: 2.1s;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: transparent;
    color: var(--light);
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in;
    position: relative;
}

body.loaded {
    opacity: 1;
}

h1, h2, h3 {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mesh-gradient {
    background: 
        radial-gradient(at 0% 0%, rgba(0, 212, 255, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(255, 107, 53, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 212, 255, 0.05) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(255, 107, 53, 0.04) 0px, transparent 50%);
}

.card-gradient {
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.6) 0%, rgba(5, 7, 20, 0.4) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glow-effect {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-delay-2 {
    animation-delay: 0.4s;
}

.fade-in-delay-3 {
    animation-delay: 0.6s;
}

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

/* Scroll Animation Classes */
.scroll-fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-down {
    opacity: 0;
    transform: translateY(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-fade-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-rotate {
    opacity: 0;
    transform: rotate(-5deg) scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-blur {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, filter 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-visible {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) scale(1) rotate(0) !important;
    filter: blur(0) !important;
}

/* Stagger delays for grouped elements */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* Text reveal animation */
.text-reveal {
    opacity: 0;
    clip-path: polygon(0 0, 0 0, 0 100%, 0% 100%);
    transition: clip-path 1s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease-out;
}

.text-reveal.scroll-visible {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

/* Glow reveal animation */
.glow-reveal {
    opacity: 0;
    text-shadow: 0 0 0px rgba(0, 212, 255, 0);
    transition: opacity 0.8s ease-out, text-shadow 0.8s ease-out;
}

.glow-reveal.scroll-visible {
    opacity: 1;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0099cc 100%);
    color: var(--darker);
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.1);
}

input, textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'DM Sans', sans-serif;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

input::placeholder, textarea::placeholder {
    color: rgba(248, 249, 250, 0.4);
}

.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.grid-pattern {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Illustration Section */
.illustration-section {
    position: relative;
    z-index: 1;
    padding: 4rem 0;
    margin: 2rem 0;
}

.illustration-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

.illustration-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.95) translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.illustration-wrapper.scroll-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.illustration-image {
    width: 100%;
    height: auto;
    min-height: 60vh;
    max-height: 80vh;
    object-fit: cover;
    object-position: center;
    display: block;
    filter: brightness(1.05) contrast(1.02) saturate(1.1);
    transform: scale(1.15) translateY(0);
    transition: transform 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    transform-origin: center center;
}

/* Granular reveal effect using mask */
.illustration-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(0, 212, 255, 0.1) 20%,
        rgba(0, 212, 255, 0.15) 50%,
        rgba(0, 212, 255, 0.1) 80%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 1s ease-out;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: screen;
}

.illustration-wrapper.scroll-visible::before {
    opacity: 1;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 0.6;
        transform: translateY(-10px);
    }
}

/* Progressive reveal mask */
.illustration-wrapper {
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    mask-size: 100% 200%;
    -webkit-mask-size: 100% 200%;
    mask-position: center top;
    -webkit-mask-position: center top;
    transition: mask-position 1.5s cubic-bezier(0.4, 0, 0.2, 1),
                -webkit-mask-position 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.illustration-wrapper.scroll-visible {
    mask-position: center center;
    -webkit-mask-position: center center;
}

/* Parallax effect on scroll */
.illustration-image {
    transition: transform 0.1s ease-out;
}

/* Glow effect that appears on scroll */
.illustration-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(
        ellipse at center,
        rgba(0, 212, 255, 0.2) 0%,
        rgba(0, 212, 255, 0.1) 30%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 1.5s ease-out;
    pointer-events: none;
    z-index: 0;
    filter: blur(40px);
}

.illustration-wrapper.scroll-visible::after {
    opacity: 1;
}

@media (max-width: 768px) {
    .btn-primary, .btn-secondary {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .illustration-section {
        padding: 2rem 0;
        margin: 1rem 0;
    }
    
    .illustration-image {
        min-height: 45vh;
        max-height: 65vh;
        transform: scale(1.2);
    }
}

@media (min-width: 1920px) {
    .illustration-image {
        min-height: 70vh;
        transform: scale(1.2);
    }
}

/* Video Modal Styles */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.video-modal-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.video-modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.video-modal-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    background: #000;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
}

.video-modal-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 48px;
    height: 48px;
    background: rgba(0, 212, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--darker);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
}

.video-modal-close:hover {
    background: var(--primary);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6);
}

.video-modal-close:active {
    transform: scale(0.95) rotate(90deg);
}

.video-modal-close svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
}

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

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

@media (max-width: 768px) {
    .video-modal-container {
        width: 95vw;
        height: 95vh;
    }
    
    .video-modal-close {
        top: -10px;
        right: -10px;
        width: 40px;
        height: 40px;
    }
    
    .video-modal-close svg {
        width: 20px;
        height: 20px;
    }
}
