/* ============================================
   PROJECT: rafaelvianna.com (site34-nz)
   CSS ARCHITECTURE: BEM (Block Element Modifier)
   COLOR PALETTE: NZ Southern Lights (aurora-emerald, polar-ice, midnight-ink, festival-magenta, skyline-gold, frost-mist)
   VISUAL EFFECT: Neon Glow (multi-layered box-shadow with glow)
   TYPOGRAPHY: Classic Editorial (Merriweather + Source Sans Pro)
   HTML CLASS APPROACH: Prefix Style (c-, l-, m- prefixes)
   JS NAMING CONVENTION: Descriptive (full descriptive names)
   BUTTON STYLE: Neon Border (transparent background, glowing borders)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

:root {
    /* NZ Southern Lights Palette */
    --aurora-emerald: #00ff88;
    --polar-ice: #8ee7ff;
    --midnight-ink: #051022;
    --festival-magenta: #ff006e;
    --skyline-gold: #ffd56f;
    --frost-mist: #0c1c38;
    --aurora-cyan: #00f5ff;
    --deep-space: #001a2e;
    
    /* Utility Colors */
    --text-primary: #e9f4ff;
    --text-muted: #9fb6d6;
    --text-dark: #1a1a1a;
    --bg-light: #ffffff;
    --bg-dark: var(--midnight-ink);
    --border-color: rgba(142, 231, 255, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Typography */
    --font-heading: 'Merriweather', serif;
    --font-body: 'Source Sans Pro', sans-serif;
    
    /* Header */
    --header-height: 80px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;
    
    /* Layout */
    --layout-max: 1200px;
    
    /* Transitions */
    --transition-fast: 0.25s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

@media (max-width: 600px) {
    :root {
        --header-height: 70px;
    }
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
    max-width: 100%;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--text-primary);
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 136, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 110, 0.12) 0%, transparent 50%),
        linear-gradient(180deg, var(--midnight-ink) 0%, var(--frost-mist) 100%);
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 2rem); }

p {
    margin: 0 0 var(--spacing-md) 0;
}

a {
    color: var(--aurora-emerald);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover, a:focus {
    color: var(--skyline-gold);
}

img {
    display: block;
    height: auto;
    max-width: 100%;
}

/* ============================================
   BEM: LAYOUT BLOCKS (l-)
   ============================================ */
.l-container {
    width: min(100%, var(--layout-max));
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.l-section {
    padding: var(--spacing-xxl) 0;
}

.l-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.l-flex {
    display: flex;
}

.l-flex--col {
    flex-direction: column;
}

.l-flex--center {
    align-items: center;
    justify-content: center;
}

.l-flex--between {
    justify-content: space-between;
}

/* ============================================
   BEM: COMPONENT BLOCKS (c-)
   ============================================ */

/* Header Component */
.c-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(5, 16, 34, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.c-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 var(--spacing-md);
}

.c-header__brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 700;
}

.c-header__nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.c-header__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--spacing-md);
}

.c-header__item {
    margin: 0;
}

.c-header__link {
    color: var(--text-primary);
    font-weight: 600;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.c-header__link:hover {
    color: var(--aurora-emerald);
    background: rgba(0, 255, 136, 0.1);
}

.c-header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.c-header__toggle span {
    width: 25px;
    height: 3px;
    background: var(--aurora-emerald);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

/* Mobile Menu */
.c-mobile-menu {
    position: fixed;
    top: calc(var(--header-height) - 1px);
    left: 0;
    right: 0;
    background: rgba(5, 16, 34, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 999;
    display: none;
    padding: var(--spacing-lg);
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.c-mobile-menu.is-active {
    display: block;
}

.c-mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.c-mobile-menu__item {
    margin: 0;
}

.c-mobile-menu__link {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.c-mobile-menu__link:hover {
    color: var(--aurora-emerald);
    background: rgba(0, 255, 136, 0.1);
}

/* Hero Component */
.c-hero {
    padding-top: calc(var(--header-height) + var(--spacing-xxl));
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background-attachment: scroll;
}

.c-hero__content {
    max-width: 800px;
    padding: var(--spacing-xl) var(--spacing-md);
}

.c-hero__title {
    margin-bottom: var(--spacing-md);
    background: linear-gradient(135deg, var(--aurora-emerald), var(--polar-ice));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.c-hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.c-hero__badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(0, 255, 136, 0.15);
    border: 2px solid var(--aurora-emerald);
    border-radius: var(--radius-full);
    color: var(--aurora-emerald);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-lg);
    box-shadow: 
        0 0 10px rgba(0, 255, 136, 0.3),
        0 0 20px rgba(0, 255, 136, 0.2);
}

/* Button Component */
.c-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.c-button--primary {
    background: transparent;
    border-color: var(--aurora-emerald);
    color: var(--aurora-emerald);
    box-shadow: 
        0 0 10px rgba(0, 255, 136, 0.3),
        0 0 20px rgba(0, 255, 136, 0.2),
        inset 0 0 20px rgba(0, 255, 136, 0.1);
}

.c-button--primary:hover {
    background: var(--aurora-emerald);
    color: var(--midnight-ink);
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.5),
        0 0 40px rgba(0, 255, 136, 0.3),
        0 0 60px rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
}

.c-button--secondary {
    background: transparent;
    border-color: var(--skyline-gold);
    color: var(--skyline-gold);
    box-shadow: 
        0 0 10px rgba(255, 213, 111, 0.3),
        0 0 20px rgba(255, 213, 111, 0.2),
        inset 0 0 20px rgba(255, 213, 111, 0.1);
}

.c-button--secondary:hover {
    background: var(--skyline-gold);
    color: var(--midnight-ink);
    box-shadow: 
        0 0 20px rgba(255, 213, 111, 0.5),
        0 0 40px rgba(255, 213, 111, 0.3);
    transform: translateY(-2px);
}

/* Card Component */
.c-card {
    background: rgba(12, 28, 56, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-base);
}

.c-card:hover {
    border-color: var(--aurora-emerald);
    box-shadow: 
        0 0 20px rgba(0, 255, 136, 0.2),
        0 0 40px rgba(0, 255, 136, 0.1);
    transform: translateY(-5px);
}

.c-card__header {
    margin-bottom: var(--spacing-md);
}

.c-card__title {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: var(--spacing-sm);
}

.c-card__body {
    color: var(--text-muted);
}

.c-card__footer {
    margin-top: var(--spacing-md);
}

/* Game Card Component */
.c-game-card {
    background: rgba(12, 28, 56, 0.7);
    backdrop-filter: blur(15px);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.c-game-card:hover {
    border-color: var(--aurora-emerald);
    box-shadow: 
        0 0 30px rgba(0, 255, 136, 0.4),
        0 0 60px rgba(0, 255, 136, 0.2);
    transform: translateY(-8px);
}

.c-game-card__image {
    width: 100%;
    max-width: 280px;
    height: auto;
    min-height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin: 0 auto var(--spacing-md);
    display: block;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 136, 0.2);
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
}

.c-game-card:hover .c-game-card__image {
    border-color: var(--aurora-emerald);
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 136, 0.4);
    transform: translateY(-5px);
}

.c-game-card__title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.c-game-card__description {
    color: var(--text-muted);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
}

.c-game-card__button {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

/* Benefits Grid */
.c-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

/* Games Grid */
.c-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.5rem);
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

.c-games-grid .c-game-card {
    width: 100%;
    max-width: 350px;
    min-width: 280px;
}

/* FAQ Component */
.c-faq {
    margin: var(--spacing-xl) 0;
}

.c-faq__item {
    background: rgba(12, 28, 56, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.c-faq__question {
    width: 100%;
    padding: var(--spacing-md);
    background: transparent;
    border: none;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
}

.c-faq__question:hover {
    background: rgba(0, 255, 136, 0.1);
    color: var(--aurora-emerald);
}

.c-faq__question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform var(--transition-fast);
}

.c-faq__item.is-active .c-faq__question::after {
    transform: rotate(45deg);
}

.c-faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
    padding: 0 var(--spacing-md);
}

.c-faq__item.is-active .c-faq__answer {
    max-height: 500px;
    padding: var(--spacing-md);
    color: var(--text-muted);
}

/* Testimonials */
.c-testimonials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.c-testimonial {
    background: rgba(12, 28, 56, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    position: relative;
}

.c-testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: var(--spacing-md);
    font-size: 4rem;
    color: var(--aurora-emerald);
    opacity: 0.3;
    font-family: var(--font-heading);
}

.c-testimonial__text {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: var(--spacing-md);
}

.c-testimonial__author {
    font-weight: 600;
    color: var(--aurora-emerald);
}

/* Leaderboard */
.c-leaderboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
}

.c-leaderboard__item {
    background: rgba(12, 28, 56, 0.6);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    min-width: 150px;
    flex: 0 0 auto;
}

.c-leaderboard__rank {
    font-size: 2rem;
    font-weight: 900;
    color: var(--skyline-gold);
    margin-bottom: var(--spacing-xs);
}

.c-leaderboard__name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.c-leaderboard__score {
    color: var(--aurora-emerald);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Footer */
.c-footer {
    background: rgba(5, 16, 34, 0.95);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xxl) 0 var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.c-footer__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.c-footer__section h4 {
    color: var(--aurora-emerald);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
}

.c-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.c-footer__links li {
    margin: 0;
}

.c-footer__links a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.c-footer__links a:hover {
    color: var(--aurora-emerald);
}

.c-footer__compliance {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.c-footer__logo {
    height: 35px !important;
    width: auto !important;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.c-footer__logo:hover {
    opacity: 1;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.c-footer__bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Disclaimer Section */
.c-disclaimer {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.2), rgba(255, 213, 111, 0.15));
    border: 2px solid var(--festival-magenta);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
    text-align: center;
}

.c-disclaimer__title {
    color: var(--festival-magenta);
    margin-bottom: var(--spacing-md);
}

.c-disclaimer__text {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.c-disclaimer__badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.c-disclaimer__badge {
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 0, 110, 0.2);
    border: 1px solid var(--festival-magenta);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ============================================
   BEM: MODIFIERS (--)
   ============================================ */
.c-button--large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1rem;
}

.c-card--featured {
    border-color: var(--aurora-emerald);
    box-shadow: 
        0 0 30px rgba(0, 255, 136, 0.3),
        0 0 60px rgba(0, 255, 136, 0.15);
}

/* ============================================
   MODAL COMPONENTS
   ============================================ */
.c-modal {
    position: fixed;
    inset: 0;
    background: rgba(5, 16, 34, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.c-modal.is-active {
    display: flex;
}

.c-modal__content {
    background: rgba(12, 28, 56, 0.95);
    border: 2px solid var(--aurora-emerald);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 
        0 0 40px rgba(0, 255, 136, 0.4),
        0 0 80px rgba(0, 255, 136, 0.2);
}

.c-modal__title {
    color: var(--aurora-emerald);
    margin-bottom: var(--spacing-md);
}

.c-modal__text {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.c-modal__buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
}

/* Cookie Consent */
.c-cookie-consent {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 350px;
    background: rgba(12, 28, 56, 0.95);
    border: 2px solid var(--aurora-emerald);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    z-index: 9999;
    display: none;
    box-shadow: 
        0 0 30px rgba(0, 255, 136, 0.3),
        0 0 60px rgba(0, 255, 136, 0.15);
}

.c-cookie-consent.is-active {
    display: block;
}

.c-cookie-consent__text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
}

.c-cookie-consent__buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .c-header__menu {
        display: none;
    }
    
    .c-header__toggle {
        display: flex;
    }
    
    .c-games-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .c-games-grid .c-game-card {
        width: 100%;
        max-width: 400px;
    }
    
    .c-benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .c-testimonials {
        grid-template-columns: 1fr;
    }
    
    .c-footer__content {
        grid-template-columns: 1fr;
    }
    
    .c-cookie-consent {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .c-hero {
        padding-top: calc(var(--header-height) + var(--spacing-lg));
        min-height: calc(100vh - var(--header-height));
    }
    
    .c-games-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .c-game-card__image {
        max-width: 100%;
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-xxl: 3rem;
    }
    
    .c-modal__content {
        padding: var(--spacing-lg);
    }
    
    .c-modal__buttons {
        flex-direction: column;
    }
}
