/* ===================================== */
/* ROOT COLORS + LIGHTWEIGHT BACKGROUND   */
/* ===================================== */

:root{
    --bg-start: #0a0c12;
    --bg-mid: #111827;
    --bg-end: #0f172a;
    --text: #ffffff;
    --text-soft: #cbd5e1;
    --card: rgba(255,255,255,.05);
    --card-border: rgba(255,255,255,.08);
    --navbar-bg: rgba(5,7,12,.75);
    --gradient1-start: #e2e6ee;
    --gradient1-end: #c5d3f0;
    --gradient2-start: #a6b8e4;
    --gradient2-end: #7a9ad6;
    --shadow: rgba(166,184,228,.15);
    --btn-hover: rgba(166,184,228,.12);
    --accent-glow: #a6b8e4;
}

body.light-mode{
    --bg-start: #f0f4fa;
    --bg-mid: #e8edf6;
    --bg-end: #dfe6f2;
    --text: #0f172a;
    --text-soft: #334155;
    --card: rgba(255,255,255,.85);
    --card-border: rgba(0,0,0,.07);
    --navbar-bg: rgba(255,255,255,.82);
    --gradient1-start: #8ca3dd;
    --gradient1-end: #6b8bc9;
    --gradient2-start: #5d79be;
    --gradient2-end: #4a61a3;
    --shadow: rgba(93,121,190,.2);
    --btn-hover: rgba(93,121,190,.12);
    --accent-glow: #5d79be;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Poppins',sans-serif;
    color:var(--text);
    overflow-x:hidden;
    background: radial-gradient(ellipse at 30% 20%, var(--bg-mid) 0%, var(--bg-start) 55%, var(--bg-end) 100%);
    transition: background-color 0.35s ease, color 0.35s ease;
}
body.light-mode{
    background: radial-gradient(ellipse at 70% 20%, var(--bg-mid) 0%, var(--bg-start) 60%, var(--bg-end) 100%);
}

/* Two soft static-ish orbs instead of three blurred/animated ones.
   Lower blur radius + fewer layers = much cheaper to paint/composite. */
.glow-bg{
    position:fixed;
    inset:0;
    z-index:-5;
    pointer-events:none;
    contain: strict;
}
.glow-sphere{
    position:absolute;
    border-radius:50%;
    filter:blur(70px);
    opacity:0.4;
    will-change: transform;
}
.glow-sphere.one{
    width:480px;
    height:480px;
    background: var(--gradient1-start);
    top:-160px;
    left:-120px;
    animation: floatOrb 24s infinite alternate ease-in-out;
}
.glow-sphere.two{
    width:420px;
    height:420px;
    background: var(--gradient2-start);
    bottom:-120px;
    right:-80px;
    animation: floatOrb 24s infinite alternate-reverse ease-in-out;
}
.glow-sphere.three{
    display:none; /* removed: third blurred layer was pure paint cost with little visual payoff */
}
body.light-mode .glow-sphere.one{ background: #b7c9f0; }
body.light-mode .glow-sphere.two{ background: #6d8ed1; }

@keyframes floatOrb {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, -24px); }
}

@media (prefers-reduced-motion: reduce){
    .glow-sphere{ animation: none !important; }
    .fade-on-scroll{ transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ===================================== */
/* NAVBAR                                 */
/* ===================================== */

nav{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(14px);
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--card-border);
    transition: background-color 0.35s ease, border-color 0.35s ease;
}

.nav-container{
    max-width: 1600px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo{
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.2px;
    flex-shrink: 0;
}

.logo img{
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.logo .logo-text{
    background: linear-gradient(135deg, var(--gradient1-start), var(--gradient2-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.nav-right{
    display: flex;
    align-items: center;
    gap: 28px;
    flex-shrink: 0;
}

.nav-links{
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a{
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.2s ease;
    position: relative;
    opacity: 0.9;
}

.nav-links a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--gradient1-start), var(--gradient2-start));
    transition: width 0.25s ease;
}

.nav-links a:hover::after{ width: 100%; }
.nav-links a:hover{ opacity: 1; }

.theme-toggle{
    width: 46px;
    height: 46px;
    border-radius: 30px;
    border: 1px solid var(--card-border);
    background: var(--card);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    padding: 0;
}

.theme-toggle svg{
    width: 22px;
    height: 22px;
    stroke: var(--text);
    stroke-width: 1.8;
    fill: none;
    transition: transform 0.2s ease;
}

.theme-toggle:hover{
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--shadow);
}
.theme-toggle:hover svg{ transform: rotate(15deg); }

@media (max-width: 680px) {
    .nav-container { padding: 12px 20px; flex-wrap: wrap; }
    .nav-links { gap: 18px; }
    .nav-right { gap: 16px; }
    .logo .logo-text { font-size: 0.9rem; }
    .logo img { width: 38px; height: 38px; }
}
@media (max-width: 550px) {
    .nav-links { gap: 12px; }
    .nav-links a { font-size: 0.8rem; }
    .theme-toggle { width: 40px; height: 40px; }
}

/* ===================================== */
/* HERO & GLOBAL                          */
/* ===================================== */

.hero{
    min-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 20px 90px;
}
.hero-content{ max-width: 1000px; }
.hero-logo img{
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 28px;
    animation: logoFloat 4.5s ease-in-out infinite;
}
@keyframes logoFloat{
    0%,100%{ transform:translateY(0px);}
    50%{ transform:translateY(-14px);}
}

/* Static gradient text — same look, no per-frame repaint from an
   animated background-position on background-clip:text (that was
   the single most expensive thing running continuously on this page). */
.hero h1{
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 22px;
    background: linear-gradient(115deg,
        var(--gradient1-start) 0%,
        var(--gradient2-start) 35%,
        var(--gradient1-end) 65%,
        var(--gradient2-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p{
    font-size: 1.12rem;
    color: var(--text-soft);
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.btn{
    padding: 16px 38px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    background: var(--card);
    border: 1px solid var(--card-border);
    color: var(--text);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.btn svg{
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
}
.btn-primary{
    background: linear-gradient(110deg, rgba(166,184,228,0.2), rgba(226,230,238,0.1));
}
.btn:hover{
    transform: translateY(-4px);
    box-shadow: 0 14px 26px var(--shadow);
}
.hero-buttons{
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

section{ padding: 100px 24px; }
.container{ max-width: 1280px; margin: auto; }
.section-title{ text-align: center; margin-bottom: 70px; }
.section-title h2{
    font-size: 3rem;
    background: linear-gradient(115deg, var(--gradient1-start), var(--gradient2-start), var(--gradient1-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 14px;
}
.section-title p{ color: var(--text-soft); }

.features-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}
.feature-card{
    background: var(--card);
    border: 1px solid var(--card-border);
    padding: 38px 30px;
    border-radius: 32px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    contain: content;
}
.feature-card:hover{
    transform: translateY(-8px);
    box-shadow: 0 18px 36px var(--shadow);
}
.feature-icon{
    width: 68px;
    height: 68px;
    background: linear-gradient(145deg, var(--gradient1-start), var(--gradient2-start));
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.feature-icon svg{
    width: 34px;
    height: 34px;
    stroke: white;
    stroke-width: 1.7;
    fill: none;
}

.unavailable-mode .feature-card,
.unavailable-mode .gallery-item,
.unavailable-mode .faq-item {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}
.unavailable-mode .feature-card h3 { color: var(--text-soft); }
.unavailable-mode .gallery-item img { filter: grayscale(0.5); }

.gallery-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.gallery-item{
    border-radius: 28px;
    overflow: hidden;
    height: 270px;
    position: relative;
    border: 1px solid var(--card-border);
    transition: transform 0.3s ease;
    cursor: pointer;
    contain: content;
}
.gallery-item:hover{ transform: translateY(-6px); }
.gallery-item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img{ transform: scale(1.06); }
.gallery-overlay{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 24px;
    font-weight: 600;
    color: white;
}

.faq-container{
    max-width: 800px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.faq-item{
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 26px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.25s ease;
}
.faq-question{
    padding: 24px 30px;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    cursor: pointer;
}
.faq-question svg{
    width: 20px;
    height: 20px;
    stroke: var(--text);
    stroke-width: 2;
    transition: transform 0.3s ease;
}
.faq-answer{
    max-height: 0;
    padding: 0 30px;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.3s ease;
    color: var(--text-soft);
}
.faq-item.active .faq-answer{
    max-height: 220px;
    padding: 0 30px 28px;
    opacity: 1;
}
.faq-item.active .faq-question svg{ transform: rotate(45deg); }

/* fade-in: driven by IntersectionObserver toggling this class once,
   not by a scroll listener recalculating every element's rect every frame */
.fade-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-on-scroll.fade-in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ========== FOOTER ========== */
.cool-footer{
    margin-top: 50px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--card-border);
    padding: 3rem 2rem 1.5rem;
}
.footer-inner{
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 50px;
}
.footer-brand h3{
    font-size: 1.7rem;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--gradient1-start), var(--gradient2-start));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.footer-brand p{
    max-width: 340px;
    color: var(--text-soft);
    line-height: 1.5;
}
.footer-links-grid{ display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4{ margin-bottom: 18px; font-size: 1.1rem; font-weight: 600; }
.footer-col a{
    display: block;
    color: var(--text-soft);
    text-decoration: none;
    margin: 12px 0;
    transition: color 0.2s ease, transform 0.2s ease;
    font-size: 0.9rem;
    cursor: pointer;
}
.footer-col a:hover{ color: var(--gradient2-start); transform: translateX(5px); }
.social-icon-set{ display: flex; gap: 20px; margin-top: 20px; }
.social-icon-set a{
    background: var(--card);
    width: 44px;
    height: 44px;
    border-radius: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    transition: transform 0.25s ease, background-color 0.25s ease;
    cursor: pointer;
}
.social-icon-set a svg{
    width: 22px;
    height: 22px;
    stroke: var(--text);
    stroke-width: 1.7;
    fill: none;
    transition: transform 0.2s ease;
}
.social-icon-set a:hover{ transform: translateY(-4px); background: var(--btn-hover); }
.social-icon-set a:hover svg{ transform: scale(1.1); }
.footer-bottom{
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.8rem;
    border-top: 1px solid var(--card-border);
    font-size: 0.8rem;
    color: var(--text-soft);
}

/* Discord live member/online count pill */
.discord-status{
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 20px;
    border-radius: 30px;
    background: var(--card);
    border: 1px solid var(--card-border);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-soft);
    margin: 24px auto 0;
    width: fit-content;
}
.discord-status.footer-variant{
    margin: 16px 0 0;
    font-size: 0.8rem;
    padding: 7px 16px;
}
.discord-dot{
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #43b581;
    box-shadow: 0 0 6px #43b581;
    flex-shrink: 0;
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot{
    0%,100%{ opacity: 1; }
    50%{ opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce){
    .discord-dot{ animation: none; }
}

/* click glow — cheap: transform/opacity only, single element, auto-removed */
.click-glow{
    position: fixed;
    width: 0;
    height: 0;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, var(--accent-glow), transparent 75%);
    transform: translate(-50%, -50%);
    animation: glowPop 0.6s ease-out forwards;
    z-index: 10000;
    opacity: 0.55;
}
@keyframes glowPop{
    0%{ width: 0px; height: 0px; opacity: 0.6; }
    100%{ width: 380px; height: 380px; opacity: 0; }
}
