/* ==========================================================================
   FancyOrb Events -- Design Token System & Base Styles
   Deep-ocean luxe: bioluminescent cyan against midnight blue void.
   ========================================================================== */

/* Google Fonts -- Exo 2 for headings (geometric, techy), Plus Jakarta Sans for body */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    /* ----- Brand Colors ----- */
    --primary: #0c89bd;
    --primary-hover: #10b2d2;
    --primary-dark: #042474;
    --primary-light: #2bb7f1;
    --accent: #10b2d2;
    --accent-glow: rgba(16, 178, 210, 0.3);
    --accent-glow-strong: rgba(16, 178, 210, 0.55);

    /* ----- Dark Theme Backgrounds ----- */
    --dark: #040c1e;
    --dark-elevated: #0a1628;
    --dark-surface: #0f1d33;
    --dark-overlay: rgba(4, 12, 30, 0.92);

    /* ----- Surface Colors ----- */
    --surface: rgba(15, 29, 51, 0.8);
    --surface-hover: rgba(20, 38, 65, 0.9);
    --surface-card: rgba(10, 22, 40, 0.95);
    --surface-glass: rgba(10, 22, 40, 0.6);

    /* ----- Borders ----- */
    --border: rgba(12, 137, 189, 0.15);
    --border-hover: rgba(16, 178, 210, 0.3);
    --border-active: rgba(16, 178, 210, 0.5);
    --border-subtle: rgba(255, 255, 255, 0.06);

    /* ----- Text ----- */
    --light: #ffffff;
    --text-primary: #f0f6ff;
    --text-secondary: rgba(240, 246, 255, 0.7);
    --text-muted: rgba(240, 246, 255, 0.4);
    --text-accent: #10b2d2;

    /* ----- Status Colors ----- */
    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);
    --error: #ef4444;
    --error-glow: rgba(239, 68, 68, 0.3);
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.3);
    --info: #0c89bd;

    /* ----- Badge / Tier Colors ----- */
    --badge-popular: #22c55e;
    --badge-popular-bg: rgba(34, 197, 94, 0.15);
    --badge-best-value: #8b5cf6;
    --badge-best-value-bg: rgba(139, 92, 246, 0.15);
    --badge-max-value: #f97316;
    --badge-max-value-bg: rgba(249, 115, 22, 0.15);
    --badge-sale: #ef4444;
    --badge-sale-bg: rgba(239, 68, 68, 0.15);
    --badge-vip: #eab308;
    --badge-vip-bg: rgba(234, 179, 8, 0.15);

    /* ----- Spacing Scale (4px base) ----- */
    --space-2xs: 0.25rem;   /* 4px */
    --space-xs: 0.5rem;     /* 8px */
    --space-sm: 0.75rem;    /* 12px */
    --space-md: 1rem;       /* 16px */
    --space-lg: 1.5rem;     /* 24px */
    --space-xl: 2rem;       /* 32px */
    --space-2xl: 3rem;      /* 48px */
    --space-3xl: 4rem;      /* 64px */
    --space-4xl: 6rem;      /* 96px */

    /* ----- Typography ----- */
    --font-heading: 'Exo 2', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;

    --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: 2rem;       /* 32px */
    --text-4xl: 2.5rem;     /* 40px */
    --text-5xl: 3.25rem;    /* 52px */
    --text-6xl: 4rem;       /* 64px */

    --leading-tight: 1.2;
    --leading-snug: 1.35;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;

    --tracking-tight: -0.03em;
    --tracking-normal: 0;
    --tracking-wide: 0.04em;
    --tracking-wider: 0.08em;

    /* ----- Border Radius ----- */
    --radius-sm: 0.375rem;   /* 6px */
    --radius-md: 0.5rem;     /* 8px */
    --radius-lg: 0.75rem;    /* 12px */
    --radius-xl: 1rem;       /* 16px */
    --radius-2xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;

    /* ----- Shadows ----- */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(16, 178, 210, 0.15), 0 0 40px rgba(12, 137, 189, 0.08);
    --shadow-glow-strong: 0 0 24px rgba(16, 178, 210, 0.3), 0 0 60px rgba(12, 137, 189, 0.15);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(12, 137, 189, 0.08);
    --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(16, 178, 210, 0.2), 0 0 30px rgba(16, 178, 210, 0.08);

    /* ----- Transitions ----- */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;

    /* ----- Z-Index Scale ----- */
    --z-base: 1;
    --z-dropdown: 50;
    --z-sticky: 100;
    --z-overlay: 200;
    --z-modal: 1000;
    --z-auth-modal: 1100;
    --z-toast: 2000;

    /* ----- Glass Effect ----- */
    --glass-bg: rgba(10, 22, 40, 0.65);
    --glass-border: rgba(16, 178, 210, 0.12);
    --glass-blur: 16px;
}


/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--dark);
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Ambient background gradient -- deep ocean feel */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(4, 36, 116, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(12, 137, 189, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(16, 178, 210, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

img,
svg,
video {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration-fast) ease;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

/* Focus ring for accessibility */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

::selection {
    background: rgba(16, 178, 210, 0.3);
    color: var(--light);
}


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

.main-container {
    position: relative;
    z-index: var(--z-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container--wide {
    max-width: 1400px;
}

.container--narrow {
    max-width: 900px;
}

.content {
    flex: 1;
    padding: var(--space-2xl) 0;
}


/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 800;
}

h2 {
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
}

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

h4 {
    font-size: var(--text-lg);
    font-weight: 600;
}

h5 {
    font-size: var(--text-base);
    font-weight: 600;
}

h6 {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 40%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow:
        0 0 10px rgba(16, 178, 210, 0.4),
        0 0 30px rgba(16, 178, 210, 0.15);
}

/* Overline label -- small caps detail above headings */
.overline {
    font-family: var(--font-heading);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--accent);
    display: inline-block;
    margin-bottom: var(--space-sm);
}

.overline--glow {
    text-shadow: 0 0 12px rgba(16, 178, 210, 0.4);
}


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

/* Text alignment */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* Text color */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-accent    { color: var(--accent); }
.text-success   { color: var(--success); }
.text-error     { color: var(--error); }
.text-warning   { color: var(--warning); }

/* Backgrounds */
.bg-dark      { background-color: var(--dark); }
.bg-elevated  { background-color: var(--dark-elevated); }
.bg-surface   { background-color: var(--dark-surface); }

/* Margin top */
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.mt-5 { margin-top: var(--space-2xl); }

/* Margin bottom */
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mb-5 { margin-bottom: var(--space-2xl); }

/* Padding */
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-md); }
.p-3 { padding: var(--space-lg); }
.p-4 { padding: var(--space-xl); }
.p-5 { padding: var(--space-2xl); }

/* Display */
.hidden       { display: none; }
.block        { display: block; }
.inline-block { display: inline-block; }
.flex         { display: flex; }
.inline-flex  { display: inline-flex; }
.grid         { display: grid; }

/* Flex utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }

/* Grid columns */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Width */
.w-full { width: 100%; }

/* 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;
}

/* Truncate text */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}
