@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Permanent+Marker&display=swap');

/* ==========================================================================
   CSS VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-base: #050209;
    --bg-surface: #0e0717;
    --bg-panel: rgba(18, 8, 30, 0.65);
    
    --color-orange: #ff5e00;
    --color-orange-glow: rgba(255, 94, 0, 0.35);
    --color-gold: #ffb700;
    --color-gold-glow: rgba(255, 183, 0, 0.25);
    --color-purple: #8a2be2;
    --color-purple-glow: rgba(138, 43, 226, 0.3);
    
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1aa;
    --text-muted: #6b7280;
    
    /* Typography */
    --font-primary: 'Outfit', sans-serif;
    --font-accent: 'Permanent Marker', cursive;
    
    /* Layout Details */
    --border-radius: 12px;
    --border-glow: 1px solid rgba(255, 255, 255, 0.08);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
    
    /* Z-Indices */
    --z-base: 1;
    --z-overlay: 10;
    --z-drawer: 100;
    --z-modal: 500;
    --z-agegate: 1000;
}

/* ==========================================================================
   BASE RESET & UTILITIES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-base);
    background-image: url('../assets/images/background_pattern.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-primary);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    position: relative;
}

main, 
.page-content {
    flex-grow: 1;
}

.hero-section {
    background-image: url('../assets/images/background_main.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    max-width: 1440px;
    margin: 0 auto;
}

/* Noise overlay for premium visual texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button {
    font-family: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   PREMIUM CUSTOM HEADER
   ========================================================================== */
header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-drawer);
    backdrop-filter: blur(12px);
    background: rgba(5, 2, 9, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

header.scrolled {
    background: rgba(5, 2, 9, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 8px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition-smooth);
    gap: 24px; /* Prevent elements from crowding each other */
}

header.scrolled .header-container {
    height: 70px;
}

/* Stylized Logo */
.logo {
    display: flex;
    align-items: center;
    position: relative;
    transition: var(--transition-smooth);
    margin-right: 30px; /* Space between logo and Home link */
}

.logo img {
    max-height: 60px; /* Make logo significantly larger */
    width: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 0 10px rgba(255, 94, 0, 0.12)); /* Soft brand glow */
}

header.scrolled .logo img {
    max-height: 48px;
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(255, 94, 0, 0.4));
}

/* Navigation Links */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-item {
    position: relative;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
}

/* Hand-Drawn Brush Stroke SVG Underline */
.brush-stroke {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    min-width: 48px;
    height: 12px;
    fill: var(--color-gold);
    opacity: 0;
    transform-origin: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    pointer-events: none;
}

.nav-item:hover .brush-stroke, 
.nav-item.active .brush-stroke {
    transform: translateX(-50%) scaleX(1.1);
    opacity: 1;
}

/* Active overrides logo yellow/orange vibe */
.nav-item.active .brush-stroke {
    fill: var(--color-orange);
    filter: drop-shadow(0 0 4px var(--color-orange));
}

/* Header Social Links */
.header-socials {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 40px; /* Enforces generous spacing between navigation links and socials */
    margin-right: 20px; /* Enforce spacing before Join our Discord button */
}

.socials-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-secondary); /* Brighter, more legible gray */
    text-transform: uppercase;
    white-space: nowrap;
    margin-right: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--color-gold);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.social-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.social-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 183, 0, 0.1);
    border-color: var(--color-gold);
    box-shadow: 0 0 15px var(--color-gold-glow);
    transform: translateY(-3px);
}

.social-icon:hover img {
    filter: brightness(1.2);
}

/* Header CTA Button - Join our Discord */
.btn-join {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: 30px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    background: rgba(9, 4, 18, 0.6);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 94, 0, 0.25), inset 0 0 8px rgba(255, 94, 0, 0.1);
    border: 2px solid var(--color-orange);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.btn-join::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: 0.6s;
}

.btn-join:hover::before {
    left: 100%;
}

.btn-join:hover {
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 0 25px rgba(255, 94, 0, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-gold) 100%);
    color: #0c0714; /* Match dark theme background color */
    border-color: var(--color-gold);
}

.btn-join span {
    font-weight: 800;
}

.btn-join .btn-arrow {
    stroke-width: 3.5px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-join:hover .btn-arrow {
    transform: translateX(4px);
}

/* Hamburger mobile button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    z-index: var(--z-drawer);
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER
   ========================================================================== */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: rgba(9, 4, 18, 0.98);
    backdrop-filter: blur(20px);
    z-index: var(--z-drawer) - 1;
    padding: 120px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-drawer.open {
    right: 0;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-nav .nav-item {
    align-items: flex-start;
    font-size: 1.4rem;
}

.mobile-drawer-bottom {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mobile-drawer-socials {
    display: flex;
    gap: 16px;
}

/* Animated Hamburger Open State */
.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--color-orange);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--color-orange);
}

/* ==========================================================================
   SHARED FOOTER SECTION
   ========================================================================== */
footer {
    background-color: #030106;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
    margin-top: 30px;
}

.footer-container {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    gap: 16px 24px;
}

.footer-tagline {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-tagline-img {
    max-height: 45px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.footer-tagline span.crown {
    color: var(--color-gold);
    margin-right: 6px;
    font-size: 1.1rem;
}

.footer-tagline span.win {
    color: var(--color-orange);
}

.footer-social-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-self: end;
    margin-right: 20px;
}

.footer-social-wrapper span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-newsletter {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-self: start;
    margin-left: 20px;
}

.newsletter-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.newsletter-icon {
    font-size: 1.5rem;
    color: var(--color-gold);
}

.newsletter-text h5 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.newsletter-text p {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.newsletter-form {
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.newsletter-form input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    padding: 10px 16px;
    font-size: 0.8rem;
    width: 180px;
    min-width: 100px;
    flex: 1 1 auto;
    font-family: inherit;
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.newsletter-submit {
    background: rgba(255, 255, 255, 0.05);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 16px;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.newsletter-submit:hover {
    background: var(--text-primary);
    color: var(--bg-base);
}

.newsletter-unsubscribe {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
    white-space: nowrap;
    flex-shrink: 0;
}

.newsletter-unsubscribe:hover {
    background: rgba(255, 62, 62, 0.15);
    color: #ff3e3e;
}

@media (max-width: 480px) {
    .newsletter-form {
        flex-direction: column;
        border-radius: 8px;
        background: none;
        border: none;
        gap: 8px;
        width: 100%;
        max-width: 300px;
    }
    .newsletter-form input {
        width: 100%;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 4px;
        padding: 12px;
    }
    .newsletter-submit, .newsletter-unsubscribe {
        border-left: none !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 4px;
        width: 100%;
        padding: 12px;
        text-align: center;
        justify-content: center;
    }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (Shared Layouts)
   ========================================================================== */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 20px;
    }
    
    .header-socials {
        display: none; /* Hide header socials to make room on tablet */
    }
    
    .footer-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    
    .footer-social-wrapper, .footer-newsletter {
        margin-left: 0;
        margin-right: 0;
    }
    
    .footer-newsletter {
        flex-direction: column;
    }
    
    .hero-section {
        background-size: cover;
        background-position: right top;
        min-height: 380px !important; /* Shaves 20% off the bottom container height on mobile */
    }
    
    .hero-container-layout {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        min-height: unset !important;
        gap: 16px !important;
        padding-left: 20px !important;
    }
    
    .hero-center-row {
        flex-grow: 0 !important;
        display: flex !important;
        justify-content: center !important;
        max-width: 320px !important;
        width: 100% !important;
        padding: 0 !important;
        margin-top: 20px !important;
    }
    
    .hero-logo-img {
        max-width: 320px !important;
        margin-left: 0 !important;
    }
    
    .hero-bottom-row {
        flex-direction: column !important;
        align-items: center !important;
        max-width: 320px !important;
        width: 100% !important;
        gap: 16px !important;
        padding: 0 !important;
        margin-top: 10px !important;
    }
    
    .hero-trailer-col {
        order: -1;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .hero-features-list {
        display: none !important;
    }
    
    .header-container .btn-join {
        padding: 6px 14px !important;
        font-size: 0.7rem !important;
        border-radius: 20px !important;
    }
}

@media (max-width: 768px) {
    .nav-menu, .btn-join {
        display: none; /* Hide standard nav on mobile */
    }
    
    .hamburger {
        display: flex; /* Show mobile drawer trigger */
    }
    
    .header-container {
        height: 70px;
    }
    
    .hero-section {
        background-size: cover;
        background-position: center top;
    }
}
