/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;900&family=Roboto+Mono:wght@400&display=swap');

:root {
    /* Core Palette - Nothing Inspired */
    --primary: #7289DA; /* Discord Blurple as accent */
    --accent-red: #f04747; /* Alert/Error Red */

    /* Dark Mode - Monochrome focus */
    --dark-bg: #101010; /* Even darker */
    --dark-bg-secondary: #1A1A1A; /* Slightly lighter */
    --dark-bg-tertiary: #252525; /* Hover/Active */
    --dark-text: #E0E0E0; /* Slightly dimmer text */
    --dark-text-muted: #808080; /* Dimmer muted */
    --dark-heading: #FFFFFF;
    --dark-border: rgba(255, 255, 255, 0.15); /* Slightly more visible border */
    --dark-dot-color: rgba(255, 255, 255, 0.06); /* Dimmer dots */
    --dark-dot-color-hover: rgba(255, 255, 255, 0.1);

    /* Light Mode - Monochrome focus */
    --light-bg: #F5F5F5; /* Slightly off-white */
    --light-bg-secondary: #FFFFFF;
    --light-bg-tertiary: #E8E8E8;
    --light-text: #2C2C2C; /* Darker Text */
    --light-text-muted: #707070;
    --light-heading: #000000;
    --light-border: rgba(0, 0, 0, 0.15); /* Slightly more visible border */
    --light-dot-color: rgba(0, 0, 0, 0.06); /* Dimmer dots */
    --light-dot-color-hover: rgba(0, 0, 0, 0.1);


    /* Shared Styles */
    --transition-speed: 0.3s;
    --transition-speed-fast: 0.15s;
    --font-primary: 'Poppins', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --border-style: dotted;
    --border-width: 1px; /* Thinner dotted border */
    --card-border-radius: 6px; /* Slightly sharper corners */
    --section-spacing: 3.5rem; /* Slightly increased spacing */
}

/* --- Keyframes for Animations --- */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

@keyframes backgroundDotShift {
    0% { background-position: 0 0; }
    100% { background-position: 16px 16px; } /* Shift by one dot size */
}

@keyframes subtleRotate {
     0% { transform: rotate(0deg) scale(1); }
     50% { transform: rotate(5deg) scale(1.05); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}


/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    overflow-x: hidden;
    background-size: 16px 16px;
    /* Looping Background Dot Animation */
    animation: backgroundDotShift 10s linear infinite;
}

/* Dot Backgrounds based on theme */
body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--dark-text);
    background-image: radial-gradient(var(--dark-dot-color) 1px, transparent 1px);
}
body.light-mode {
    background-color: var(--light-bg);
    color: var(--light-text);
    background-image: radial-gradient(var(--light-dot-color) 1px, transparent 1px);
}

/* Theme Specific Overrides (Simplified - add more if needed) */
body.dark-mode header { background-color: var(--dark-bg); /* Match body */ border-bottom: var(--border-width) var(--border-style) var(--dark-border); }
body.dark-mode .card-base { background-color: var(--dark-bg-secondary); border: var(--border-width) var(--border-style) var(--dark-border); }
body.dark-mode .card-base:hover { background-color: var(--dark-bg-tertiary); border-color: var(--primary); }
body.dark-mode footer { background-color: var(--dark-bg); border-top: var(--border-width) var(--border-style) var(--dark-border); }
body.dark-mode .join-btn { background-color: var(--primary); color: #fff; border: var(--border-width) solid transparent; }
body.dark-mode .join-btn:hover { background-color: transparent; color: var(--primary); border-color: var(--primary); }
body.dark-mode #theme-toggle { background-color: var(--dark-bg-tertiary); color: var(--primary); border: 1px solid var(--dark-border); }
body.dark-mode .icon-wrapper { border-color: var(--dark-border); }
body.dark-mode .icon-wrapper:hover { border-color: var(--primary); }
body.dark-mode .section-divider::before { background-color: var(--dark-dot-color-hover); }

body.light-mode header { background-color: var(--light-bg-secondary); border-bottom: var(--border-width) var(--border-style) var(--light-border); }
body.light-mode .card-base { background-color: var(--light-bg-secondary); border: var(--border-width) var(--border-style) var(--light-border); }
body.light-mode .card-base:hover { background-color: var(--light-bg-tertiary); border-color: var(--primary); }
body.light-mode footer { background-color: var(--light-bg-secondary); border-top: var(--border-width) var(--border-style) var(--light-border); }
body.light-mode .join-btn { background-color: var(--primary); color: #fff; border: var(--border-width) solid transparent; }
body.light-mode .join-btn:hover { background-color: transparent; color: var(--primary); border-color: var(--primary); }
body.light-mode #theme-toggle { background-color: var(--light-bg-tertiary); color: var(--primary); border: 1px solid var(--light-border); }
body.light-mode .icon-wrapper { border-color: var(--light-border); }
body.light-mode .icon-wrapper:hover { border-color: var(--primary); }
body.light-mode .section-divider::before { background-color: var(--light-dot-color-hover); }


/* --- Base Card Style --- */
.card-base { /* Apply to .feature-card, .testimonial, .reason-item, etc. */
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    transition: transform var(--transition-speed-fast) ease,
                background-color var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
    position: relative;
    overflow: hidden; /* For potential overlays */
}
/* Subtle dotted overlay on cards (optional) */
/*
.card-base::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(var(--dark-dot-color-hover) 1px, transparent 1px);
    background-size: 10px 10px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}
body.light-mode .card-base::after {
    background-image: radial-gradient(var(--light-dot-color-hover) 1px, transparent 1px);
}
*/
.card-base > * { /* Ensure content is above overlay */
    position: relative;
    z-index: 1;
}

.card-base:hover {
    transform: translateY(-6px) scale(1.01); /* Enhanced hover */
}

/* Apply base card style */
.feature-card,
.testimonial,
.reason-item,
.rules-section,
.staff-section {
    @extend .card-base; /* Using extend concept - apply manually */
    border-radius: var(--card-border-radius);
    padding: 1.5rem;
    transition: transform var(--transition-speed-fast) ease,
                background-color var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}
.rules-section, .staff-section { padding: 2rem; } /* More padding for content sections */


/* Header */
header { padding: 2.5rem 1.5rem; text-align: center; position: relative; }

#theme-toggle {
    position: absolute; top: 1.5rem; right: 1.5rem;
    background: none; font-size: 1.5rem; cursor: pointer;
    padding: 0.5rem; border-radius: 50%; line-height: 1;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), /* Elastic scale */
                background-color var(--transition-speed) ease,
                color var(--transition-speed) ease,
                border-color var(--transition-speed) ease;
    /* Looping Animation */
    animation: subtleRotate 6s ease-in-out infinite;
}
#theme-toggle:hover {
    transform: scale(1.2) rotate(25deg) !important; /* Override animation transform on hover */
    animation-play-state: paused; /* Pause loop on hover */
}

/* Typography & Headings */
h1#main-heading {
    font-weight: 900; font-size: clamp(2.5rem, 7vw, 4rem);
    margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 2px;
    min-height: 1.2em; font-family: var(--font-mono); /* Initial state */
}
h1#main-heading span,
.animate-font span { /* Style for individual letters */
    display: inline-block;
    transition: font-family 0.08s linear, /* Faster font change */
                opacity 0.2s ease,
                transform 0.2s ease; /* Add subtle transform */
    font-family: var(--font-mono);
    opacity: 0.5;
    transform: translateY(5px); /* Start slightly down */
}
h1#main-heading span.font-changed,
.animate-font span.font-changed {
    font-family: var(--font-primary);
    opacity: 1;
    transform: translateY(0); /* Move up to normal position */
}

.tagline { font-size: clamp(1rem, 2.5vw, 1.2rem); font-weight: 300; margin-bottom: 1.5rem; letter-spacing: 0.5px; }

h2.section-title, .hero h2 {
    font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 0; /* Remove bottom margin, use divider instead */
    padding-bottom: 0.8rem;
    border-bottom: none; /* Remove border */
    display: inline-block;
    font-family: var(--font-mono); /* Initial state for animation */
    min-height: 1.2em; /* Prevent layout shift */
}

/* --- Dotted Section Divider --- */
.section-divider {
    height: 10px; /* Height of the divider */
    width: 100px; /* Width of the divider */
    margin: 1.5rem auto var(--section-spacing) auto; /* Center and space */
    position: relative;
}
.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px; /* Thickness of dot */
    background-image: radial-gradient(circle, currentColor 1px, transparent 1.5px); /* Use current text color */
    background-size: 8px 2px; /* Adjust spacing and size */
    background-repeat: repeat-x;
    opacity: 0.6;
    transform: translateY(-50%);
}


/* Container & Sections */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; } /* Removed top/bottom margin */

section { margin-bottom: 0; /* Remove bottom margin, use divider */ }


/* Join Button */
.join-btn {
    display: inline-flex; align-items: center; gap: 0.8rem;
    font-family: var(--font-primary); font-weight: 600; font-size: 1.1rem;
    padding: 0.8rem 2rem; margin: 1.5rem 0; border-radius: var(--card-border-radius);
    text-decoration: none; text-transform: uppercase; letter-spacing: 1px;
    transition: transform 0.2s ease, background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2); /* Subtle shadow */
}
.join-btn:hover {
    transform: translateY(-4px) scale(1.03); /* More pronounced lift */
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}
.join-btn i { font-size: 1.3em; }

/* Icon Wrapper (Dotted Circle) */
.icon-wrapper {
    width: 60px; /* Size of circle */
    height: 60px;
    border-radius: 50%;
    border: var(--border-width) var(--border-style); /* Use theme border */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto; /* Center the wrapper */
    transition: border-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.icon-wrapper i {
    font-size: 1.8rem; /* Icon size */
    color: var(--primary);
    transition: transform var(--transition-speed) ease;
    /* Looping Pulse Animation */
    animation: pulse 3s ease-in-out infinite;
    opacity: 0.7; /* Start slightly dimmed */
}
/* Specific Icon Wrapper Sizes */
.icon-wrapper.large { width: 100px; height: 100px; }
.icon-wrapper.large i { font-size: 3.5rem; }

/* Hover effects for wrapper and icon */
.card-base:hover .icon-wrapper {
    border-color: var(--primary);
    transform: scale(1.05);
}
.card-base:hover .icon-wrapper i {
    transform: scale(1.1);
    animation-play-state: paused; /* Pause pulse on card hover */
    opacity: 1;
}


/* Specific Section Styles (adjustments) */
.why-join { text-align: center; }
.reasons-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.reason-item h3 { font-weight: 600; font-size: 1.3rem; margin-bottom: 0.5rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.feature-title { font-weight: 600; font-size: 1.2rem; margin-bottom: 0.75rem; text-align: center; }
.feature-card p { text-align: center; font-size: 0.95rem; color: var(--dark-text-muted); }
body.light-mode .feature-card p { color: var(--light-text-muted); }

.staff-section { padding: 2rem; }
.staff-content { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; margin-top: 1.5rem; }
.staff-image { flex: 1 1 150px; text-align: center; }
.staff-description { flex: 2 1 300px; }
.staff-description ul { list-style: none; padding-left: 0; margin-top: 1rem; }
.staff-description li { margin-bottom: 0.8rem; display: flex; align-items: center; gap: 0.7rem; }
.staff-description ul i { font-size: 1.1em; min-width: 1.2em; text-align: center; color: var(--primary); }

.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.testimonial { border-left: 3px var(--border-style) var(--primary); } /* Thinner accent */
.testimonial-text { font-style: italic; margin-bottom: 1rem; font-size: 1rem; position: relative; padding-left: 1rem; color: var(--dark-text-muted); }
body.light-mode .testimonial-text { color: var(--light-text-muted); }
.testimonial-text::before { content: '“'; position: absolute; left: -10px; top: -15px; font-size: 3rem; color: var(--dark-border); opacity: 0.3; font-family: Georgia, serif; line-height: 1; } /* Dimmer quote */
body.light-mode .testimonial-text::before { color: var(--light-border); }
.testimonial-author { font-weight: 600; text-align: right; font-size: 0.9rem; }

.rules-section { padding: 2rem; }
.rules-list { list-style: none; margin-top: 1.5rem; padding-left: 0; }
.rules-list li { margin-bottom: 1rem; display: flex; align-items: flex-start; gap: 0.8rem; font-size: 1rem; }
.rule-icon { font-size: 1.1rem; min-width: 1.2em; text-align: center; margin-top: 0.1em; color: var(--primary); }
.fa-ban, .fa-ad { color: var(--accent-red) !important; }


/* Footer */
footer { text-align: center; padding: 2rem 1rem; margin-top: var(--section-spacing); font-size: 0.9rem; }
footer .disclaimer { margin-top: 0.5rem; font-size: 0.8rem; color: var(--dark-text-muted); }
body.light-mode footer .disclaimer { color: var(--light-text-muted); }

/* --- Scroll Animations --- */
.animate-on-scroll {
    opacity: 0;
    /* Default animation */
    animation-duration: 0.6s;
    animation-timing-function: ease-out;
    animation-fill-mode: forwards; /* Keep end state */
}

.animate-on-scroll.is-visible {
     /* Apply a specific animation - default is slideUp */
     animation-name: slideUp;
}

/* Apply stagger delay based on data-delay attribute */
.animate-on-scroll.is-visible[data-delay="1"] { animation-delay: 0.1s; }
.animate-on-scroll.is-visible[data-delay="2"] { animation-delay: 0.2s; }
.animate-on-scroll.is-visible[data-delay="3"] { animation-delay: 0.3s; }
.animate-on-scroll.is-visible[data-delay="4"] { animation-delay: 0.4s; }
.animate-on-scroll.is-visible[data-delay="5"] { animation-delay: 0.5s; }
.animate-on-scroll.is-visible[data-delay="6"] { animation-delay: 0.6s; }
.animate-on-scroll.is-visible[data-delay="7"] { animation-delay: 0.7s; }
.animate-on-scroll.is-visible[data-delay="8"] { animation-delay: 0.8s; }
.animate-on-scroll.is-visible[data-delay="9"] { animation-delay: 0.9s; }
.animate-on-scroll.is-visible[data-delay="10"] { animation-delay: 1.0s; }
.animate-on-scroll.is-visible[data-delay="11"] { animation-delay: 1.1s; }
.animate-on-scroll.is-visible[data-delay="12"] { animation-delay: 1.2s; }
.animate-on-scroll.is-visible[data-delay="13"] { animation-delay: 1.3s; }
.animate-on-scroll.is-visible[data-delay="14"] { animation-delay: 1.4s; }
.animate-on-scroll.is-visible[data-delay="15"] { animation-delay: 1.5s; }

/* Example of using a different animation */
.staff-image.animate-on-scroll.is-visible {
    animation-name: fadeIn; /* Use fadeIn for the staff image */
}


/* Responsive Design */
@media (max-width: 768px) {
    html { font-size: 15px; }
    h1#main-heading { font-size: clamp(2rem, 10vw, 3rem); }
    h2.section-title, .hero h2 { font-size: clamp(1.4rem, 5vw, 1.8rem); }
    .container { padding: 0 1rem; }
    .section-divider { margin-left: auto; margin-right: auto; width: 80px; } /* Adjust divider */
    header { padding: 2rem 1rem; }
    #theme-toggle { top: 1rem; right: 1rem; font-size: 1.4rem; padding: 0.4rem; }
    .join-btn { padding: 0.7rem 1.5rem; font-size: 1rem; }
    .features, .reasons-grid, .testimonials { grid-template-columns: 1fr; gap: 1.2rem; }
    .card-base, .rules-section, .staff-section { padding: 1.2rem; }
    .staff-content { flex-direction: column; }
    .icon-wrapper { width: 50px; height: 50px; } /* Smaller icon circles */
    .icon-wrapper i { font-size: 1.5rem; }
    .icon-wrapper.large { width: 80px; height: 80px; }
    .icon-wrapper.large i { font-size: 2.8rem; }
    footer { padding: 1.5rem 1rem; }

    /* Disable looping animations on mobile? Optional */
    /*
    body, #theme-toggle, .icon-wrapper i {
        animation-play-state: paused !important;
    }
    */
}