:root {
    --bg-color: #030305;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --primary-gradient: linear-gradient(135deg, #FF0055 0%, #7B1FA2 100%);
    --secondary-gradient: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-hover: rgba(255, 255, 255, 0.08);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --container-width: 1200px;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-family);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Page Specific Override: Licensing Page Light Theme defaults */
body.light-theme {
    background-color: #ffffff !important;
    color: #1c1917;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s ease;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-primary {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 10px 30px rgba(123, 31, 162, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(123, 31, 162, 0.5);
}

.btn-glass {
    background: var(--glass-bg);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Scrollbar Hiding */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-2000 {
    animation-delay: 2s;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    backdrop-filter: blur(20px);
    background: rgba(3, 3, 5, 0.6);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Menu Trigger & Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.menu-trigger {
    opacity: 0;
    /* Controlled by JS via class */
}

.menu-trigger.visible {
    animation: fadeInScale 0.8s ease-out forwards;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 20%;
    width: 500px;
    height: 500px;
    background: var(--secondary-gradient);
    filter: blur(150px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: -1;
    animation: float 10s infinite ease-in-out alternate;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    filter: blur(150px);
    opacity: 0.2;
    border-radius: 50%;
    z-index: -1;
    animation: float 8s infinite ease-in-out alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Services / Features */
.section {
    padding: 8rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    background: var(--card-hover);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.premium-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.05);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.card .icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--glass-bg);
    padding: 1rem;
    border-radius: 12px;
}

/* Licensing Table Placeholder */
.licensing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.license-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
}

.license-card.featured {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(123, 31, 162, 0.5);
    box-shadow: 0 0 50px rgba(123, 31, 162, 0.1);
}

.license-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 1.5rem 0;
    color: var(--text-main);
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.features-list {
    margin: 2rem 0;
    flex-grow: 1;
}

.features-list li {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
        /* Reduced from 1.5rem for more width */
    }

    .hero-content h1 {
        font-size: 3rem;
        /* Adjusted for mobile */
        letter-spacing: -1.5px;
        line-height: 1.1;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .section {
        padding: 4rem 0;
    }

    .section-title h2 {
        font-size: 2rem;
        /* Adjusted for mobile */
    }

    .licensing-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        padding: 0.8rem 2rem;
        width: 100%;
        text-align: center;
    }
}

/* Scrollytelling Styles */
.content-wrapper {
    position: relative;
    z-index: 20;
    background-color: white;
}

/* Scrollytelling Styles */
.scroll-container {
    height: 320vh;
    position: relative;
    z-index: 50;
}

/* Originals Container specific */
#originals-scroll-container {
    position: relative;
    z-index: 10;
    /* Height set inline to 500vh */
}

/* Ensure Vivaldi Grid is properly centered if needed */



.sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background-color: #050505;
}

#hero-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-header-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8vw;
    font-weight: 800;
    color: var(--text-main);
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
    letter-spacing: -0.05em;
    will-change: transform, opacity;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-muted);
    opacity: 1;
    transition: opacity 0.5s;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-arrow {
    font-size: 1.5rem;
    margin-top: 10px;
    animation: bounce 2s infinite;
}

.animate-swell {
    animation: swell 4s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

@keyframes swell {

    0%,
    100% {
        transform: translateY(0) scaleY(1);
        opacity: 0.8;
    }

    50% {
        transform: translateY(15px) scaleY(1.05);
        opacity: 1;
    }
}



#immersive-video-layer {
    position: absolute;
    inset: 0;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    /* SAFARI FIX: Shadow removed by user request */
    /* filter: none; */
    transition: opacity 1s ease-out;
    /* Remove filter from will-change */
    will-change: opacity, transform;
    /* Optimized will-change */

    /* Fixed Mask Properties for Scale Animation */
    -webkit-mask-image: url('assets/vr-mask.svg');
    mask-image: url('assets/vr-mask.svg');
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    /* FIX: Mask size fixed to contain. We scale the ELEMENT now. */
    -webkit-mask-size: contain;
    mask-size: contain;

    -webkit-mask-mode: alpha;
    mask-mode: alpha;

    /* Removed transition on transform to allow JS control */
    transform-origin: center center;
}

#immersive-video-wrapper {
    /* TRANSITION REMOVED: Fixes "bounce" lag. JS drives transform 1:1. */
    will-change: transform;
    width: 100%;
    height: 100%;
    transform-origin: center center;
}

#immersive-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-content-layer {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

#anim-main-group {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    will-change: transform, opacity;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#anim-subtitle {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out 0.2s;
    will-change: transform, opacity;
}

#white-bg-layer {
    position: absolute;
    inset: 0;
    background-color: white;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
}

.video-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 30%, transparent 60%);
    z-index: 15;
    pointer-events: none;
}

#anim-vision-layer {
    position: absolute;
    inset: 0;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* Vision Video Container */
.vision-video-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.vision-video-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
}

.vision-video-track video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Text Reveal Gradient */
.text-reveal-gradient {
    background: linear-gradient(to bottom, currentColor 50%, transparent 50%);
    background-size: 100% 200%;
    background-position: 0% 100%;
    /* Start Hidden */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: background-position 1s ease-out;
}

.text-reveal-gradient.active {
    background-position: 0% 0%;
    /* Reveal */
}

/* Originals Canvas */
#originals-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 1rem;
    z-index: 9999;
    display: none;
    /* Hidden by default, JS will show it */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-main);
    font-family: var(--font-family);
}

.cookie-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.cookie-content a {
    color: var(--text-main);
    text-decoration: underline;
}

.cookie-content a:hover {
    color: #fff;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
}

.cookie-actions button {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn-accept {
    background: var(--text-main);
    color: var(--bg-color);
    border: none;
}

.cookie-btn-accept:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.cookie-btn-decline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

@media (max-width: 768px) {
    #cookie-banner {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .cookie-actions {
        flex-direction: column;
    }

    .cookie-actions button {
        width: 100%;
    }
}

/* Services Section Layout Tweak */
#services {
    position: relative;
    z-index: 20;
    margin-top: -30vh;
    /* Pull up closer to the VR mask shape */
    padding-top: 15rem;
    /* Restore spacing internally so content isn't hidden */
}

/* Ensure smooth transform for the video scaling */
/* Cleaned up duplicate block */
/* -------------------------------------------------------------
   MOBILE OPTIMIZATION OVERRIDES (Max-Width: 768px)
   "Functionality Over Everything"
   ------------------------------------------------------------- */
@media (max-width: 768px) {

    /* 1. DISABLE HEAVY ANIMATIONS & CANVAS - RE-ENABLED for Mobile Scroll Sequence */
    /* #hero-canvas,
    #originals-canvas,
    .scroll-indicator,
    #video-scroll-arrow {
        display: none !important;
    } */

    /* 2. LAYOUT RESET (Natural Scrolling) - RE-ENABLED Sticky for Mobile */
    /* .scroll-container,
    #originals-scroll-container,
    .hero {
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
    }

    .sticky-wrapper {
        position: relative !important;
        height: 100vh !important;
        top: 0 !important;
    } */

    /* 3. STATIC BACKGROUNDS - DISABLED to allow Canvas */
    .mobile-bg {
        display: none !important;
    }

    /* 4. CONTENT VISIBILITY (Optimize for Mobile but allow Animation) */
    .hero-content-layer,
    #originals-text-layer,
    #originals-contact-layer,
    #scrolly-footer,
    #anim-vision-layer {
        pointer-events: auto !important;
        padding: 4rem 1.5rem;
    }

    /* Specific tweaks for Hero Content Title */
    .hero-content h1 {
        font-size: 3rem;
        /* Optimized for mobile */
        letter-spacing: -1px;
        line-height: 1.1;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Vision Layer - Clean Text Block */
    #vision-title {
        font-size: 2.5rem;
    }

    #vision-text {
        font-size: 1rem;
        line-height: 1.6;
    }

    /* Originals / Vivaldi */
    #vivaldi-content-layer {
        padding: 4rem 1.5rem;
        z-index: 20;
    }

    /* Footer */
    footer#scrolly-footer {
        position: relative;
        z-index: 20;
        padding: 3rem 1.5rem;
    }

    /* RESTORE OVERLAYS for Visual Quality */
    #white-bg-layer,
    .video-gradient-overlay {
        display: block !important;
    }

    #originals-white-overlay,
    #originals-dark-overlay {
        display: block !important;
    }

    /* Menu override */
    .menu-trigger {
        opacity: 1 !important;
    }

    /* Carousel / Cards sizing */
    .snap-center {
        min-width: 85vw !important;
    }

    /* Force Dark Text on White Sections */
    .text-stone-900-mobile {
        color: #1c1917 !important;
    }
}

/* Helper Class for Mobile Images (Hidden on Desktop) */
.mobile-bg {
    display: none;
}