/* ═══════════════════════════════════════════════
   festas_builds – Main Stylesheet
   Dark gaming theme, mobile-first
═══════════════════════════════════════════════ */

/* ── Variables ── */
:root {
    --bg: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-card-hover: #212121;
    --bg-header: rgba(15, 15, 15, 0.92);
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted: #666;
    --accent: #7cbd54;
    --accent-hover: #8dd460;
    --accent-dim: rgba(124, 189, 84, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(124, 189, 84, 0.3);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --radius: 12px;
    --radius-sm: 8px;
    --header-h: 64px;
    --transition: 0.2s ease;
}

[data-theme="light"] {
    --bg: #f0f0f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8f8f8;
    --bg-header: rgba(240, 240, 240, 0.92);
    --text-primary: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #888;
    --accent: #5a9c3a;
    --accent-hover: #4d8830;
    --accent-dim: rgba(90, 156, 58, 0.12);
    --border: rgba(0, 0, 0, 0.1);
    --border-accent: rgba(90, 156, 58, 0.3);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

ul { list-style: none; }

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

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

.section { padding: 80px 0; }

.section-alt { background: #141414; background: color-mix(in srgb, var(--bg-card) 40%, var(--bg)); }

.section-header { text-align: center; margin-bottom: 3rem; }

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px); }

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.btn-discord {
    background: #5865f2;
    color: #fff;
    font-size: 0.875rem;
}
.btn-discord:hover { background: #4752c4; color: #fff; }

/* ── Header / Nav ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: var(--header-h);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}
.logo-icon { font-size: 1.3rem; }

.main-nav { display: none; flex: 1; }

@media (min-width: 768px) {
    .main-nav { display: flex; }
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.nav-link {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.nav-link:hover, .nav-link.active { color: var(--text-primary); background: var(--accent-dim); }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Theme Toggle */
.theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

.theme-toggle .sun-icon { display: none; }
.theme-toggle .moon-icon { display: block; }
[data-theme="light"] .theme-toggle .sun-icon { display: block; }
[data-theme="light"] .theme-toggle .moon-icon { display: none; }

/* Hamburger */
.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (min-width: 768px) { .nav-toggle { display: none; } }

/* Mobile nav */
.main-nav.mobile-open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
}
.main-nav.mobile-open .nav-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0.25rem;
}
.main-nav.mobile-open .nav-link { display: block; width: 100%; padding: 0.6rem 0.75rem; }

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6rem 1.25rem 4rem;
}

.animated-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    width: 100%;
}

.hero-eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Server IP box */
.server-ip-box {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: 6px;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-copy:hover { background: var(--accent); color: #fff; }

/* Status */
.server-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.status-indicator.online {
    background: var(--accent);
    animation: pulse 2s infinite;
}
.status-indicator.offline { background: #e05252; }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124, 189, 84, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(124, 189, 84, 0); }
}

.status-sep { color: var(--text-muted); }

.hero-version {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}
.hero-version .dot { color: var(--text-muted); }

.hero-ctas {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-ctas .btn { padding: 0.75rem 1.75rem; font-size: 1rem; }

.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* Particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp linear infinite;
}
@keyframes floatUp {
    0%   { opacity: 0; transform: translateY(100vh) scale(0); }
    10%  { opacity: 0.4; }
    90%  { opacity: 0.1; }
    100% { opacity: 0; transform: translateY(-10vh) scale(1.5); }
}

/* ── Cards ── */
.card-grid { display: grid; gap: 1.25rem; }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

@media (min-width: 768px) {
    .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .card-grid-3 { grid-template-columns: repeat(3, 1fr); }
    .card-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}
.card:hover {
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.card.featured { border-color: var(--border-accent); }

.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card-desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.55; }

.card-tag {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
}

/* ── Class System ── */
.class-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.class-tab {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.class-tab:hover { border-color: var(--border-accent); color: var(--text-primary); }
.class-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.class-panels { position: relative; }

.class-panel {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.class-panel.active { display: block; }

.class-panel-inner {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.class-icon-large {
    font-size: 4rem;
    line-height: 1;
    flex-shrink: 0;
}

.class-info { flex: 1; min-width: 200px; }
.class-info h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; }
.class-role { color: var(--text-secondary); margin-bottom: 1.25rem; font-size: 0.95rem; }

.class-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 0.9rem; font-weight: 600; }
.stat-mana { color: #6ba3ff; }
.stat-rage { color: #e05252; }
.stat-energy { color: #f0c040; }
.stat-focus { color: #6ee7b7; }

.class-level-note {
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.class-level-note strong { color: var(--accent); }

/* ── Guilds ── */
.guilds-layout {
    display: grid;
    gap: 2.5rem;
    align-items: start;
}
@media (min-width: 768px) {
    .guilds-layout { grid-template-columns: 1fr 1fr; }
}

.guilds-desc { color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.7; }

.guilds-features-list { display: flex; flex-direction: column; gap: 0.6rem; }
.guilds-features-list li { font-size: 0.95rem; color: var(--text-secondary); }

.guilds-ranks-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.rank-ladder { display: flex; flex-direction: column; }

.rank-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.1rem;
    transition: all var(--transition);
}
.rank-item:hover { border-color: var(--border-accent); transform: translateX(4px); }

.rank-leader { border-left: 3px solid #f0c040; }
.rank-officer { border-left: 3px solid var(--accent); }
.rank-member { border-left: 3px solid #6ba3ff; }
.rank-recruit { border-left: 3px solid var(--text-muted); }

.rank-icon { font-size: 1.4rem; }
.rank-info { display: flex; flex-direction: column; }
.rank-name { font-weight: 700; font-size: 0.95rem; }
.rank-desc { font-size: 0.8rem; color: var(--text-muted); }

.rank-connector {
    width: 2px;
    height: 16px;
    background: var(--border);
    margin: 0 0 0 1.7rem;
}

/* ── Join ── */
.join-grid {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 768px) { .join-grid { grid-template-columns: repeat(3, 1fr); } }

.join-card { display: flex; flex-direction: column; }

.join-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.join-steps {
    list-style: decimal;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.join-ip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}
.join-ip code {
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}
.join-port {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.join-version { font-size: 0.8rem; color: var(--text-muted); }

.join-card-discord { align-items: flex-start; }
.join-map-link { margin-top: 0.75rem; font-size: 0.85rem; }
.join-map-link a { color: var(--text-secondary); }
.join-map-link a:hover { color: var(--accent); }

/* ── Footer ── */
.site-footer {
    background: #171717;
    background: color-mix(in srgb, var(--bg-card) 60%, var(--bg));
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2.5rem;
}
@media (min-width: 600px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-logo { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.footer-tagline { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.4rem; }
.footer-ip { font-family: monospace; font-size: 0.875rem; color: var(--accent); }

.footer-col h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-col a { font-size: 0.9rem; color: var(--text-secondary); }
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Utilities ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
