:root {
    color-scheme: dark;

    /* --- PALETTE: India Market (Strict) --- */
    /* Core Hues */
    --color-saffron: #FF9933;
    --color-blue: #000088;
    --color-green: #138808;
    --color-charcoal: #111111;
    --color-offwhite: #f8f5f0;
    --color-base-dark: #0a0a0a;

    /* Functional Mappings */
    --color-base: var(--color-base-dark);
    --color-surface: #1a1a1a;
    --color-surface-hover: #252525;
    --color-border: rgba(255, 255, 255, 0.1);
    /* Neutral Simplicity */
    --color-border-hover: var(--color-saffron);

    /* Brand Colors */
    --color-primary: var(--color-saffron);
    --color-primary-hover: #e68a00;
    --color-secondary: var(--color-blue);
    --color-accent: var(--color-saffron);
    /* Unified Saffron Accent */

    /* Text */
    --color-text: var(--color-offwhite);
    --color-text-muted: #aaaaaa;
    --color-heading: #ffffff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-saffron) 0%, #ff7700 100%);
    --gradient-luxury: linear-gradient(135deg, var(--color-blue) 0%, #000044 100%);
    --gradient-surface: linear-gradient(180deg, var(--color-surface) 0%, rgba(20, 20, 20, 0) 100%);
    --gradient-dark: linear-gradient(to bottom, #000000, #111111);

    /* --- TYPOGRAPHY (Fluid Scale) --- */
    --font-serif: "Playfair Display", serif;
    --font-sans: "Inter", system-ui, -apple-system, sans-serif;

    /* Clamp: (min, preferred, max) */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
    --text-3xl: clamp(2rem, 1.8rem + 1vw, 2.5rem);
    --text-4xl: clamp(2.5rem, 2.1rem + 2vw, 4rem);

    /* --- SPACING (Fluid) --- */
    --space-1: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
    --space-2: clamp(0.5rem, 0.45rem + 0.25vw, 1rem);
    --space-3: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
    --space-4: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
    --space-5: clamp(2rem, 1.8rem + 1vw, 3rem);
    --space-6: clamp(3rem, 2.5rem + 2.5vw, 6rem);

    /* --- LAYOUT --- */
    --shell-width: min(100% - 2rem, 1400px);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    /* --- EFFECTS --- */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(212, 175, 55, 0.15);
    --glass-bg: rgba(10, 10, 10, 0.85);
    --glass-blur: blur(12px);

    /* Transitions */
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
    --transition: 0.3s var(--ease-out);
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--color-base);
}

body {
    font-family: var(--font-sans);
    background: radial-gradient(circle at 50% 0%, #1a0505 0%, var(--color-base) 60%);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    color: var(--color-heading);
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: var(--text-4xl);
}

h2 {
    font-size: var(--text-3xl);
}

h3 {
    font-size: var(--text-2xl);
}

h4 {
    font-size: var(--text-xl);
}

p {
    margin-bottom: var(--space-3);
    font-size: var(--text-base);
}

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

a:hover {
    color: #fff;
}

.text-gold {
    color: var(--color-saffron);
}

/* Remapped for consistency */
.text-muted {
    color: var(--color-text-muted);
}

.text-center {
    text-align: center;
}

/* --- LAYOUT UTILITIES --- */
.shell {
    width: var(--shell-width);
    margin-inline: auto;
}

.section {
    padding-block: var(--space-6);
    position: relative;
}

/* --- HEADER --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    /* Neutral border */
    padding-block: var(--space-2);
}

.site-header .shell {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.brand-logo span {
    color: var(--color-saffron);
}

/* --- NAVIGATION --- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: var(--space-1);
}

.main-nav {
    display: flex;
    gap: var(--space-4);
}

.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    font-size: var(--text-sm);
    position: relative;
    padding-block: 0.5rem;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--color-saffron);
}

/* Remove desktop underline, keep it simple text color change */
.main-nav a::after {
    display: none;
}

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

    .main-nav {
        position: fixed;
        top: 60px;
        /* Header height approx */
        left: 0;
        right: 0;
        background: rgba(10, 10, 10, 0.95);
        backdrop-filter: blur(15px);
        flex-direction: column;
        align-items: center;
        padding: var(--space-4);
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-150%);
        transition: transform 0.4s var(--ease-out);
        z-index: 999;
        gap: var(--space-3);
        /* Simpler spacing */
    }

    .main-nav.is-open {
        transform: translateY(0);
        box-shadow: var(--shadow-lg);
    }

    .main-nav a {
        font-size: var(--text-lg);
        width: 100%;
        text-align: center;
        /* Remove the borders for a cleaner look */
        border: none;
        padding: 0.5rem 0;
    }
}

/* --- HERO --- */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--gradient-luxury), url('visuals/hero-bg-india.svg');
    background-size: cover;
    background-position: center;
    position: relative;
    padding-block: var(--space-6);
    overflow: hidden;
}

/* Overlay gradient */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 136, 0.5), var(--color-base));
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin-inline: auto;
    text-align: center;
}

.hero__eyebrow {
    display: block;
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--color-saffron);
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.hero__title {
    margin-bottom: var(--space-3);
    background: linear-gradient(to right, #ffffff, #ffdaa6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__title span {
    color: var(--color-saffron);
    background: none;
    -webkit-text-fill-color: var(--color-saffron);
}

.hero__text {
    font-size: var(--text-lg);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
    max-width: 65ch;
    margin-inline: auto;
}

/* --- COMPONENTS: BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1em 2em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: var(--text-sm);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 51, 0.4);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--color-saffron);
    color: var(--color-saffron);
}

.btn-secondary:hover {
    background: rgba(255, 153, 51, 0.1);
    color: #fff;
    border-color: #fff;
}

.btn--full {
    width: 100%;
}

/* --- COMPONENTS: CARDS --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
}

.feature-card {
    background: var(--color-surface);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    text-align: center;
    transition: var(--transition);
}

/* Feature Cards */
.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-saffron);
    box-shadow: var(--shadow-md);
    background: var(--color-surface-hover);
}

/* Forms */
.form-control:focus {
    outline: none;
    border-color: var(--color-saffron);
    box-shadow: 0 0 0 2px rgba(255, 153, 51, 0.2);
}

/* Age Gate */
#age-gate .overlay__dialog {
    border-color: var(--color-saffron);
    box-shadow: 0 0 50px rgba(255, 153, 51, 0.1);
}

#age-gate h2 {
    color: var(--color-saffron);
    margin-bottom: var(--space-2);
}

/* Cookie Banner */
#cookie-consent .overlay__dialog {
    width: min(95%, 800px);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    animation: slideUp 0.4s ease-out;
    background: var(--color-surface);
    border-top: 2px solid var(--color-saffron);
}

.feature-card h3 {
    color: var(--color-text);
    margin-bottom: var(--space-2);
    font-size: var(--text-xl);
}

/* --- GAME GRID --- */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-4);
}

.game-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-saffron);
    box-shadow: var(--shadow-glow);
}

.game-card__media {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.game-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-card__media img {
    transform: scale(1.08);
}

.game-card__content {
    padding: var(--space-3);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.game-card__title {
    font-size: var(--text-lg);
    margin-bottom: 0.5rem;
    color: var(--color-heading);
}

.game-card__desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
    flex-grow: 1;
}

.game-card__play-btn {
    align-self: flex-start;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-saffron);
    font-weight: 500;
    transition: var(--transition);
}

.game-card__play-btn:hover {
    background: var(--color-saffron);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.3);
}

/* --- FORMS --- */
.form-group {
    margin-bottom: var(--space-3);
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: var(--color-base);
    border: 1px solid #333;
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* --- FOOTER --- */
.site-footer {
    background: #050505;
    border-top: 1px solid var(--color-surface);
    padding-block: var(--space-6) var(--space-4);
    font-size: var(--text-sm);
}

.footer-content {
    display: grid;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 2fr 1fr;
        align-items: start;
    }
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
}

.footer-compliance {
    margin-top: var(--space-4);
    display: flex;
    justify-content: center;
}

/* --- MODALS & OVERLAYS (Modern) --- */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    /* Darker backdrop */
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay[data-visible="true"] {
    opacity: 1;
    pointer-events: auto;
}

.overlay__dialog {
    background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    width: min(90%, 500px);
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.overlay[data-visible="true"] .overlay__dialog {
    transform: scale(1);
}

/* Age Gate Specifics */
#age-gate .overlay__dialog {
    border-color: var(--color-gold);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.1);
}

#age-gate h2 {
    color: var(--color-gold);
    margin-bottom: var(--space-2);
}

/* Cookie Banner (Fixed Bottom) */
#cookie-consent {
    place-items: end center;
    padding-bottom: var(--space-3);
    background: none;
    /* No backdrop for cookie banner usually, or distinct */
    backdrop-filter: none;
    pointer-events: none;
    /* Let clicks pass through if not visible */
}

#cookie-consent[data-visible="true"] {
    background: rgba(0, 0, 0, 0.4);
    pointer-events: auto;
}

#cookie-consent .overlay__dialog {
    width: min(95%, 800px);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    animation: slideUp 0.4s ease-out;
    background: var(--color-surface);
    border-top: 2px solid var(--color-gold);
}

@media (min-width: 768px) {
    #cookie-consent .overlay__dialog {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Legal Page Container */
.legal-content {
    background: var(--color-surface);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

/* --- UTILITIES --- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}