/* ========================================
   Eventful Design System
   Modern, Silicon Valley-inspired design
   Hybrid: Dark-first with light mode support
   ======================================== */

/* Steve Jobs Typography - SF Pro Display/Text + Helvetica Neue */
/* No web fonts needed - using system fonts for speed & native feel */

:root {
    /* Brand Colors - Vibrant & Modern (universal across themes) */
    --brand-primary: #0066FF;
    --brand-primary-hover: #0052CC;
    --brand-secondary: #7C3AED;
    --brand-accent: #10B981;
    --brand-warning: #F59E0B;
    --brand-error: #EF4444;

    /* Role-specific accents (for planner/vendor/client differentiation) */
    --role-planner: #0066FF;      /* Deep blue */
    --role-vendor: #F97316;       /* Warm orange */
    --role-client: #06B6D4;       /* Fresh cyan */

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);

    /* === DARK MODE (Default) === */
    /* Neutral Colors - Dark Mode */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --bg-elevated: #1E293B;

    /* Text Colors - Dark Mode */
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-tertiary: #94A3B8;
    --text-inverse: #0F172A;

    /* Border Colors - Dark Mode */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-default: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.20);

    /* Shadows - Dark Mode */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);

    /* Spacing - 8pt Grid System */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */
    --space-3xl: 4rem;     /* 64px */

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Typography - Steve Jobs Style (Apple System Fonts) */
    --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace;

    /* Font Sizes - Modular Scale (1.25 ratio) */
    --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 */

    /* Font Weights */
    --font-light: 300;
    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --font-black: 900;

    /* Line Heights - Apple Style (Tighter) */
    --leading-none: 1;
    --leading-tight: 1.2;
    --leading-snug: 1.3;
    --leading-normal: 1.4;
    --leading-relaxed: 1.5;
    --leading-loose: 1.6;

    /* Letter Spacing - Apple Style (Minimal/Tight) */
    --tracking-tighter: -0.03em;
    --tracking-tight: -0.015em;
    --tracking-normal: -0.01em;  /* Apple uses slightly negative tracking */
    --tracking-wide: 0;
    --tracking-wider: 0.01em;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   LIGHT MODE THEME
   Applied when <html data-theme="light">
   ======================================== */

[data-theme="light"] {
    /* Neutral Colors - Light Mode (HSL-based, perceptually uniform) */
    --bg-primary: hsl(0, 0%, 100%);          /* Pure white background */
    --bg-secondary: hsl(210, 20%, 98%);      /* Very light grey (slight blue tint) */
    --bg-tertiary: hsl(210, 16%, 93%);       /* Light grey */
    --bg-elevated: hsl(0, 0%, 100%);         /* White for cards */

    /* Text Colors - Light Mode (inverted hierarchy) */
    --text-primary: hsl(210, 20%, 10%);      /* Near black */
    --text-secondary: hsl(210, 12%, 38%);    /* Dark grey */
    --text-tertiary: hsl(210, 10%, 50%);     /* Medium grey */
    --text-inverse: hsl(0, 0%, 100%);        /* White for dark backgrounds */

    /* Border Colors - Light Mode (subtle greys) */
    --border-subtle: hsl(210, 16%, 88%);     /* Light grey border */
    --border-default: hsl(210, 14%, 83%);    /* Default border */
    --border-strong: hsl(210, 12%, 68%);     /* Strong border */

    /* Shadows - Light Mode (softer, more diffuse) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.15);

    /* Gradients - Light Mode (adjusted for light backgrounds) */
    --gradient-hero: linear-gradient(180deg, hsl(210, 20%, 98%) 0%, hsl(0, 0%, 100%) 100%);
    --gradient-card: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(124, 58, 237, 0.02) 100%);
}

/* Auto theme based on system preference */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        /* Apply light mode colors when system prefers light and theme not explicitly set to dark */
        --bg-primary: hsl(0, 0%, 100%);
        --bg-secondary: hsl(210, 20%, 98%);
        --bg-tertiary: hsl(210, 16%, 93%);
        --bg-elevated: hsl(0, 0%, 100%);

        --text-primary: hsl(210, 20%, 10%);
        --text-secondary: hsl(210, 12%, 38%);
        --text-tertiary: hsl(210, 10%, 50%);
        --text-inverse: hsl(0, 0%, 100%);

        --border-subtle: hsl(210, 16%, 88%);
        --border-default: hsl(210, 14%, 83%);
        --border-strong: hsl(210, 12%, 68%);

        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
        --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.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.15);

        --gradient-hero: linear-gradient(180deg, hsl(210, 20%, 98%) 0%, hsl(0, 0%, 100%) 100%);
        --gradient-card: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(124, 58, 237, 0.02) 100%);
    }
}

/* ========================================
   Base Styles
   ======================================== */

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

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Accessibility - Focus Indicators (WCAG 2.1)
   ======================================== */

/* Enhanced focus indicators for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* High contrast focus for critical actions */
.btn-primary:focus-visible {
    outline: 3px solid var(--brand-primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(0, 102, 255, 0.2);
}

/* Hide focus when using mouse (but keep for keyboard) */
:focus:not(:focus-visible) {
    outline: none;
}

/* Skip to content link (for screen readers and keyboard users) */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--brand-primary);
    color: white;
    padding: var(--space-md) var(--space-lg);
    text-decoration: none;
    font-weight: var(--font-semibold);
    border-radius: var(--radius-md);
    z-index: 10000;
    transition: top var(--transition-fast);
}

.skip-to-content:focus {
    top: var(--space-md);
    left: var(--space-md);
}

/* Reduced motion for accessibility */
@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;
    }
}

/* ========================================
   Typography - Professional Grade
   ======================================== */

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

h1 {
    font-size: var(--text-6xl);
    font-weight: var(--font-bold);
    letter-spacing: var(--tracking-tighter);
    line-height: 1.1;
}

h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
    line-height: 1.15;
}

h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-tight);
}

h4 {
    font-size: var(--text-2xl);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-normal);
}

h5 {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-normal);
}

h6 {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-normal);
}

p {
    margin-bottom: var(--space-md);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
}

/* Body Text Sizes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

/* Font Weights */
.font-light { font-weight: var(--font-light); }
.font-regular { font-weight: var(--font-regular); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }

/* Text Colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }

/* Secondary Text (Subtitles, Descriptions) */
.text-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    font-weight: var(--font-regular);
}

.text-caption {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    line-height: var(--leading-normal);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-default);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

/* ========================================
   Form Elements & Validation (Stripe-inspired)
   ======================================== */

/* Form Groups */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    letter-spacing: var(--tracking-normal);
}

.form-label-required::after {
    content: ' *';
    color: var(--brand-error);
}

/* Input Styles */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--text-base);
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    line-height: var(--leading-normal);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

/* Validation States */
.form-input.input-error,
.form-select.input-error,
.form-textarea.input-error {
    border-color: var(--brand-error);
    background: rgba(239, 68, 68, 0.05);
}

.form-input.input-error:focus,
.form-select.input-error:focus,
.form-textarea.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.input-success,
.form-select.input-success,
.form-textarea.input-success {
    border-color: var(--brand-accent);
    background: rgba(16, 185, 129, 0.05);
}

.form-input.input-success:focus,
.form-select.input-success:focus,
.form-textarea.input-success:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-input.input-warning,
.form-select.input-warning,
.form-textarea.input-warning {
    border-color: var(--brand-warning);
    background: rgba(245, 158, 11, 0.05);
}

/* Help Text & Errors */
.form-help {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
    line-height: var(--leading-normal);
}

.form-error {
    display: none;
    font-size: var(--text-sm);
    color: var(--brand-error);
    margin-top: var(--space-xs);
    line-height: var(--leading-normal);
    font-weight: var(--font-medium);
}

.form-error::before {
    content: '⚠ ';
}

.form-input.input-error ~ .form-error,
.form-select.input-error ~ .form-error,
.form-textarea.input-error ~ .form-error {
    display: block;
}

.form-success {
    display: none;
    font-size: var(--text-sm);
    color: var(--brand-accent);
    margin-top: var(--space-xs);
    line-height: var(--leading-normal);
    font-weight: var(--font-medium);
}

.form-success::before {
    content: '✓ ';
}

.form-input.input-success ~ .form-success,
.form-select.input-success ~ .form-success,
.form-textarea.input-success ~ .form-success {
    display: block;
}

/* Disabled State */
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-secondary);
}

/* Placeholder */
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 0.6;
}

/* ========================================
   Cards
   ======================================== */

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

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

.card-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ========================================
   Glassmorphism Effects
   ======================================== */

.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-strong {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ========================================
   Grid System
   ======================================== */

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

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

.grid {
    display: grid;
    gap: var(--space-xl);
}

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

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Logo Styles
   ======================================== */

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: var(--font-extrabold);
    font-size: var(--text-2xl);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

.logo-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.logo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient-primary);
    animation: pulse 2s ease-in-out infinite;
}

.logo-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.logo-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.9);
    }
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: var(--space-md) 0;
}

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

.navbar-brand {
    font-size: var(--text-2xl);
    font-weight: var(--font-extrabold);
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: var(--tracking-tight);
}

.navbar-links {
    display: flex;
    gap: var(--space-xl);
    align-items: center;
}

.navbar-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-normal);
    transition: color var(--transition-fast);
}

.navbar-link:hover {
    color: var(--text-primary);
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: var(--gradient-hero);
    padding: 8rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.15), transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ========================================
   Features Grid
   ======================================== */

.feature-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    font-size: 1.5rem;
}

/* ========================================
   Toast Notifications (Don Norman's Feedback Principle)
   ======================================== */

#toast-container {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 320px;
    max-width: 420px;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.3s ease-out;
    transition: all var(--transition-base);
}

.toast-exit {
    animation: slideOutRight 0.3s ease-in forwards;
    opacity: 0;
    transform: translateX(100%);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1;
}

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--text-primary);
}

.toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Toast Variants */
.toast-success {
    border-left: 4px solid var(--brand-accent);
}

.toast-success .toast-icon {
    color: var(--brand-accent);
}

.toast-error {
    border-left: 4px solid var(--brand-error);
}

.toast-error .toast-icon {
    color: var(--brand-error);
}

.toast-warning {
    border-left: 4px solid var(--brand-warning);
}

.toast-warning .toast-icon {
    color: var(--brand-warning);
}

.toast-info {
    border-left: 4px solid var(--brand-primary);
}

.toast-info .toast-icon {
    color: var(--brand-primary);
}

/* Mobile Toast Adjustments */
@media (max-width: 768px) {
    #toast-container {
        top: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }

    .toast {
        min-width: unset;
        max-width: unset;
    }
}

/* ========================================
   Loading States & Spinners
   ======================================== */

/* Button Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

.btn-secondary.btn-loading::after,
.btn-ghost.btn-loading::after {
    border-color: var(--text-tertiary);
    border-top-color: var(--text-primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Spinner Component */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-default);
    border-radius: 50%;
    border-top-color: var(--brand-primary);
    animation: spin 0.6s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 32px;
    height: 32px;
    border-width: 3px;
}

/* Skeleton Screens */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 0%,
        var(--bg-tertiary) 50%,
        var(--bg-secondary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 80%;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    width: 100%;
}

/* ========================================
   Utilities
   ======================================== */

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

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-1 { gap: var(--space-sm); }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }

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

@media (max-width: 1024px) {
    h1 { font-size: var(--text-5xl); }
    h2 { font-size: var(--text-3xl); }
}

@media (max-width: 768px) {
    :root {
        /* Adjust type scale for mobile */
        --text-6xl: 2.5rem;    /* 40px */
        --text-5xl: 2rem;      /* 32px */
        --text-4xl: 1.75rem;   /* 28px */
    }

    h1 { font-size: var(--text-5xl); }
    h2 { font-size: var(--text-3xl); }
    h3 { font-size: var(--text-2xl); }

    .hero { padding: 4rem 0 3rem; }
    .navbar-links { display: none; } /* Mobile menu - implement later */

    body {
        font-size: var(--text-sm);
    }
}

@media (max-width: 480px) {
    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }
}

/* ========================================
   CTA Section & Footer - Modern Design
   ======================================== */

/* CTA Section */
.cta-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(102, 126, 234, 0.1), transparent 60%);
    pointer-events: none;
}

.section-title {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    margin-bottom: 1rem;
    letter-spacing: var(--tracking-tighter);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: var(--leading-relaxed);
}

/* Footer */
.footer {
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-primary);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-primary), transparent);
    opacity: 0.3;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    font-size: var(--text-3xl);
    font-weight: var(--font-extrabold);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
    letter-spacing: var(--tracking-tight);
}

.footer-description {
    color: var(--text-secondary);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    max-width: 400px;
}

.footer-title {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-tertiary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.875rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-base);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--brand-primary);
    transform: translateX(4px);
}

.footer-links a::before {
    content: '→';
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.footer-links a:hover::before {
    opacity: 1;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    margin: 0;
}

/* Social Links (opcional) */
.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive Footer */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .section-title {
        font-size: var(--text-4xl);
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 4rem 0 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer-brand {
        font-size: var(--text-2xl);
    }

    .section-title {
        font-size: var(--text-3xl);
    }

    .section-subtitle {
        font-size: var(--text-base);
    }

    .cta-section {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-grid {
        gap: 2rem;
    }

    .section-title {
        font-size: var(--text-2xl);
    }
}
