@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Tajawal:wght@200;300;400;500;700&display=swap');

:root {
    /* VIP Royal Palette */
    --amethyst: #1C0F24;
    --dark-amethyst: #110916;
    --gold: #D4AF37;
    --gold-light: #F3E5AB;
    --text-light: #F9F6F0;
    
    --font-serif: 'Amiri', serif;
    --font-sans: 'Tajawal', sans-serif;
    --font-eng: 'Playfair Display', serif;
    
    --ease-vip: cubic-bezier(0.77, 0, 0.175, 1);
}

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

body, html {
    background-color: var(--dark-amethyst);
    color: var(--text-light);
    font-family: var(--font-sans);
    line-height: 1.6;
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--dark-amethyst); }
::-webkit-scrollbar-thumb { background: var(--gold); }

/* =========================================
   0. FLOATING GOLD DUST
   ========================================= */
#gold-dust-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.gold-particle {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle, var(--gold-light) 0%, var(--gold) 40%, transparent 100%);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp linear infinite, twinkle linear infinite;
}

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

@keyframes twinkle {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.5) blur(1px); }
}

/* =========================================
   1. THE ECLIPSE ENTRANCE
   ========================================= */
.eclipse-entrance {
    position: fixed;
    inset: 0;
    background: var(--dark-amethyst);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s var(--ease-vip);
}

.eclipse-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sun {
    position: absolute;
    width: 200px; height: 200px;
    background: var(--gold);
    border-radius: 50%;
    box-shadow: 0 0 60px var(--gold);
}

.moon {
    position: absolute;
    width: 204px; height: 204px;
    background: var(--dark-amethyst);
    border-radius: 50%;
    left: 0; /* Starts covering the sun perfectly */
    transition: left 3s cubic-bezier(0.25, 1, 0.5, 1);
}

.vip-logo {
    position: absolute;
    height: 120px;
    border-radius: 50%;
    filter: invert(1) brightness(0.8) sepia(1) hue-rotate(5deg) saturate(3); /* Make logo gold-ish */
    opacity: 0;
    transform: translateY(0);
    transition: all 2s ease 1s;
    z-index: 10;
}

.entrance-brand-name {
    position: absolute;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--gold);
    opacity: 0;
    transform: translateY(30px);
    transition: all 2s ease 1.5s;
    z-index: 10;
    letter-spacing: 2px;
}

/* Eclipse Sparks */
.eclipse-sparks {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}
.spark {
    position: absolute;
    width: 3px; height: 15px;
    background: var(--gold-light);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px var(--gold-light);
}
.eclipse-entrance.active .spark {
    animation: shootSpark 1.5s ease-out forwards 0.5s;
}

.s1 { top: 50%; left: 50%; transform: rotate(45deg); }
.s2 { top: 50%; left: 50%; transform: rotate(135deg); }
.s3 { top: 50%; left: 50%; transform: rotate(225deg); }
.s4 { top: 50%; left: 50%; transform: rotate(315deg); }
.s5 { top: 50%; left: 50%; transform: rotate(0deg); }

@keyframes shootSpark {
    0% { opacity: 1; transform: rotate(var(--rot)) translateY(0) scale(1); }
    100% { opacity: 0; transform: rotate(var(--rot)) translateY(-150px) scale(0); }
}

.eclipse-entrance.active .moon { left: 150px; } /* Moon slides away */
.eclipse-entrance.active .vip-logo { opacity: 1; transform: translateY(-20px); }
.eclipse-entrance.active .entrance-brand-name { opacity: 1; transform: translateY(50px); }

.eclipse-entrance.done {
    opacity: 0;
    pointer-events: none;
}

/* =========================================
   2. DYNAMIC ISLAND (Sticky Top Nav)
   ========================================= */
.dynamic-island-wrapper {
    position: fixed;
    top: 2rem;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

.dynamic-island {
    background: rgba(17, 9, 22, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 40px;
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    pointer-events: all;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.5s var(--ease-vip);
}

/* Shrink state when scrolling */
.dynamic-island.scrolled {
    padding: 0.5rem 1rem;
    gap: 1.5rem;
    transform: scale(0.9);
}

.island-logo {
    font-family: var(--font-eng);
    font-size: 1.2rem;
    color: var(--gold);
    font-weight: 700;
}

.island-list {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.island-btn {
    background: transparent;
    border: none;
    color: rgba(249, 246, 240, 0.5);
    font-family: var(--font-sans);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.island-btn:hover { color: var(--text-light); }
.island-btn.active { color: var(--gold); font-weight: 700; }

.island-cart {
    background: transparent;
    border: none;
    color: var(--gold);
    font-size: 1.2rem;
    cursor: pointer;
}

/* =========================================
   3. THE STICKY DECK (Cards)
   ========================================= */
.stack-deck {
    position: relative;
    /* Extra padding at bottom so the last card has space to scroll */
    padding-bottom: 50vh; 
}

.stack-card {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Box shadow to cast a shadow on the card below it */
    box-shadow: 0 -20px 50px rgba(0,0,0,0.8);
    /* Border top for crisp separation */
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.bg-amethyst { background: var(--amethyst); }
.bg-dark { background: var(--dark-amethyst); }

.card-inner {
    display: flex;
    align-items: center;
    gap: 5vw;
    max-width: 1200px;
    width: 100%;
    padding: 0 5vw;
}

.card-inner.reverse {
    flex-direction: row-reverse;
}

.card-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    border-radius: 20px;
    overflow: hidden; /* For glare */
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    max-width: 500px; /* Constrain container so glare follows image */
    margin: 0 auto;
}

/* Holographic Glare Effect */
.card-glare {
    position: absolute;
    top: -50%; left: -100%;
    width: 50%; height: 200%;
    background: linear-gradient(to right, 
        rgba(255,255,255,0) 0%,
        rgba(212, 175, 55, 0.2) 40%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(212, 175, 55, 0.2) 60%,
        rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
}

.stack-card.active .card-glare {
    animation: sweepGlare 1.5s ease-in-out forwards 0.2s;
}

@keyframes sweepGlare {
    0% { left: -100%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: 200%; opacity: 0; }
}

/* The dish image logic */
.card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.card-content {
    flex: 1;
}

.card-tag {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
}

.card-title {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 5vw, 4.5rem);
    color: var(--gold-light);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.card-desc {
    font-size: 1.1rem;
    color: rgba(249, 246, 240, 0.7);
    margin-bottom: 2.5rem;
    max-width: 450px;
}

.card-action {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.card-price {
    font-family: var(--font-eng);
    font-size: 1.8rem;
    color: var(--gold);
}

.add-btn {
    width: 50px; height: 50px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--dark-amethyst);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    transition: transform 0.3s ease;
}
.add-btn:hover { transform: scale(1.1); }


/* Optional: Shadow overlay for depth */
/* As you scroll down, a dark gradient could appear over the current card before the next card covers it, but native box-shadow on the overlapping card usually suffices. */

/* Footer Card */
.footer-card {
    height: 50vh;
}
.footer-content {
    text-align: center;
    width: 100%;
}
.footer-logo {
    height: 100px;
    border-radius: 50%;
    filter: invert(1) brightness(0.8) sepia(1) hue-rotate(5deg) saturate(3);
    margin-bottom: 2rem;
}
.footer-content p {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold);
}

/* =========================================
   4. MOBILE ADJUSTMENTS
   ========================================= */
@media (max-width: 768px) {
    .dynamic-island-wrapper { top: 1rem; }
    
    .dynamic-island {
        padding: 0.6rem 1rem;
        gap: 1rem;
    }
    .island-logo { display: none; }
    .island-list { gap: 1rem; }
    
    .card-inner, .card-inner.reverse {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .card-visual img {
        max-width: 300px;
    }
    
    .card-desc {
        margin: 0 auto 2rem auto;
    }
    
    .card-action {
        justify-content: center;
    }
    
    .card-title {
        font-size: 2.8rem;
    }
}
