/* Core Variables */
:root {
    --navbar-height: 78px;
    --primary-color: #1a4a20;
    --secondary-color: #2e8b57;
    --accent-blue: #004913;
    --dark-bg: #050805;
    --panel-bg: rgba(10, 15, 10, 0.75);
    --text-light: #ffffff;
    --text-muted: #d0e0d1;
    --border-color: #16291a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

h2 {
    color: var(--secondary-color);
    font-size: 2.2rem;
    border-bottom: 1px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.center-text {
    text-align: center;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== Glitch Effect ==================== */
.glitch {
    position: relative;
    display: inline-block;
    animation: glitch-flicker 8s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.glitch::before {
    color: #00ff55;
    animation: glitch-before 8s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch::after {
    color: var(--accent-blue);
    animation: glitch-after 8s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
}

@keyframes glitch-flicker {
    0%, 94%, 100% { text-shadow: none; transform: none; }
    95% { text-shadow: -2px 0 #00ff55, 2px 0 var(--accent-blue); transform: translate(-2px, 1px); }
    96% { text-shadow: 2px 0 #00ff55, -2px 0 var(--accent-blue); transform: translate(2px, -1px); }
    97% { text-shadow: none; transform: translate(0); }
    98% { text-shadow: 2px 0 var(--accent-blue), -2px 0 #00ff55; transform: translate(-1px, -1px); }
}

@keyframes glitch-before {
    0%, 94%, 100% { opacity: 0; transform: none; }
    95% { opacity: 0.8; transform: translateX(-3px); }
    97% { opacity: 0.5; transform: translateX(2px); }
}

@keyframes glitch-after {
    0%, 95%, 100% { opacity: 0; transform: none; }
    96% { opacity: 0.8; transform: translateX(3px); }
    98% { opacity: 0.5; transform: translateX(-2px); }
}

/* ==================== Navigation ==================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(5, 8, 5, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--primary-color);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-light);
    text-transform: uppercase;
}

.logo {
    width: 45px;
    height: 45px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary-color);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hard Edges for Sci-Fi Clean Look */
.portal-link, .hero-join-now, .social-btn, .info-block, .content-box, .division-card, .section-title-card, .faq-item, .rank-category, .shenanigans-box {
    border-radius: 0 !important;
}

.portal-link {
    background: transparent;
    color: var(--text-light);
    padding: 8px 16px;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.85rem;
    border: 1px solid var(--secondary-color);
    transition: background 0.3s, box-shadow 0.3s;
}

.portal-link:hover {
    background: rgba(46, 139, 87, 0.2);
    box-shadow: inset 0 0 10px rgba(46, 139, 87, 0.5);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 0;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    display: block;
}

/* ==================== Hero Sections ==================== */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: var(--navbar-height);
    text-align: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.home-hero {
    background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/11323356494805598208_20251123155036_1.webp');
}

.about-hero {
    min-height: 80vh;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(5, 8, 5, 0.5) 0%, rgba(5, 8, 5, 0.4) 60%, var(--dark-bg) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.home-hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    text-decoration: none;
}

.hero-logo {
    width: min(180px, 42vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.55));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.hero-logo-link:hover .hero-logo,
.hero-logo-link:focus-visible .hero-logo {
    transform: translateY(-3px) scale(1.02);
    filter: drop-shadow(0 0 20px rgba(46, 139, 87, 0.35));
}

.hero-join-now {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--text-light);
    padding: 16px 48px;
    font-size: 1.5rem;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    backdrop-filter: blur(5px);
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
    box-shadow: inset 0 0 10px rgba(46, 139, 87, 0.2);
}

.hero-join-now:hover {
    background: rgba(46, 139, 87, 0.2);
    box-shadow: inset 0 0 20px rgba(46, 139, 87, 0.5);
    transform: translateY(-2px);
}

.hero-join-now:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 4px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 2rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.hero-motto {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 1.35rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-motto span {
    display: block;
}

.home-hero .hero-title,
.home-hero .hero-motto,
.home-hero .hero-description {
    width: 100%;
    text-align: center;
}

/* ==================== Background Parallax Sections ==================== */
.section {
    padding: 6rem 0;
}

.section-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
    position: relative;
    color: var(--text-light);
}

/* Update your existing background classes with these URLs only */
.bg-img-1 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/11323356494805598208_20251123155036_1.webp'); } /* Top front page */
.bg-img-2 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/11323356494805598208_20251123145332_1.webp'); } /* Image under top */
.bg-img-3 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/11323356494805598208_20251123155855_1.webp'); }
.bg-img-4 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/Molecellindixiner.webp'); }
.bg-img-5 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/SPACEWHLE_on_perseus.webp'); }
.bg-img-6 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/ScreenShot-2025-12-06_17-55-53-050.webp'); }
.bg-img-7 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/c258356c-e813-4efe-8c07-f58d450be035-screenshot.webp'); }
.bg-img-8 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/eeeee.webp'); }
.bg-img-9 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/redlevelpatrols.webp'); }
.bg-img-10 { background-image: url('https://pub-5504de06724a483cbaf0592b3d20573d.r2.dev/backgrounds/sejaggngkkr.webp'); }

.section-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, var(--dark-bg) 0%, rgba(5, 8, 5, 0.45) 15%, rgba(5, 8, 5, 0.45) 85%, var(--dark-bg) 100%);
    z-index: 1;
}

.relative-z {
    position: relative;
    z-index: 2;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

/* Scroll Animation Utilities */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Solid Clean UI Panels */
.info-block, .content-box, .division-card, .section-title-card, .shenanigans-box {
    background: rgba(5, 8, 5, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.info-block {
    padding: 2.5rem;
    border-left: 2px solid var(--accent-blue);
}

.content-box {
    padding: 3.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.section-intro {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}

.goals-list {
    list-style: none;
    max-width: 800px;
    margin: 0 auto;
}

.goals-list li {
    background: rgba(10, 15, 10, 0.5);
    border-left: 2px solid var(--secondary-color);
    margin-bottom: 1rem;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.org-quote {
    font-style: italic;
    color: var(--secondary-color);
    font-size: 1.2rem;
    border-left: 2px solid var(--primary-color);
    padding-left: 1rem;
    margin-top: 2rem;
    background: rgba(26, 74, 32, 0.2);
    padding: 1rem;
}

/* ==================== Divisions ==================== */
.section-title-card {
    display: inline-block;
    padding: 1rem 3rem;
    margin-bottom: 1rem;
}

.divisions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.division-card {
    border-top: 2px solid var(--primary-color);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.division-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--accent-blue);
}

.div-logo {
    display: block;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    object-fit: contain;
}

/* ==================== FAQ Section ==================== */
.faq-box {
    max-width: 860px;
}

.faq-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: border-color 0.3s;
}

.faq-item.open {
    border-color: var(--secondary-color);
}

.faq-question {
    width: 100%;
    background: rgba(26, 74, 32, 0.2);
    border: none;
    color: var(--text-light);
    padding: 1.1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background 0.3s;
    cursor: pointer;
}

.faq-question:hover {
    background: rgba(46, 139, 87, 0.25);
}

.faq-icon {
    font-size: 1.4rem;
    color: var(--secondary-color);
    font-weight: 300;
    flex-shrink: 0;
    transition: transform 0.3s;
    line-height: 1;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 1.2rem 1.5rem;
}

.faq-answer p {
    color: var(--text-muted);
    font-size: 0.98rem;
    margin: 0;
    line-height: 1.7;
}

.faq-link {
    color: var(--secondary-color);
    text-decoration: underline;
    text-decoration-color: rgba(46, 139, 87, 0.4);
    transition: color 0.2s;
}

.faq-link:hover {
    color: #4dbb7a;
}

/* ==================== Fun Section (Shenanigans) ==================== */
.shenanigans-box {
    margin: 4rem auto 0;
    padding: 2.5rem;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.shenanigans-gif {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.shenanigans-video {
    width: min(100%, 760px);
    aspect-ratio: 16 / 9;
    display: block;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
    background: #000;
    object-fit: cover;
}

/* ==================== Ranks Section ==================== */
.rank-category {
    background: rgba(5, 8, 5, 0.85);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
}

.rank-category h3 {
    color: var(--accent-blue);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.rank-list {
    list-style: none;
    padding: 0;
}

.rank-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rank-list li:last-child {
    border-bottom: none;
}

/* ==================== Gallery Section ==================== */
.gallery-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.gallery-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(5, 8, 5, 0.85);
    border: 1px solid var(--secondary-color);
    color: var(--text-light);
    padding: 0.9rem 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s, transform 0.3s;
}

.gallery-toggle:hover {
    background: rgba(46, 139, 87, 0.2);
    box-shadow: inset 0 0 14px rgba(46, 139, 87, 0.35);
}

.gallery-toggle:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 3px;
}

.gallery-toggle-icon {
    font-size: 1.1rem;
    line-height: 1;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}

.gallery-toggle[aria-expanded="false"] .gallery-toggle-icon {
    transform: rotate(180deg);
}

.gallery-collapsible {
    --gallery-collapsed-height: 245px;
    position: relative;
    overflow: hidden;
    max-height: none;
    transition: max-height 0.45s ease;
}

.gallery-collapsible.is-collapsed {
    max-height: var(--gallery-collapsed-height);
}

.gallery-collapsible.is-collapsed::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    background: linear-gradient(to bottom, rgba(5, 8, 5, 0) 0%, rgba(5, 8, 5, 0.96) 100%);
    pointer-events: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 0;
}

.gallery-grid > img,
.gallery-img {
    width: 100%;
    height: clamp(160px, 18vw, 220px);
    object-fit: cover;
    display: block;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
}

.gallery-grid > img:hover,
.gallery-img:hover {
    transform: scale(1.03);
    border-color: var(--secondary-color);
    z-index: 10;
    position: relative;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ==================== Footer ==================== */
.footer {
    background: var(--dark-bg);
    padding: 3rem 0 1rem;
    text-align: center;
    margin-top: auto;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    text-decoration: none;
    padding: 10px 20px;
    transition: all 0.3s;
    font-weight: 600;
}

.social-btn:hover {
    background: rgba(46, 139, 87, 0.2);
    border-color: var(--secondary-color);
}

.footer-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.sc-market-logo, .rsi-logo {
    filter: grayscale(1) invert(1) brightness(2);
    mix-blend-mode: screen;
}

.copyright {
    margin-top: 2rem;
    font-size: 0.75rem; 
    color: #666;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== Mobile Responsiveness ==================== */
@media (max-width: 768px) {
    .section-bg { background-attachment: scroll; }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(5, 8, 5, 0.98);
        flex-direction: column;
        padding: 1rem 0;
        text-align: center;
        border-bottom: 2px solid var(--primary-color);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-logo {
        width: min(140px, 50vw);
    }

    .hero-motto {
        font-size: 1.05rem;
        letter-spacing: 3px;
    }

    .hero-join-now {
        width: min(100%, 320px);
        padding: 14px 28px;
        font-size: 1.2rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .content-box {
        padding: 2rem 1.5rem;
    }

    .gallery-collapsible {
        --gallery-collapsed-height: 185px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .gallery-toggle {
        width: 100%;
        justify-content: center;
    }
}
