/*
* Dueto de Almas - Design System
* Theme: Deep Soul & Electric Energy
*/

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Montserrat:wght@300;400;500;600&display=swap');

:root {
    /* Palette - Dark Mystic & Electric */
    --color-bg-deep: #05020a;
    /* Almost black */
    --color-bg-soul: #1a0b2e;
    /* Deep Purple */
    --color-text-main: #f8fafc;
    --color-text-muted: #94a3b8;

    --color-accent-gold: #D4AF37;
    /* Metallic Gold */
    --color-accent-electric: #7C3AED;
    /* Electric Violet */
    --color-accent-glow: rgba(124, 58, 237, 0.4);

    /* Typography */
    --font-heading: 'Cinzel', serif;
    /* Authority */
    --font-emphasis: 'Cormorant Garamond', serif;
    /* Elegance */
    --font-body: 'Montserrat', sans-serif;
    /* Modern Geometry */

    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 5rem;
    --spacing-xl: 10rem;

    /* Effects */
    --shadow-glow: 0 0 30px var(--color-accent-glow);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --backdrop-blur: blur(12px);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-deep);
    color: var(--color-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* Typography Utilities */
.text-emphasis {
    font-family: var(--font-emphasis);
    font-style: italic;
    color: var(--color-accent-gold);
}

.text-jumbo {
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

.text-gradient-gold {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.4);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-main);
    line-height: 1.1;
    letter-spacing: 0.02em;
}

p {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    letter-spacing: 0.01em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Utility Components */
@media (max-width: 768px) {

    /* Modal mobile */
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 1.5rem;
    }

    /* Fix Section Title Alignment */
    .section-title {
        text-align: center !important;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    /* Increased padding for mobile safety */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    border: 1px solid var(--color-accent-gold);
    color: var(--color-accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--color-accent-gold);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.btn:hover {
    color: var(--color-bg-deep);
    border-color: var(--color-accent-gold);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background: var(--color-accent-gold);
    color: var(--color-bg-deep);
}

.btn-primary:hover {
    background: transparent;
    color: var(--color-bg-deep);
    /* Dark text on Gold slide-in background */
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    /* Responsive font size */
    text-align: center;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(to right, var(--color-accent-gold), var(--color-accent-electric));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0;
    /* For animation */
    transform: translateY(20px);
}

/* Animations */
/* Advanced Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(10px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Glass Panel Utility */
.glass-panel {
    background: var(--glass-bg);
    border: var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    border-radius: 4px;
    /* Sharper corners for editorial feel */
}

/* Background Elements */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, #2e1065 0%, #0f1020 70%);
    z-index: -1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
}

/* Sections */
section {
    padding: var(--spacing-lg) 0;
    /* Reduced vertical padding for mobile */
    position: relative;
}

/* 
   === RESPONSIVE LAYOUTS === 
*/

/* Mobile First Adjustments */


/* Hero Typography */
#hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    /* Responsive H1 */
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

#hero p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    padding: 0 1rem;
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* Essence Grid */
.essence-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Judges Grid */
.judges-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* --- NEW FEATURES STYLES --- */

/* 1. Mitos vs Verdades (Flip Cards) */
.flip-card {
    background-color: transparent;
    width: 300px;
    height: 200px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    flex-direction: column;
}

.flip-card-front {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-text-muted);
}

.flip-card-back {
    background: linear-gradient(135deg, var(--color-bg-soul), #4c1d95);
    color: white;
    transform: rotateY(180deg);
    border: 1px solid var(--color-accent-gold);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

/* 2. Countdown Timer */
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    /* Reduced gap for better wrapping on all screens */
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    min-width: 80px;
}

.countdown-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-accent-electric);
    text-shadow: 0 0 10px var(--color-accent-electric);
    display: block;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 3. Judges Reveal Effect */
.judge-card {
    width: 250px;
    height: 350px;
    background: #1e1b4b;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    cursor: pointer;
}

.judge-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

.judge-card:hover {
    border-color: var(--color-accent-gold);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
    transform: translateY(-10px);
}

.judge-card:hover .judge-card-content {
    transform: translateY(0);
}

/* 4. Registration Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
    align-items: centered;
    justify-content: center;
}

.modal-content {
    background-color: var(--color-bg-soul);
    margin: auto;
    padding: 2rem;
    border: 1px solid var(--color-accent-gold);
    width: 90%;
    max-width: 500px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--color-accent-electric);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-accent-gold);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 5px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent-electric);
}

/* --- MOBILE OVERRIDES (Max Width 768px) --- */
@media (max-width: 768px) {

    /* Navbar override */
    header {
        padding: 1rem !important;
        background: rgba(5, 2, 10, 0.8) !important;
        backdrop-filter: blur(10px);
        height: auto;
    }

    header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .hamburger {
        display: block !important;
    }

    #nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        background: var(--color-bg-soul);
        padding: 1rem;
        border-radius: 8px;
        order: 3;
    }

    #nav-menu.active {
        display: flex;
    }

    /* Hero adjustments */
    #hero {
        padding-top: 140px !important;
        /* Reduced for mobile */
        align-items: center;
        text-align: center;
        height: auto !important;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.1;
        margin-bottom: 1.5rem;
    }

    .text-jumbo {
        font-size: 2rem !important;
    }

    /* Grid Stacking */
    .essence-grid,
    .categories-grid,
    .judges-grid {
        display: flex !important;
        flex-direction: column;
        align-items: center !important;
        /* Fix for decentralized cards */
        gap: 2rem;
    }

    .visual-content {
        order: -1;
        width: 100%;
        margin-bottom: 2rem;
    }

    .text-content {
        width: 100%;
    }

    .flip-card {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    /* --- COUNTDOWN FIX (GOLD & SINGLE LINE) --- */
    .countdown-container {
        justify-content: center !important;
        gap: 0.2rem !important;
        flex-wrap: nowrap !important;
        width: 100%;
        padding: 0 5px;
    }

    .countdown-item {
        min-width: auto !important;
        margin: 0 !important;
        flex: 1 1 auto !important;
        padding: 0.5rem 0.2rem;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 6px;
        backdrop-filter: none;
    }

    .countdown-number {
        font-family: var(--font-heading) !important;
        font-size: 1.8rem !important;
        color: #D4AF37 !important;
        /* GOLD */
        text-shadow: 0 2px 4px rgba(0, 0, 0, 1) !important;
        line-height: 1.2;
    }

    .countdown-label {
        font-size: 0.65rem !important;
        color: #ffffff !important;
        /* WHITE */
        font-weight: bold;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    }

    /* --- MODAL FIX (COMPACT) --- */
    .modal-content {
        background-color: var(--color-bg-soul) !important;
        padding: 1rem !important;
        /* Reduced padding */
        max-width: 340px !important;
        /* Reduced width */
        width: 85% !important;
        border-radius: 12px !important;
        margin: 20% auto !important;
        /* Center vertically better */
    }
}