/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Manrope', sans-serif;
    background: #050505;
    color: #F0F0F2;
    overflow-x: hidden;
}

/* ========== VIDEO BACKGROUND ========== */
#bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.video-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(5, 5, 5, 0.3) 0%,
        rgba(5, 5, 5, 0.5) 40%,
        rgba(5, 5, 5, 0.75) 70%,
        rgba(5, 5, 5, 0.95) 100%
    );
    pointer-events: none;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ========== LOADING SCREEN ========== */
.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: #050505;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-in-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    font-family: 'Oswald', 'Bebas Neue', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #F0F0F2;
    letter-spacing: 0.2em;
    animation: loadingGlow 2s ease-in-out infinite;
}

@keyframes loadingGlow {
    0%, 100% { text-shadow: 0 0 0px rgba(123, 45, 142, 0); }
    50% { text-shadow: 0 0 20px rgba(123, 45, 142, 0.5); }
}

/* ========== CONTENT LAYER ========== */
.content {
    position: relative;
    z-index: 2;
}

/* ========== HERO SECTION ========== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-title {
    font-family: 'Oswald', 'Bebas Neue', sans-serif;
    font-weight: 700;
    font-size: clamp(3.5rem, 15vw, 10rem);
    color: #F0F0F2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: center;
    line-height: 1;
    perspective: 1000px;
    transform-style: preserve-3d;
    will-change: transform, opacity;
}

.hero-title .letter {
    display: inline-block;
    will-change: transform;
    backface-visibility: hidden;
    transition: transform 0.1s linear;
}

.hero-subtitle {
    margin-top: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(0.875rem, 2vw, 1.25rem);
    color: #8A8A93;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
}

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

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.scroll-line {
    position: relative;
    width: 1px;
    height: 40px;
    background: rgba(85, 85, 94, 0.5);
    overflow: hidden;
}

.scroll-dot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #55555E;
    animation: scrollDotMove 2s ease-in-out infinite;
}

@keyframes scrollDotMove {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(34px); opacity: 0; }
}

.scroll-text {
    font-size: 0.75rem;
    color: #55555E;
    letter-spacing: 0.2em;
    font-family: 'Inter', sans-serif;
}

/* ========== PLATFORMS SECTION ========== */
.platforms-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem;
}

.section-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #F0F0F2;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-heading.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-desc {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: clamp(0.875rem, 1.5vw, 1rem);
    color: #8A8A93;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.section-desc.visible {
    opacity: 1;
    transform: translateY(0);
}

.platforms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 900px;
    width: 100%;
}

/* ========== PLATFORM CARD ========== */
.platform-card {
    position: relative;
    overflow: hidden;
    background: rgba(10, 10, 12, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

.platform-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.platform-card:hover {
    background: rgba(20, 20, 25, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 30px rgba(123, 45, 142, 0.15);
    transform: scale(1.02);
}

.platform-card:active {
    transform: scale(0.98);
    background: rgba(15, 15, 18, 0.9);
}

.card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.platform-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
}

.platform-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    font-size: 1.125rem;
    color: #F0F0F2;
    letter-spacing: 0.02em;
    flex: 1;
}

.arrow {
    color: #55555E;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.platform-card:hover .arrow {
    color: #00D4AA;
}

/* ========== VHS GLITCH ========== */
.glitch-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    border-radius: inherit;
    display: flex;
    align-items: center;
    padding: inherit;
    z-index: 3;
    overflow: hidden;
}

.glitch-layer > * {
    filter: blur(0.5px);
}

.glitch-cyan {
    color: #00D4AA;
    --shift: -3px;
}

.glitch-magenta {
    color: #7B2D8E;
    --shift: 3px;
}

.scanlines {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.08) 0px,
        rgba(0, 0, 0, 0.08) 1px,
        transparent 1px,
        transparent 3px
    );
    border-radius: inherit;
    z-index: 4;
}

.platform-card:hover .glitch-cyan,
.platform-card:hover .glitch-magenta {
    animation: vhsGlitch 0.35s ease-out;
}

.platform-card:hover .scanlines {
    animation: scanlineFlicker 0.35s ease-out;
}

@keyframes vhsGlitch {
    0% {
        opacity: 0;
        transform: translateX(0);
        clip-path: inset(0 0 100% 0);
    }
    15% {
        opacity: 0.7;
        clip-path: inset(20% 0 60% 0);
    }
    30% {
        transform: translateX(var(--shift, 0px));
        clip-path: inset(45% 0 30% 0);
    }
    45% {
        clip-path: inset(70% 0 10% 0);
    }
    60% {
        opacity: 0.5;
        transform: translateX(calc(var(--shift, 0px) * 0.5));
    }
    75% {
        clip-path: inset(10% 0 80% 0);
    }
    100% {
        opacity: 0;
        transform: translateX(0);
        clip-path: inset(0 0 100% 0);
    }
}

@keyframes scanlineFlicker {
    0%, 100% { opacity: 0; }
    20% { opacity: 0.15; }
    40% { opacity: 0; }
    60% { opacity: 0.1; }
    80% { opacity: 0.2; }
}

/* ========== FOOTER ========== */
.footer {
    margin-top: 4rem;
    font-size: 0.75rem;
    color: #55555E;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    .hero-title .letter {
        transform: none !important;
    }

    .platform-card:hover .glitch-cyan,
    .platform-card:hover .glitch-magenta {
        animation: none;
    }

    .platform-card:hover .scanlines {
        animation: none;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ========== MOBILE ========== */
@media (max-width: 480px) {
    .platforms-grid {
        grid-template-columns: 1fr;
    }

    .platform-card {
        padding: 1rem 1.25rem;
    }
}
