/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1c1c1c;
    --text-primary: #f0f0f0;
    --text-secondary: #8a8a8a;
    --text-muted: #555555;
    --accent: #3b82f6;
    --accent-dim: rgba(59, 130, 246, 0.1);
    --accent-glow: rgba(59, 130, 246, 0.25);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

.nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 8px 20px;
    background: var(--accent);
    color: #0a0a0a;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-cta:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 80% 50% at 20% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 80% 100%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 24px;
}

.hero-logo {
    width: 160px;
    height: 160px;
    object-fit: contain;
    margin-bottom: 32px;
    filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.15));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 40px;
    letter-spacing: -0.01em;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 64px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0a;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
    border-radius: 12px;
}

.btn-lg svg {
    width: 20px;
    height: 20px;
}

/* ===== Rules Hero ===== */
.rules-hero {
    position: relative;
    min-height: 60vh;
    padding-top: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.rules-hero .hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 80% 50% at 20% 100%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 80% 100%, rgba(99, 102, 241, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.rules-hero .section-header {
    position: relative;
    z-index: 1;
}

.rules-page {
    padding: 80px 0;
}

/* ===== Hero Stats ===== */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-hover);
}

/* ===== Scroll Indicator ===== */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.7;
}

/* ===== About / Features ===== */
.about {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 32px;
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: 10px;
    margin-bottom: 20px;
    color: var(--accent);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Departments ===== */
.departments {
    padding: 120px 0;
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dept-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    transition: var(--transition);
    text-align: center;
}

.dept-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.dept-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.dept-badge.leo { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.dept-badge.fire { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.dept-badge.civ { background: rgba(250, 204, 21, 0.15); color: #fbbf24; }
.dept-badge.dot { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.dept-badge.dispatch { background: rgba(168, 85, 247, 0.15); color: #a78bfa; }
.dept-badge.staff { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

.dept-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.dept-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Rules ===== */
.rules {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.rules-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
}

.rule-item:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.rule-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.4;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}

.rule-content h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.rule-content p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Join CTA ===== */
.join {
    padding: 120px 0;
}

.join-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 64px;
    position: relative;
    overflow: hidden;
}

.join-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 80% at 100% 50%, rgba(59, 130, 246, 0.06), transparent);
    pointer-events: none;
}

.join-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.join-content h2 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.join-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.7;
}

.join-visual {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.join-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    opacity: 0.8;
    filter: drop-shadow(0 0 60px rgba(59, 130, 246, 0.1));
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

.footer-brand p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 0.8125rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ===== Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-logo {
        width: 120px;
        height: 120px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        margin-bottom: 48px;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .dept-grid {
        grid-template-columns: 1fr;
    }

    .rule-item {
        padding: 20px 24px;
        gap: 16px;
    }

    .rules-hero {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .join-card {
        flex-direction: column;
        text-align: center;
        padding: 48px 32px;
    }

    .join-visual {
        margin-top: 40px;
    }

    .join-logo {
        width: 120px;
        height: 120px;
    }

    .footer-content {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .about,
    .departments,
    .rules-page,
    .join {
        padding: 80px 0;
    }
}

/* ===== Getting Started Section ===== */
.getting-started {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 28px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.step-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 16px;
}

.step-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.step-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .getting-started {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .join-content h2 {
        font-size: 1.5rem;
    }
}
