/* ═══════════════════════════════════════════════════════════════════
   GLASSMORPHISM PRO CSS VARIABLES (Light default + Dark override)
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* Glass System - Light base */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.35);
    --glass-shadow: rgba(0, 0, 0, 0.08);
    
    /* Jewel Tone Colors */
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #d4af37;
    --accent-2: #ec4899;
    
    /* Background (Light jewel-inspired) */
    --bg-primary: #f8fafc;
    --bg-secondary: #e0e7ff;
    --bg-tertiary: #f1e7ff;
    
    /* Text */
    --text-primary: #1e1b4b;
    --text-secondary: #475569;
    
    /* Blur System */
    --blur-sm: blur(10px);
    --blur-md: blur(20px);
    --blur-lg: blur(40px);
    
    /* Border Radius */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    
    /* Shadows */
    --shadow-sm: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
    
    /* Typography */
    --font-heading: 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 32px;
    --space-xl: 48px;
}

[data-theme="dark"] {
    --glass-bg: rgba(30, 27, 75, 0.75);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-shadow: rgba(0, 0, 0, 0.3);
    --bg-primary: #0f0e2e;
    --bg-secondary: #1e1b4b;
    --bg-tertiary: #312e81;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    color-scheme: dark;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism Base Class */
.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-md);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-md);
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2.5rem); }

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.7;
    color: var(--text-secondary);
}

/* Buttons - Material 3 + Glass */
.btn {
    padding: 14px 28px;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--blur-sm);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    min-height: 48px;
    line-height: 1.2;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: rgba(255,255,255,0.2);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Form elements */
input, textarea {
    background: rgba(255,255,255,0.08);
    backdrop-filter: var(--blur-sm);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 1rem;
    width: 100%;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255,255,255,0.12);
}

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

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Header & Nav */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-lg);
    border-bottom: 1px solid var(--glass-border);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

nav a:hover, nav a.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

/* Mobile nav */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--glass-bg);
        backdrop-filter: var(--blur-lg);
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
    }
    nav ul.show {
        display: flex;
    }
    .mobile-nav-toggle {
        display: block;
    }
}

/* Theme toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--blur-md);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    font-size: 1.25rem;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(30,27,75,0.4), rgba(30,27,75,0.6)), url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=1280&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 2rem;
}

/* Menu items */
.menu-item {
    background: var(--glass-bg);
    backdrop-filter: var(--blur-md);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item:hover {
    transform: translateY(-6px);
}

.menu-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* Responsive grid collapse */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 1rem;
    }
}

/* Animations */
@keyframes fade-slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fade-slide-up 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Accessibility */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}


/* Header nav spacing floor (normalizer): keep the brand and the
   menu separated when the flex container runs out of width. */
header nav, header nav > div { gap: 1rem; flex-wrap: wrap; }
@media (max-width: 1280px) { header nav ul { gap: 1rem; } }
