:root,
[data-theme="dark"] {
    /* Color Palette - Onyx & Gold & Ruby */
    --gold-primary: #D4AF37;
    --gold-light: #F3E5AB;
    --gold-dark: #AA8222;
    --gold-gradient: linear-gradient(135deg, #b48512 0%, #f5d46c 50%, #a8790b 100%);
    --gold-gradient-text: linear-gradient(to right, #b48512, #f5d46c, #a8790b);
    
    --ruby-primary: #E63946;
    --ruby-dark: #A50B0B;
    --ruby-glow: rgba(230, 57, 70, 0.4);
    
    --bg-onyx: #050505;
    --bg-dark: #0A0A0A;
    --bg-card: rgba(20, 20, 20, 0.7);
    
    --text-white: #F5F5F7;
    --text-dark: #F5F5F7;
    --text-muted: #A1A1A6;
    
    /* Typography */
    --font-heading: 'Cinzel', serif;
    --font-body: 'Outfit', sans-serif;
    
    /* Glassmorphism */
    --glass-bg: rgba(15, 15, 15, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.03);
    
    /* Animations */
    --transition-smooth: 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    background-color: #050505; /* Prevent white flash before body renders */
    color-scheme: dark;        /* Tell browser this is always dark */
}

* {
    box-sizing: inherit;
}

::selection {
    background: var(--gold-primary);
    color: #000;
}

body {
    font-family: var(--font-body);
    color: var(--text-white);
    background-color: var(--bg-onyx);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

#particles-canvas, #dust-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* =========================================
   ANIMATED BACKGROUND
   ========================================= */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at center, #111111 0%, #050505 100%);
}

.light-streak {
    position: absolute;
    filter: blur(100px);
    opacity: 0.3;
    border-radius: 50%;
    animation: float 20s infinite alternate ease-in-out;
}

.streak-1 {
    width: 700px;
    height: 400px;
    background: radial-gradient(circle, var(--gold-dark) 0%, transparent 75%);
    top: -150px;
    left: -250px;
}

.streak-2 {
    width: 600px;
    height: 500px;
    background: radial-gradient(circle, rgba(165, 11, 11, 0.2) 0%, transparent 75%);
    bottom: -200px;
    right: -150px;
    animation-delay: -7s;
}

.streak-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 75%);
    top: 40%;
    left: 30%;
    animation-delay: -12s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
    100% { transform: translate(-40px, -60px) scale(0.95); }
}

/* =========================================
   GLASS LAYOUT
   ========================================= */
.glass-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 4rem;
    max-width: 900px;
    width: 92%;
    margin: 3rem 0;
    box-shadow: var(--glass-shadow);
    text-align: center;
    position: relative;
    z-index: 10;
}

/* =========================================
   HEADER & LOGO
   ========================================= */
.header {
    margin-bottom: 3rem;
}

.logo-container {
    width: 320px;
    margin: 0 auto 2rem auto;
}

.logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    mix-blend-mode: screen;
    filter: drop-shadow(0px 0px 15px rgba(212, 175, 55, 0.3));
    transition: var(--transition-smooth);
}

/* =========================================
   HERO SECTION
   ========================================= */
.headline {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    background: var(--gold-gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.sub-headline {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.slogan {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--gold-primary);
    letter-spacing: 0.1em;
    font-weight: 500;
    margin-bottom: 2.5rem;
    min-height: 2.5rem; /* Prevent layout shift during typing */
}

/* Global Link Smoothing */
a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--gold-light);
}

/* =========================================
   WAITLIST FORM & REFERRAL
   ========================================= */
.waitlist-wrapper {
    max-width: 550px;
    margin: 0 auto 3rem auto;
}

.input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 6px;
    transition: var(--transition-smooth);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.input-group:focus-within {
    border-color: var(--gold-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15), inset 0 2px 4px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 0.05);
}

input[type="email"] {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0 1.5rem;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
}

::placeholder {
    color: #666;
}

/* Buttons */
.btn-primary {
    background: var(--gold-gradient);
    border: none;
    border-radius: 50px;
    padding: 1rem 2rem;
    color: #000;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 20px rgba(180, 133, 18, 0.3);
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(180, 133, 18, 0.5);
}

/* Crimson Red Button Variation */
.red-btn {
    background: linear-gradient(135deg, #E63946, #8B0000) !important;
    color: #fff !important;
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3) !important;
}

.red-btn:hover {
    background: linear-gradient(135deg, #FF4D5A, #A50B0B) !important;
    box-shadow: 0 15px 30px rgba(230, 57, 70, 0.5) !important;
}

/* Success State & Waitlist Position */
.referral-success {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 1rem;
}

.waitlist-pos-badge {
    margin: 2rem 0;
    display: inline-flex;
    flex-direction: column;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 16px;
}

.waitlist-pos-badge span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.waitlist-pos-badge strong {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--gold-primary);
}

.copy-link-box {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.copy-link-box input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.8rem;
    flex: 1;
    color: var(--gold-light);
    font-family: monospace;
}

/* =========================================
   MARQUEE TICKER
   ========================================= */
.marquee-wrapper {
    width: 100%;
    overflow: hidden;
    margin: 4rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(212, 175, 55, 0.02);
}

.marquee span {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--gold-dark);
    margin-right: 2rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee { animation: marquee 30s linear infinite; white-space: nowrap; display: inline-block; }

/* =========================================
   FEATURE CARDS
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold-primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(212, 175, 55, 0.1);
}

.feature-icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: var(--gold-primary);
    font-size: 1.5rem;
}

.feature-card h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* =========================================
   ACCORDION (FAQ)
   ========================================= */
.accordion-section {
    max-width: 700px;
    margin: 0 auto 4rem auto;
    text-align: left;
}

.accordion-item {
    border-bottom: 1px solid var(--glass-border);
}

.accordion-header {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: var(--text-white);
    font-size: 1.1rem;
    font-family: var(--font-body);
}

.accordion-header:hover { color: var(--gold-primary); }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.accordion-item.active .accordion-content { max-height: 200px; }
.accordion-content p {
    padding-bottom: 1.5rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* =========================================
   COUNTDOWN TIMER
   ========================================= */
.launching-section { margin-top: 4rem; }
.launching-divider { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.launching-divider .line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--glass-border), transparent); }
.launching-divider .text { font-family: var(--font-heading); color: var(--gold-primary); letter-spacing: 0.2em; font-size: 0.9rem; }

.countdown-container { display: flex; justify-content: center; gap: 2rem; }
.time-val {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    min-width: 80px;
    margin-bottom: 0.5rem;
    display: block;
}
.time-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* =========================================
   FOOTER
   ========================================= */
.footer {
    padding-top: 3rem;
    border-top: 1px solid var(--glass-border);
}

.social-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.social-links a { color: var(--text-muted); font-size: 1.2rem; transition: var(--transition-smooth); }
.social-links a:hover { color: var(--gold-primary); transform: translateY(-3px); }

.copyright { font-size: 0.85rem; color: #444; }
.geo-tag { margin-top: 1rem; font-size: 0.7rem; color: #333; font-family: monospace; }

/* =========================================
   MISC EFFECTS
   ========================================= */
.massive-watermark {
    font-family: var(--font-heading);
    position: fixed;
    top: 50%;
    left: 0;
    transform: translate(-10vw, -50%);
    font-size: 35vw;
    font-weight: 700;
    color: rgba(212, 175, 55, 0.015);
    white-space: nowrap;
    z-index: -1;
    pointer-events: none;
}

.mouse-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: screen;
}

/* Exit Intent Modal */
.exit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: none; /* Changed from hidden class to display: none */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.exit-modal-content {
    max-width: 500px;
    width: 90%;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.exit-modal.active .exit-modal-content {
    transform: translateY(0);
}

/* Animations */
.fade-in, .slide-up { opacity: 0; }
.fade-in.visible { animation: fadeIn 1s forwards; }
.slide-up.visible { animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile Optimization */
@media (max-width: 768px) {
    body { padding: 1rem 0; }
    .glass-wrapper { padding: 2rem 1.5rem; width: 95%; margin: 1rem 0; }
    .headline { font-size: 2.2rem; }
    .features-grid { grid-template-columns: 1fr; gap: 1rem; }
    .logo-container { width: 220px; }
    .countdown-container { gap: 1rem; }
    .time-val { font-size: 1.5rem; min-width: 55px; padding: 0.8rem; }
    .slogan { font-size: 1.4rem; }
    .waitlist-pos-badge { padding: 0.8rem 1.5rem; }
    .waitlist-pos-badge strong { font-size: 2rem; }
}

@media (max-width: 400px) {
    .headline { font-size: 1.8rem; }
    .glass-wrapper { padding: 1.5rem 1rem; }
    .time-val { font-size: 1.2rem; min-width: 50px; }
}
