/* ========================================
    GLOBAL STYLES & VARIABLES
    ========================================
*/
:root {
    --color-dark: #121212; 
    --color-accent: #e53935; 
    --color-light-accent: #ff6666; 
    --color-text-light: #f0f0f0; 
    --color-text-dim: #9e9e9e; 
    --font-heading: 'MedievalSharp', cursive; 
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-dark);
    color: var(--color-text-light);
    font-family: var(--font-body);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden;
    visibility: hidden; 
}

body.loaded {
    visibility: visible;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading); 
    text-transform: uppercase;
    color: var(--color-text-light);
    letter-spacing: 2px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--color-accent);
}

p {
    color: var(--color-text-dim);
}

a {
    color: var(--color-light-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-text-light);
}

.small-text {
    font-size: 0.9rem;
    color: var(--color-text-dim);
    margin-top: 10px;
}

/* ========================================
    KEYFRAME ANIMATIONS
    ========================================
*/
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Floating Elements Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-7px); } 
    100% { transform: translateY(0px); }
}

/* Fade-In Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Apply Fade-In to all sections marked with data-animate="fade-in" */
[data-animate="fade-in"] {
    opacity: 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate="fade-in"].in-view {
    opacity: 1;
    transform: translateY(0);
}


/* ========================================
    BUTTON STYLES & FLOATING EFFECT
    ========================================
*/
.btn-primary, .btn-main-cta, .btn-secondary {
    padding: 12px 30px;
    border: 2px solid var(--color-accent);
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-main-cta {
    /* Floating animation */
    animation: float 4s ease-in-out infinite; 
}

.btn-primary, .btn-main-cta {
    background-color: var(--color-accent);
    color: var(--color-dark);
}

.btn-primary:hover, .btn-main-cta:hover {
    background-color: var(--color-dark);
    color: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    margin-top: 1.5rem;
}

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-dark);
}

/* ========================================
    PRE-LOADER (GATE OPENING) FIX
    ========================================
*/
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: var(--color-dark); 
    overflow: hidden;
}

.gate {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: #000;
    transition: transform 1.5s ease-in-out;
}

.gate-left {
    left: 0;
    border-right: 5px solid var(--color-accent);
}

.gate-right {
    right: 0;
    border-left: 5px solid var(--color-accent);
}

.loader-wrapper.hidden .gate-left {
    transform: translateX(-100%);
}

.loader-wrapper.hidden .gate-right {
    transform: translateX(100%);
}

.loader-logo {
    position: absolute;
    z-index: 10;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.5s ease 1s; 
}

.loader-wrapper.hidden .loader-logo {
    opacity: 0;
}

.loader-logo img {
    width: 100px; 
    height: auto;
    filter: drop-shadow(0 0 15px var(--color-accent));
    animation: float 3s ease-in-out infinite; 
}

/* ========================================
    NAVIGATION & HEADER
    ========================================
*/
.hero-section {
    /* Using a specific dark, fire-themed background */
    background: url('https://images.unsplash.com/photo-1517594422361-5eab2be771ad?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3w1NjY1NDZ8MHwxfHNlYXJjaHwzfHxkYXJrJTIwZmlyZXxlbnwwfDB8fHwxNjk5NTQ3Mjk5fDA&ixlib=rb-4.0.3&q=80&w=1920') no-repeat center center/cover;
    height: 100vh;
    /* FIX: Change display from column to use the space better */
    display: flex;
    flex-direction: column; /* Keep column layout */
    /* FIX: Align items to stretch vertically to push content down */
    justify-content: space-between;
    align-items: center;
    position: relative;
    text-align: center;
    padding-top: 20px;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75); 
    z-index: 1;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    z-index: 100;
    background-color: rgba(18, 18, 18, 0.9); 
}

.logo {
    height: 40px; 
    filter: drop-shadow(0 0 5px var(--color-accent));
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--color-text-light);
    font-weight: 500;
    text-transform: uppercase;
    padding: 5px;
    border-bottom: 2px solid transparent;
    font-family: var(--font-heading); 
}

.nav-links a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.burger-menu {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-accent);
}

/* FIX: Centering the Content Block */
.hero-content {
    z-index: 2;
    padding: 20px;
    max-width: 800px;
    /* NEW: Use flex for hero content to push everything to the center */
    flex-grow: 1; /* Allows it to take up available vertical space */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically in the available space */
    align-items: center;
    /* Push content down from fixed nav bar */
    margin-top: 60px; 
    margin-bottom: 60px;
}

.main-title {
    font-size: 6rem;
    color: var(--color-accent);
    line-height: 1;
    text-shadow: 0 0 20px rgba(229, 57, 53, 0.5); 
}

.subtitle {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-text-light);
}

.hero-content .description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.social-links a {
    margin: 0 10px;
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-text-dim);
}

.social-links a:hover {
    color: var(--color-accent);
}

.scroll-indicator {
    z-index: 2;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: var(--color-text-dim);
    animation: bounce 2s infinite;
}

.arrow-down {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 10px solid var(--color-accent);
    margin: 5px auto;
}

/* ========================================
    CONTENT SECTIONS
    ========================================
*/
.content-section {
    padding: 100px 0; 
    border-top: 1px solid rgba(229, 57, 53, 0.1);
}

/* NARRATIVE SECTION */
.narrative-section .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
    text-align: left;
}

.narrative-text {
    flex: 1;
}

.narrative-text h3 {
    color: var(--color-text-dim);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.narrative-text h2 {
    text-align: left;
    font-size: 2.2rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.narrative-text p {
    margin-bottom: 1rem;
}

.narrative-image {
    width: 40%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid var(--color-accent);
    transition: transform 0.5s ease;
    animation: float 6s ease-in-out infinite; 
}

.narrative-image:hover {
    transform: scale(1.05);
}

/* UTILITY SECTION */
.utility-section {
    text-align: center;
}

.utility-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--color-light-accent);
}

.utility-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 3rem;
}

.utility-card {
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 10px;
    border-top: 4px solid var(--color-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.utility-card:hover {
    transform: translateY(-8px);
    background-color: #2a2a2a;
}

.utility-card h4 {
    color: var(--color-accent);
    margin-bottom: 10px;
}

/* RARITY SECTION */
.rarity-section {
    background-color: #0d0d0d;
    text-align: center;
}

.rarity-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.rarity-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.rarity-card {
    background-color: #1e1e1e;
    padding: 20px;
    border-left: 3px solid var(--color-light-accent);
    border-radius: 5px;
}

.legend-callout {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    border: 2px dashed var(--color-accent);
    background-color: #180505;
}

.legend-callout h3 {
    color: var(--color-light-accent);
    margin-bottom: 10px;
}

/* ROADMAP SECTION */
.roadmap-section {
    background-color: var(--color-dark);
}

.roadmap-timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    padding-left: 20px;
    border-left: 2px solid var(--color-text-dim);
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
    padding-left: 30px;
}

.timeline-dot {
    position: absolute;
    left: -11px;
    top: 5px;
    width: 20px;
    height: 20px;
    background-color: var(--color-dark);
    border: 4px solid var(--color-accent);
    border-radius: 50%;
}

.timeline-item.current .timeline-dot {
    background-color: var(--color-accent);
    box-shadow: 0 0 15px var(--color-accent);
}

.timeline-item h4 {
    color: var(--color-light-accent);
    margin-bottom: 5px;
}

/* GALLERY SECTION & FLOATING ANIMATION */
.gallery-section {
    text-align: center;
    background-color: #0d0d0d;
}

.gallery-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 40px auto 60px;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 2px solid #2a2a2a;
    transition: transform 0.3s ease, border-color 0.3s ease;
    /* Apply float animation to NFTs */
    animation: float 5s ease-in-out infinite; 
}

/* Delay the float animation for a staggered effect */
.gallery-grid img:nth-child(2) { animation-delay: 0.5s; }
.gallery-grid img:nth-child(3) { animation-delay: 1s; }
.gallery-grid img:nth-child(4) { animation-delay: 0s; }
.gallery-grid img:nth-child(5) { animation-delay: 1.5s; }
.gallery-grid img:nth-child(6) { animation-delay: 2s; }


.gallery-grid img:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--color-light-accent);
}

/* FAQ SECTION */
.faq-section {
    text-align: center;
}

.faq-container {
    max-width: 900px;
    margin: 40px auto;
    text-align: left;
}

.faq-item {
    border-bottom: 1px solid rgba(229, 57, 53, 0.2);
    margin-bottom: 10px;
}

.faq-item h4 {
    padding: 20px;
    cursor: pointer;
    background-color: #1e1e1e;
    transition: background-color 0.3s ease;
    color: var(--color-text-light);
    font-size: 1.1rem;
    position: relative;
    font-family: var(--font-heading);
}

.faq-item h4::after {
    content: '+';
    position: absolute;
    right: 20px;
    color: var(--color-accent);
    transition: transform 0.3s ease;
}

.faq-item.active h4::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-item.active h4 {
    background-color: var(--color-accent);
    color: var(--color-dark);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    background-color: #1e1e1e;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-item.active .faq-answer {
    max-height: 500px; 
    padding: 20px;
}

/* TEAM SECTION */
.team-section {
    text-align: center;
    background-color: #1e1e1e;
}

.team-intro {
    margin-bottom: 40px;
    font-style: italic;
    color: var(--color-accent);
}

.team-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--color-accent);
    margin-bottom: 10px;
}

.team-member h4 {
    color: var(--color-text-light);
    margin-bottom: 5px;
}

/* ========================================
    FOOTER STYLES
    ========================================
*/
.footer {
    padding: 30px 0;
    background-color: #000;
    border-top: 3px solid var(--color-accent);
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-content p {
    color: var(--color-text-dim);
    margin: 5px 0;
}

.footer-links a {
    margin-left: 15px;
    color: var(--color-text-dim);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-accent);
}


/* ========================================
    RESPONSIVENESS (MOBILE STYLES)
    ========================================
*/
@media (max-width: 992px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px; 
        left: 0;
        width: 100%;
        background-color: rgba(18, 18, 18, 0.95);
        border-top: 1px solid var(--color-accent);
        padding: 20px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .burger-menu {
        display: block;
    }

    .main-title {
        font-size: 4rem;
    }

    .subtitle {
        font-size: 1.4rem;
    }
    
    .narrative-section .container {
        flex-direction: column;
        text-align: center;
    }

    .narrative-text, .narrative-image {
        width: 100%;
    }

    .narrative-text h2 {
        text-align: center;
    }

    .utility-grid, .rarity-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        flex-direction: column;
        gap: 30px;
    }

    .team-member {
        margin-bottom: 20px;
    }

    /* FOOTER MOBILE ADJUSTMENT */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        margin-top: 15px;
    }

    .footer-links a {
        margin: 0 5px;
        display: inline-block;
    }
}