/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    /* Hide horizontal scroll */
    overflow-x: hidden;
}

/* This creates the necessary scrollable height. 
   400vh gives enough scroll distance for the 4 frame animations */
.scroll-container {
    height: 400vh;
    position: relative;
    width: 100%;
}

.sticky-view {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    background: #000;
}

#animation-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* The canvas will perfectly contain the frames using JS calculations */
}

/* Overlay UI */
.overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 8vh;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 30%, transparent 100%);
    pointer-events: none; /* Let clicks pass through */
}

.welcome-text {
    text-align: center;
    text-shadow: 0px 4px 15px rgba(0,0,0,0.8);
}

h1 {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: 8px;
    margin-bottom: 0px;
    opacity: 0;
    animation: fadeInTop 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.5s;
}

h2 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 12px;
    margin-bottom: 30px;
    color: #cca66c;
    opacity: 0;
    animation: fadeInTop 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.7s;
}

.scroll-prompt {
    font-size: 0.9rem;
    letter-spacing: 3px;
    opacity: 0;
    color: rgba(255, 255, 255, 0.6);
    animation: pulse 2.5s infinite ease-in-out;
    animation-delay: 1.5s;
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #cca66c, transparent);
    margin: 15px auto 0;
    opacity: 0;
    animation: growLine 2s infinite ease-in-out;
    animation-delay: 1.5s;
}

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

@keyframes pulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { opacity: 0.3; }
}

@keyframes growLine {
    0% { height: 0px; opacity: 0.2; transform: translateY(0px) }
    50% { height: 40px; opacity: 0.8; transform: translateY(5px) }
    100% { height: 0px; opacity: 0.2; transform: translateY(10px) }
}

/* Leader Line Animation styles for Nav Menu Tooltips */
.leader-line {
    width: 1.5px;
    height: 0px;
    background-color: #cca66c;
    transition: height 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.group:hover .leader-line {
    height: 85px; /* Pull the tooltip container below the secondary slogan header on desktop */
}
@media (max-width: 768px) {
    .group:hover .leader-line {
        height: 65px; /* Pull the tooltip container below the secondary slogan header on mobile */
    }
}

.leader-box {
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s;
}
.group:hover .leader-box {
    opacity: 1;
    transform: translateY(0);
}

/* For the white theme header below */
.leader-line-light {
    background-color: #1e3a8a; /* Tailwind blue-900 */
}

/* loading state */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050505;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease;
}

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

.loading-text {
    font-family: 'Inter', sans-serif;
    color: #cca66c;
    letter-spacing: 3px;
    font-size: 1rem;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Multi-language Support */
html[lang="en"] .lang-cn { display: none !important; }
html[lang="zh"] .lang-en { display: none !important; }

/* Special Promotion Tag Animation */
.promo-badge {
    position: relative;
    overflow: hidden;
    animation: promoFloat 3s ease-in-out infinite;
}

/* Shine Sweep Effect */
.promo-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: promoShine 4s infinite cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
}

.promo-badge:hover {
    animation-play-state: paused;
    transform: scale(1.02) translateY(-2px);
    box-shadow: 0 15px 30px rgba(220, 38, 38, 0.4);
}

@keyframes promoShine {
    0% { left: -150%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@keyframes promoFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50% { transform: translateY(-4px) rotate(1deg); }
}
