/* RESET & FONTS */
:root {
    --bg-color: #050505;
    --text-color: #e0e0e0;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    /* 1. The Fallback Color (Dark Blue) - Shows while image loads */
    background-color: #050a14;

    /* 2. The Main Image (This must be defined AFTER the color) */
    background-image: url('https://cdn.corenexis.com/files/b/8873895168.jpg');
    
    /* 3. Positioning fixes */
    background-size: cover;       
    background-position: center top; 
    background-attachment: fixed; /* Keeps image still while scrolling */
    background-repeat: no-repeat;
    
    /* 4. Layout & Font Defaults */
    min-height: 100vh;
    margin: 0;
    color: #000000; /* Sets default text to BLACK */
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

/* BACKGROUND STARS EFFECT */
.stars {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 3px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 2px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    z-index: -1;
    opacity: 0.6;
}

/* NAVBAR */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.2rem;
}

.nav-buttons { display: flex; gap: 10px; align-items: center; }

.icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex; align-items: center; justify-content: center;
    color: white; text-decoration: none;
    transition: 0.3s;
}

.btn-primary {
    background: white; color: black;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* HERO SECTION */
.hero {
    text-align: center;
    padding: 100px 20px;
}

h1, h2 {
    font-family: var(--font-serif);
    font-weight: 400;
}

h1 { font-size: 3.5rem; margin-bottom: 30px; }
h2 { font-size: 2.5rem; margin-bottom: 20px; text-align: center; }
em { font-style: italic; }

/* COPY ADDRESS BOX */
.copy-container {
    background: rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    padding: 5px 5px 5px 20px;
    border-radius: 12px;
    margin-top: 20px;
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
}

.copy-container span {
    font-family: monospace;
    margin-right: 15px;
    color: #ccc;
    font-size: 0.9rem;
}

.copy-container button {
    background: #e0e0e0;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* SECTIONS */
.narrative, .memes, .roadmap {
    padding: 80px 20px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.narrative p {
    max-width: 600px;
    margin: 0 auto 40px;
    color: #a0a0a0;
}

.image-container img {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
}

.meme-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Zooms image to fill the square perfectly */
    opacity: 0.9;
    transition: transform 0.3s ease;
    
    /* Bubble Animation */
    animation: bubble-pulse 3s ease-in-out infinite;
}

/* VERTICAL ROADMAP */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
}

/* The vertical line */
.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.2);
    top: 0; bottom: 0; left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: transparent;
    width: 50%;
    text-align: left;
}

.left { left: 0; }
.right { left: 50%; }

/* --- CARD BOX STYLE --- */
.timeline-item .content {
    padding: 20px 30px;
    /* Dark Glass Background */
    background: rgba(0, 0, 0, 0.6); 
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(5px);
}

/* --- TEXT VISIBILITY FIX --- */
/* 1. Phase Label (e.g. PHASE 1) */
.timeline-item .phase {
    color: #38bdf8 !important; /* Bright Blue */
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    display: block;
}

/* 2. Main Title (e.g. Freeze & Launch) */
.timeline-item h3 {
    color: #ffffff !important; /* Pure White */
    font-size: 1.4rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* 3. Description Text */
.timeline-item p {
    color: #e0e0e0 !important; /* Light Grey */
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Dots on the line */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    right: -6px; top: 50%; 
    background-color: #38bdf8; /* Blue Dot */
    border: 2px solid white;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px #38bdf8;
}

.right::after { left: -6px; }

/* FOOTER */
.glass-footer {
    margin-top: 50px;
    padding: 60px 20px;
    text-align: center;
    background: linear-gradient(transparent, rgba(255,255,255,0.05));
    border-top: 1px solid var(--glass-border);
}

.btn-white {
    background: white; color: black;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin: 20px 5px;
}

/* Center the buttons in the footer */
.glass-footer .nav-buttons {
    justify-content: center;
    margin-bottom: 20px;
}
.copyright { margin-top: 30px; color: #555; font-size: 0.8rem; }
/* --- BUBBLE ANIMATION FOR MEMES --- */

/* 1. Define the expanding/shrinking motion */
@keyframes bubble-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); } /* Expands slightly */
    100% { transform: scale(1); }   /* Shrinks back */
}

/* 2. Apply it to the meme images */
.meme-card img {
    animation: bubble-pulse 3s ease-in-out infinite;
}

/* 3. Stagger the timing so they look like independent bubbles */
.meme-card:nth-child(1) img {
    animation-delay: 0s;
}
.meme-card:nth-child(2) img {
    animation-delay: 1s; /* Starts 1 second later */
}
.meme-card:nth-child(3) img {
    animation-delay: 2s; /* Starts 2 seconds later */
}

/* --- SCROLL ANIMATION TRIGGER --- */

/* 1. Initial State: Hidden and pushed down */
.scroll-trigger {
    opacity: 0;
    transform: translateY(100px); /* Starts 100px lower */
    transition: all 1s ease-out; /* A smooth 1-second animation */
}

/* 2. Active State: Visible and in place (added by JS) */
.scroll-trigger.active {
    opacity: 1;
    transform: translateY(0); /* Moves back to original position */
}

/* --- ROADMAP JIGGLE ANIMATION --- */

/* 1. Initial State: Hidden and pushed to the side */
.timeline-item .content {
    opacity: 0;
    transition: opacity 0.3s;
}

/* Left items start slightly to the left */
.timeline-item.left .content {
    transform: translateX(-50px);
}

/* Right items start slightly to the right */
.timeline-item.right .content {
    transform: translateX(50px);
}

/* 2. The Jiggle Animation (Keyframes) */
@keyframes jiggleIn {
    0% { transform: translateX(var(--start-x)); opacity: 0; }
    60% { transform: translateX(var(--bounce-x)); opacity: 1; } /* Overshoot */
    80% { transform: translateX(var(--settle-x)); } /* Correct back */
    100% { transform: translateX(0); opacity: 1; } /* Final spot */
}

/* 3. Active State (Triggered by Scroll) */
.timeline-item.active.left .content {
    --start-x: -100px;
    --bounce-x: 15px;  /* Jiggle right */
    --settle-x: -5px;  /* Jiggle left */
    animation: jiggleIn 0.8s ease-out forwards;
}

.timeline-item.active.right .content {
    --start-x: 100px;
    --bounce-x: -15px; /* Jiggle left */
    --settle-x: 5px;   /* Jiggle right */
    animation: jiggleIn 0.8s ease-out forwards;
}

/* Add this under the existing .meme-card:nth-child rules */

.meme-card:nth-child(4) img {
    animation-delay: 1.5s; /* Starts at a different time than the others */
}

/* --- ROBUST MEME SECTION (Replaces all old meme/banner code) --- */

/* 1. The Grid (Top Row) */
.meme-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.meme-card {
    /* FORCE A SIZE so it never collapses */
    width: 250px;       
    height: 250px;      
    background-color: #1a1a1a; /* Dark grey placeholder */
    border-radius: 15px;
    overflow: hidden;
    position: relative; 
    border: 1px solid rgba(255,255,255,0.1);
}

.meme-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    opacity: 0.9;
    transition: transform 0.3s ease;
    
    /* Bubble Animation */
    animation: bubble-pulse 3s ease-in-out infinite;
}

/* 2. The Wide Banner (Bottom Row) */
.meme-banner {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    padding: 0 20px;
    width: 100%;
}

.meme-banner img {
    width: 100%;
    max-width: 900px;
    
    /* FORCE HEIGHT for the banner */
    min-height: 300px; 
    background-color: #1a1a1a; 
    object-fit: cover;
    
    height: auto;
    border-radius: 15px;
    opacity: 0.9;
    border: 1px solid rgba(255,255,255,0.1);

    /* Bubble Animation */
    animation: bubble-pulse 3s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* 3. Unified Hover Effects */
.meme-card img:hover, .meme-banner img:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* --- FALLING SNOW ANIMATION --- */
.snowflake {
    position: fixed;
    top: -10px;
    color: white;
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 1px #000;
    z-index: 1; /* Sit behind the content but in front of background */
    user-select: none;
    cursor: default;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
    opacity: 0.3; /* Subtle */
}

@keyframes snowflakes-fall {
    0% { top: -10%; }
    100% { top: 100%; }
}

@keyframes snowflakes-shake {
    0% { transform: translateX(0px); }
    50% { transform: translateX(80px); }
    100% { transform: translateX(0px); }
}

/* Create different speeds for random feel */
.snowflake:nth-of-type(0) { left: 1%; animation-delay: 0s, 0s; }
.snowflake:nth-of-type(1) { left: 10%; animation-delay: 1s, 1s; }
.snowflake:nth-of-type(2) { left: 20%; animation-delay: 6s, .5s; }
.snowflake:nth-of-type(3) { left: 30%; animation-delay: 4s, 2s; }
.snowflake:nth-of-type(4) { left: 40%; animation-delay: 2s, 2s; }
.snowflake:nth-of-type(5) { left: 50%; animation-delay: 8s, 3s; }
.snowflake:nth-of-type(6) { left: 60%; animation-delay: 6s, 2s; }
.snowflake:nth-of-type(7) { left: 70%; animation-delay: 2.5s, 1s; }
.snowflake:nth-of-type(8) { left: 80%; animation-delay: 1s, 0s; }
.snowflake:nth-of-type(9) { left: 90%; animation-delay: 3s, 1.5s; }

/* --- INFINITE MARQUEE --- */
.marquee-container {
    display: block;
    width: 100%;
    background: #38bdf8; /* Bright Blue */
    color: #000;          /* Black text */
    text-decoration: none;
    overflow: hidden;
    padding: 10px 0;
    position: relative;
    z-index: 200; /* Ensures it sits on top of everything */
    border-bottom: 1px solid rgba(255,255,255,0.2);
    transition: background 0.3s;
}

.marquee-container:hover {
    background: #ffffff; /* Turns white on hover */
}

.marquee-track {
    display: flex;
    gap: 50px; /* Space between the repeated sentences */
    width: max-content;
    animation: scroll-left 20s linear infinite;
}

.marquee-track span {
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Seamless loop */
}

/* --- FALLING SNOW ANIMATION --- */
.snowflake {
    position: fixed;
    top: -10px;
    color: #fff;
    font-size: 1.2em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px #000;
    
    /* IMPORTANT: This ensures snow doesn't block clicks */
    pointer-events: none;
    z-index: 9999; /* Sit on top of everything */
    
    user-select: none;
    cursor: default;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
    opacity: 0.5; 
}

/* Keyframes for falling down */
@keyframes snowflakes-fall {
    0% { top: -10%; }
    100% { top: 100%; }
}

/* Keyframes for swaying side to side */
@keyframes snowflakes-shake {
    0% { transform: translateX(0px); }
    50% { transform: translateX(80px); }
    100% { transform: translateX(0px); }
}

/* Randomize the speed and delay for each flake */
.snowflake:nth-of-type(0) { left: 1%; animation-delay: 0s, 0s; }
.snowflake:nth-of-type(1) { left: 10%; animation-delay: 1s, 1s; }
.snowflake:nth-of-type(2) { left: 20%; animation-delay: 6s, .5s; }
.snowflake:nth-of-type(3) { left: 30%; animation-delay: 4s, 2s; }
.snowflake:nth-of-type(4) { left: 40%; animation-delay: 2s, 2s; }
.snowflake:nth-of-type(5) { left: 50%; animation-delay: 8s, 3s; }
.snowflake:nth-of-type(6) { left: 60%; animation-delay: 6s, 2s; }
.snowflake:nth-of-type(7) { left: 70%; animation-delay: 2.5s, 1s; }
.snowflake:nth-of-type(8) { left: 80%; animation-delay: 1s, 0s; }
.snowflake:nth-of-type(9) { left: 90%; animation-delay: 3s, 1.5s; }

/* --- FORCE BLACK TEXT FOR SNOW BACKGROUND --- */
h1, h2, h3, h4, p, li {
    color: #000000 !important;
    text-shadow: none !important;
}

/* Fix the Copy Address Box */
.copy-container span {
    color: #000000 !important;
    font-weight: 800;
}
.copy-container {
    background: rgba(255, 255, 255, 0.6); /* Make box clearer */
    border: 1px solid rgba(0,0,0,0.2);
}