/**
 * Main Stylesheet
 * Core styles, custom properties, base layout, and typography
 */

/* =========================================
   CSS Custom Properties (Design Tokens)
   ========================================= */

:root {
    /* Colors - Primary Palette */
    --color-gold-primary: #C5A059;
    --color-gold-light: #FCD34D;
    --color-gold-dark: #a17f3e;
    --color-gold-accent: #D4AF37;
    --color-gold-glow: rgba(197, 160, 89, 0.25);

    --color-navy-dark: #0F172A;
    --color-navy-blue: #1E3A8A;
    --color-navy-light: #1E293B;
    --color-navy-lighter: #334155;

    --color-cream-bg: #F8F5F2;
    --color-cream-light: #FDFBF9;
    --color-cream-warm: #FFF9F3;

    --color-burgundy: #7F1D1D;

    /* Text Colors */
    --color-text-dark: #0F172A;
    --color-text-muted: #64748B;
    --color-text-light: #F8F5F2;

    /* Gradient Colors */
    --gradient-gold: linear-gradient(135deg, #C5A059 0%, #D4AF37 50%, #C5A059 100%);
    --gradient-gold-shine: linear-gradient(90deg, #C5A059, #FCD34D, #D4AF37, #C5A059);
    --gradient-navy: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
    --gradient-overlay-dark: linear-gradient(to bottom, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9));
    --gradient-overlay-blue: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 58, 138, 0.85) 100%);

    /* Typography */
    --font-display: 'Cinzel', serif;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Lato', sans-serif;

    /* Font Sizes - Responsive */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */
    --text-7xl: 4.5rem;      /* 72px */
    --text-8xl: 6rem;        /* 96px */

    /* Spacing Scale */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Shadows - Enhanced Multi-layer */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    --shadow-gold: 0 4px 20px rgba(197, 160, 89, 0.3);
    --shadow-gold-lg: 0 8px 30px rgba(197, 160, 89, 0.4), 0 2px 10px rgba(197, 160, 89, 0.2);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(197, 160, 89, 0.5), 0 0 40px rgba(197, 160, 89, 0.2);

    /* Border Radius */
    --radius-sm: 0.125rem;
    --radius-base: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-loader: 9999;

    /* Breakpoints (for JS usage) */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    --breakpoint-2xl: 1536px;
}

/* =========================================
   Reset & Base Styles
   ========================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--color-text-dark);
    background-color: var(--color-cream-bg);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text-dark);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-4);
}

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

a:hover {
    color: var(--color-gold-primary);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    transition: all var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gold-primary);
    border-radius: var(--radius-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gold-dark);
}

/* Selection */
::selection {
    background-color: var(--color-gold-primary);
    color: white;
}

::-moz-selection {
    background-color: var(--color-gold-primary);
    color: white;
}

/* =========================================
   Utility Classes
   ========================================= */

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

@media (min-width: 640px) {
    .container {
        padding-left: var(--space-8);
        padding-right: var(--space-8);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: var(--space-12);
        padding-right: var(--space-12);
    }
}

/* Text Utilities */
.text-gold-gradient {
    background: linear-gradient(to right, var(--color-gold-primary), var(--color-gold-light), var(--color-gold-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.text-display {
    font-family: var(--font-display);
}

.text-serif {
    font-family: var(--font-serif);
}

/* Page Sections */
.page-section {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
    min-height: 100vh;
}

.page-section.active {
    display: block;
    opacity: 1;
}

/* =========================================
   Layout Helpers
   ========================================= */

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

/* Grid */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.gap-8 {
    gap: var(--space-8);
}

.gap-12 {
    gap: var(--space-12);
}

/* =========================================
   Accessibility
   ========================================= */

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-gold-primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    z-index: var(--z-tooltip);
}

.skip-to-main:focus {
    top: 0;
}

/* Focus visible */
:focus-visible {
    outline: 2px solid var(--color-gold-primary);
    outline-offset: 2px;
}

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

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* =========================================
   MODERN VISUAL EFFECTS
   ========================================= */

/* Glassmorphism */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Borders */
.gradient-border {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: var(--gradient-gold);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Glow Effects */
.glow-gold {
    box-shadow: var(--shadow-gold);
    transition: box-shadow var(--transition-base);
}

.glow-gold:hover {
    box-shadow: var(--shadow-gold-lg);
}

/* Text Shadows for Depth */
.text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.text-shadow-md {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.text-glow-gold {
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.5), 0 0 20px rgba(197, 160, 89, 0.3);
}

/* Gradient Overlays */
.overlay-gradient {
    position: relative;
}

.overlay-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-overlay-dark);
    pointer-events: none;
}

/* Enhanced Hover Scale */
.hover-scale {
    transition: transform var(--transition-base);
}

.hover-scale:hover {
    transform: scale(1.02);
}

.hover-scale-lg:hover {
    transform: scale(1.05);
}

/* Smooth Elevate */
.hover-elevate {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-elevate:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

/* 3D Transform */
.transform-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Backdrop Blur */
.backdrop-blur {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Smooth Gradient Background */
.bg-gradient-radial {
    background: radial-gradient(circle at top right, var(--color-gold-glow), transparent 70%);
}

/* =========================================
   ADVANCED INTERACTIVE EFFECTS
   ========================================= */

/* Magnetic Button Effect */
.btn-magnetic {
    position: relative;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Shimmer Effect */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.7s ease;
}

.shimmer:hover::before {
    left: 100%;
}

/* Animated Border */
.animated-border {
    position: relative;
    background: linear-gradient(var(--color-cream-bg), var(--color-cream-bg)) padding-box,
                var(--gradient-gold-shine) border-box;
    border: 2px solid transparent;
    animation: borderRotate 3s linear infinite;
}

@keyframes borderRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Pulse Glow */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(197, 160, 89, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(197, 160, 89, 0.8), 0 0 60px rgba(197, 160, 89, 0.4);
    }
}

/* Spotlight Effect */
.spotlight {
    position: relative;
    overflow: hidden;
}

.spotlight::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.15) 0%,
        transparent 60%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.spotlight:hover::before {
    opacity: 1;
    animation: spotlightMove 2s ease-in-out infinite;
}

@keyframes spotlightMove {
    0%, 100% {
        transform: translate(-10%, -10%);
    }
    50% {
        transform: translate(10%, 10%);
    }
}

/* Gradient Text Hover */
.text-gradient-hover {
    background: linear-gradient(90deg, var(--color-text-dark), var(--color-text-dark));
    background-size: 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.5s ease;
}

.text-gradient-hover:hover {
    background: var(--gradient-gold-shine);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 2s linear infinite;
}

/* 3D Card Flip */
.flip-card {
    perspective: 1500px;
}

.flip-card-inner {
    transition: transform 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(5deg) rotateX(5deg);
}

/* Neon Glow */
.neon-glow {
    text-shadow:
        0 0 10px rgba(197, 160, 89, 0.8),
        0 0 20px rgba(197, 160, 89, 0.6),
        0 0 30px rgba(197, 160, 89, 0.4),
        0 0 40px rgba(197, 160, 89, 0.2);
    animation: neonPulse 1.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from {
        text-shadow:
            0 0 10px rgba(197, 160, 89, 0.8),
            0 0 20px rgba(197, 160, 89, 0.6),
            0 0 30px rgba(197, 160, 89, 0.4);
    }
    to {
        text-shadow:
            0 0 20px rgba(197, 160, 89, 1),
            0 0 30px rgba(197, 160, 89, 0.8),
            0 0 40px rgba(197, 160, 89, 0.6),
            0 0 50px rgba(197, 160, 89, 0.4);
    }
}

/* Smooth Scale Bounce */
.scale-bounce {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.scale-bounce:hover {
    transform: scale(1.1);
}

.scale-bounce:active {
    transform: scale(0.95);
}

/* Liquid Fill Effect */
.liquid-fill {
    position: relative;
    overflow: hidden;
}

.liquid-fill::after {
    content: '';
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-gold);
    transition: bottom 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: -1;
}

.liquid-fill:hover::after {
    bottom: 0;
}

/* Floating Animation */
.float-smooth {
    animation: floatSmooth 6s ease-in-out infinite;
}

@keyframes floatSmooth {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(1deg);
    }
    50% {
        transform: translateY(-10px) rotate(-1deg);
    }
    75% {
        transform: translateY(-15px) rotate(0.5deg);
    }
}
