/**
 * Darfari - Melhorias de design e UX
 * Sistema de espaçamento, cards unificados, barra Discord, animações, acessibilidade
 */

/* ========== 1. Design system: espaçamento ========== */
:root {
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 40px;
    --space-xl: 60px;
    --space-2xl: 80px;
    --space-3xl: 100px;
    --card-radius: 16px;
    --card-border: 1px solid rgba(212, 175, 55, 0.2);
    --card-bg: linear-gradient(135deg, rgba(53, 12, 12, 0.9) 0%, rgba(45, 18, 20, 0.9) 100%);
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.readable-text {
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.section-lead {
    max-width: 55ch;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.88);
}

/* ========== 2. Barra fixa Discord ========== */
.discord-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 998;
    background: linear-gradient(135deg, #1a0a0a 0%, #350c0c 100%);
    border-top: 2px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.discord-cta-bar.is-visible {
    transform: translateY(0);
}

.discord-cta-bar .discord-cta-text {
    color: #F4E4BC;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.discord-cta-bar .default-btn {
    min-width: 200px;
    min-height: 44px;
    line-height: 44px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.discord-cta-bar .default-btn i {
    font-size: 1.25rem;
}

@media (max-width: 576px) {
    .discord-cta-bar {
        flex-direction: column;
        gap: 10px;
        padding: 14px 16px;
    }
    .discord-cta-bar .default-btn {
        width: 100%;
        min-width: 0;
    }
}

body.has-discord-bar .footer-section {
    padding-bottom: 80px;
}

@media (min-width: 993px) {
    .discord-cta-bar { display: none; }
}

/* ========== 3. Prova social (hero) ========== */
.hero-proof {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 20px 32px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.hero-proof-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

.hero-proof-item i {
    font-size: 1.25rem;
    color: #D4AF37;
    flex-shrink: 0;
}

.hero-proof-item strong { color: #fff; }

.hero-proof-item {
    font-weight: 600;
}

@media (max-width: 620px) {
    .hero-proof {
        flex-direction: column;
        gap: 16px;
        margin-top: 24px;
        padding-top: 24px;
    }
    .hero-proof-item {
        white-space: normal;
        text-align: center;
    }
}

/* ========== 4. Hero CTA ========== */
.hero-cta-primary { margin-top: 28px; }

.hero-cta-primary .default-btn {
    min-height: 52px;
    padding: 0 36px;
    font-size: 1.05rem;
}

.hero-cta-secondary {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.hero-cta-secondary .default-btn {
    background: transparent;
    background-image: none;
    border: 1px solid rgba(212, 175, 55, 0.45);
    color: #F4E4BC;
    box-shadow: none;
    border-radius: 8px;
    clip-path: none;
    min-height: 44px;
    padding: 0 22px;
    font-size: 0.95rem;
}

.hero-cta-secondary .default-btn:hover {
    border-color: #D4AF37;
    color: #fff;
    background: rgba(212, 175, 55, 0.12);
}

/* ========== 5. Touch targets ========== */
.default-btn, a.default-btn, button.default-btn,
.submit, .vip-btn, .copy-cmd-btn {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* ========== 6. Animações ao rolar ========== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-on-scroll.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-on-scroll.reveal-delay-3 { transition-delay: 0.3s; }

/* ========== 7. Loading botões ========== */
.default-btn.is-loading,
.submit.is-loading,
.vip-btn.is-loading {
    pointer-events: none;
    color: transparent !important;
    position: relative;
}

.default-btn.is-loading::after,
.submit.is-loading::after,
.vip-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    margin-left: -11px;
    margin-top: -11px;
    animation: btn-spin 0.7s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* ========== 8. Footer mobile CTA ========== */
@media (max-width: 991px) {
    .footer-cta-discord {
        width: 100%;
        margin-bottom: 40px;
        padding: 24px;
        background: linear-gradient(135deg, rgba(53, 12, 12, 0.6) 0%, rgba(45, 18, 20, 0.6) 100%);
        border-radius: 16px;
        border: 1px solid rgba(212, 175, 55, 0.2);
        text-align: center;
    }
    .footer-cta-discord .default-btn {
        width: 100%;
        min-width: 0;
        min-height: 48px;
    }
}

/* ========== 9. Regras resumo ========== */
.rules-summary-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(184, 134, 11, 0.08) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 36px;
}

.rules-summary-box h3 {
    font-family: "Cinzel", serif;
    font-size: 1.25rem;
    color: #F4E4BC;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rules-summary-box h3 i { color: #D4AF37; }

.rules-summary-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.rules-summary-box ul li {
    padding: 6px 0;
    padding-left: 22px;
    position: relative;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.rules-summary-box ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #D4AF37;
    font-weight: bold;
}

/* ========== 10. Skip link ========== */
.skip-link {
    position: absolute;
    top: -60px;
    left: 16px;
    background: #D4AF37;
    color: #1a0a0a;
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 8px;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ========== 11. Ajustes mobile (vários breakpoints) ========== */
@media (max-width: 480px) {
    .hero-content h1 .hero-brand { font-size: 2.5rem; line-height: 1.2; }
    .hero-cta-secondary { gap: 10px; }
    .hero-cta-secondary .default-btn { padding: 0 18px; font-size: 0.9rem; }
    .hero-proof-item { font-size: 0.9rem; }
    .footer-cta-discord { padding: 20px 16px; }
    .discord-cta-bar .discord-cta-text { font-size: 14px; }
}

@media (max-width: 380px) {
    .hero-content h1 .hero-brand { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-cta-primary .default-btn { padding: 0 24px; font-size: 1rem; }
}

@media (min-width: 621px) and (max-width: 768px) {
    .hero-proof { gap: 16px 24px; }
}
