/* 
 * ========================================
 * HERO UPGRADE - HYBRID GLASSMORPHISM
 * ========================================
 * Theme: Futuristic, Smart, Warm, Welcoming
 * Inspiration: Linear, Family, Raycast
 */

:root {
    /* Base Hero Tokens (Light Mode Defaults) */
    --hero-bg: #ffffff;
    --hero-text: #0f172a;
    --hero-text-dim: rgba(15, 23, 42, 0.7);
    --hero-accent-gold: #f59e0b;
    --hero-accent-teal: #0ea5a4;
    --hero-accent-blue: #2563eb;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(15, 23, 42, 0.1);
    --glass-glow-gold: rgba(245, 158, 11, 0.1);
    --glass-glow-teal: rgba(14, 165, 164, 0.1);
    --mesh-opacity: 0.6;
    --mesh-blend: multiply;
    --hero-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --hero-shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
    --hero-offset: var(--header-height);
}

/* Dark Mode Overrides */
body.dark,
body[data-theme="dark"] {
    --hero-bg: #010409;
    --hero-text: #ffffff;
    --hero-text-dim: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-glow-gold: rgba(245, 158, 11, 0.2);
    --glass-glow-teal: rgba(14, 165, 164, 0.2);
    --mesh-opacity: 0.8;
    --mesh-blend: screen;
    --hero-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --hero-shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Mesh Gradient Background
   ======================================== */
.hero-upgrade {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--hero-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 0;
    /* Body already has padding, remove to prevent double offset */
    transition: background 0.5s ease;
}

.mesh-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: var(--mesh-opacity);
    transition: opacity 0.5s ease;
}

.mesh-point {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: var(--mesh-blend);
    opacity: 0.4;
    animation: mesh-float 25s infinite alternate ease-in-out;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.5s ease;
    will-change: transform;
    /* Performance Hint: Promotes to GPU layer */
}

/* Performance: Disable expensive animation if user prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mesh-point {
        animation: none;
        will-change: auto;
    }
}

.mesh-point-1 {
    background: radial-gradient(circle, var(--hero-accent-blue) 0%, transparent 70%);
    top: -10%;
    left: -10%;
}

.mesh-point-2 {
    background: radial-gradient(circle, var(--hero-accent-teal) 0%, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -7s;
}

.mesh-point-3 {
    background: radial-gradient(circle, var(--hero-accent-gold) 0%, transparent 70%);
    top: 40%;
    left: 40%;
    width: 50vw;
    height: 50vw;
    opacity: 0.2;
    animation-duration: 30s;
    animation-delay: -12s;
}

/* Add a subtle noisegrain overlay */
.hero-upgrade::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.04;
    z-index: 2;
    pointer-events: none;
}

@keyframes mesh-float {
    0% {
        transform: translate(0, 0) scale(1);
    }

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

/* ========================================
   Global Connection Lines
   ======================================== */
.global-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    z-index: 1;
    opacity: 0.5;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
}

/* ========================================
   Video Background
   ======================================== */
.video-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-background video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.55;
    /* Increased from 0.4 */
    filter: brightness(0.7) contrast(1.1);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0.35) 100%),
        radial-gradient(circle at center, transparent 0%, var(--hero-bg) 100%);
    z-index: 1;
    pointer-events: none;
    transition: background 0.5s ease;
}

/* ========================================
   Hero Content Layout
   ======================================== */
.hero-upgrade-container {
    position: relative;
    z-index: 2;
    max-width: var(--container-max-width);
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-3xl) var(--container-padding) var(--container-padding);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--spacing-3xl);
    align-items: center;
}

@media (max-width: 1024px) {
    .hero-upgrade-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-2xl);
    }
}

/* ========================================
   HUD-Style Countdown Badge (Overlay)
   ======================================== */
.hero-countdown-badge {
    margin-bottom: var(--spacing-2xl);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}


@media (max-width: 1024px) {
    .hero-countdown-badge {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .inline-countdown-banner {
        display: none !important;
    }
}



.badge-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--glass-bg);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    padding: 0.6rem 1.25rem;
    border-radius: 99px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

.hero-countdown-badge .event-icon {
    font-size: 1.25rem;
}

.hero-countdown-badge .event-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--hero-accent-teal);
    font-weight: 700;
}

.hero-countdown-badge .inline-countdown {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding-left: 1rem;
}

.hero-countdown-badge .unit-group {
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.hero-countdown-badge .countdown-value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: var(--hero-text);
    font-size: 1.1rem;
}

.hero-countdown-badge .countdown-unit {
    font-size: 0.65rem;
    color: var(--hero-text-dim);
    font-weight: 500;
}

body.dark .hero-countdown-badge .countdown-value,
body[data-theme="dark"] .hero-countdown-badge .countdown-value {
    color: #ffffff;
}

body.dark .hero-countdown-badge .countdown-unit,
body[data-theme="dark"] .hero-countdown-badge .countdown-unit {
    color: rgba(255, 255, 255, 0.85);
}

body.dark .hero-countdown-badge .inline-countdown,
body[data-theme="dark"] .hero-countdown-badge .inline-countdown {
    border-left-color: rgba(255, 255, 255, 0.25);
}

body.dark .hero-countdown-badge .event-label,
body[data-theme="dark"] .hero-countdown-badge .event-label {
    color: #8bf3f0;
}

.badge-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--hero-accent-teal);
    color: #ffffff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.badge-link:hover {
    transform: scale(1.1);
    background: #ffffff;
    color: var(--hero-accent-teal);
}

@media (max-width: 1024px) {
    .hero-countdown-badge {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .badge-content {
        gap: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .hero-countdown-badge .event-label {
        display: none;
    }
}

/* ========================================
   Smart Typography
   ======================================== */
.hero-main-text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.hero-slogan {
    font-family: 'Space Grotesk', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--hero-accent-gold);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.hero-slogan span {
    display: block;
}

.hero-slogan span+span {
    margin-top: 0.2rem;
}

@media (max-width: 768px) {
    .hero-slogan {
        font-size: 0.85rem;
    }
}

.hero-upgrade h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.05;
    font-weight: 800;
    color: var(--hero-text);
    letter-spacing: -0.03em;
    margin: 0;
    text-shadow: var(--hero-shadow, 0 10px 30px rgba(0, 0, 0, 0.1));
    transition: color 0.5s ease;
}

.hero-upgrade h1 span.gradient-text {
    background: linear-gradient(135deg, var(--hero-accent-teal) 0%, var(--hero-accent-blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.hero-description {
    font-size: var(--font-lg);
    color: var(--hero-text-dim);
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    text-shadow: var(--hero-shadow-sm, 0 4px 10px rgba(0, 0, 0, 0.05));
    transition: color 0.5s ease;
}

@media (max-width: 1024px) {
    .hero-description {
        margin: 0 auto var(--spacing-lg);
    }
}

/* ========================================
   Glassmorphism Actions
   ======================================== */
.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

@media (max-width: 1024px) {
    .hero-actions {
        justify-content: center;
    }
}

.btn-glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-glass::after {
    content: '';
    position: absolute;
    top: var(--y, 0px);
    left: var(--x, 0px);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-glass:hover::after {
    opacity: 1;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--hero-accent-teal);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(14, 165, 164, 0.3);
}

.btn-glass-primary {
    background: linear-gradient(135deg, var(--hero-accent-blue), #3b82f6);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-glass-primary:hover {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.5);
}

.btn-watch-story {
    border-color: rgba(245, 158, 11, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-watch-story::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.btn-watch-story:hover::before {
    transform: translateX(100%);
}

.btn-watch-story:hover {
    border-color: var(--hero-accent-gold);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.btn-watch-story svg {
    color: var(--hero-accent-gold);
    transition: transform 0.3s ease;
}

.btn-watch-story:hover svg {
    transform: scale(1.2);
}

/* ========================================
   Video Modal
   ======================================== */
.hero-video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-video-modal.active {
    display: flex;
    opacity: 1;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-player-wrapper {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
}

.video-player-wrapper iframe,
.video-player-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.hero-visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: var(--spacing-md);
    position: relative;
    height: 600px;
}

@media (max-width: 1024px) {
    .hero-upgrade {
        padding-top: 0;
        min-height: auto;
        padding-bottom: var(--spacing-3xl);
    }
}

@media (max-width: 768px) {
    .hero-visual-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        gap: var(--spacing-md);
        margin-top: var(--spacing-lg);
    }

    .card-1 {
        grid-column: 1;
        grid-row: 1;
        height: 350px;
    }

    .card-2 {
        grid-column: 1;
        grid-row: 2;
        height: 250px;
    }

    .card-3 {
        grid-column: 1;
        grid-row: 3;
        height: 250px;
    }
}

.bento-card {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.bento-card:hover {
    transform: scale(1.02) translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

/* Floating animation for cards */
.bento-card.float-1 {
    animation: card-float 6s infinite alternate ease-in-out;
}

.bento-card.float-2 {
    animation: card-float 7s infinite alternate-reverse ease-in-out;
}

.bento-card.float-3 {
    animation: card-float 8s infinite alternate ease-in-out;
    animation-delay: -2s;
}

@keyframes card-float {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-15px);
    }
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.8s ease;
}

.bento-card:hover .card-img {
    transform: scale(1.1);
    opacity: 1;
}

.card-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.card-2 {
    grid-column: 2;
    grid-row: 1;
}

.card-3 {
    grid-column: 2;
    grid-row: 2;
}

/* Glossy highlight on cards */
.bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%, transparent 60%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

/* Specific glows */
.card-1 {
    box-shadow: 0 0 50px var(--glass-glow-teal), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.card-2 {
    box-shadow: 0 0 50px var(--glass-glow-gold), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* ========================================
   Mobile Optimization
   ======================================== */
@media (max-width: 480px) {
    .hero-upgrade h1 {
        font-size: clamp(2.5rem, 10vw, 3.2rem);
    }

    .hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        padding: 0 var(--spacing-md);
        gap: var(--spacing-md);
    }

    .btn-glass {
        width: 100%;
        padding: 1.2rem;
        font-size: 1.1rem;
        justify-content: center;
    }

    .hero-visual-grid {
        padding: 0 var(--spacing-md);
    }
}

/* ========================================
   Scroll Indicator
   ======================================== */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 0.7;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 2px;
    height: 6px;
    background: #ffffff;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll-wheel 2s infinite ease-out;
}

@keyframes scroll-wheel {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, 15px);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

.scroll-text {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========================================
   Mobile Performance Optimization 
   ======================================== */
@media (max-width: 768px) {

    /* Reduce GPU load on mobile */
    .mesh-point {
        filter: blur(40px);
        /* Cheaper blur */
        animation: none;
        /* Save battery */
        will-change: auto;
    }

    /* Optimize glassmorphism */
    .badge-content {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--bg-glass);
        /* Semantic fallback */
    }
}