/* ============================================
   BakerySaaS - Common Styles
   Modern Design System
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
    /* Primary Colors */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-300: #a5b4fc;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-800: #3730a3;
    --primary-900: #312e81;
    
    /* Secondary - Coral/Orange */
    --secondary-50: #fff7ed;
    --secondary-100: #ffedd5;
    --secondary-200: #fed7aa;
    --secondary-300: #fdba74;
    --secondary-400: #fb923c;
    --secondary-500: #f97316;
    --secondary-600: #ea580c;
    
    /* Accent Colors */
    --accent-teal: #14b8a6;
    --accent-emerald: #10b981;
    --accent-cyan: #06b6d4;
    --accent-rose: #f43f5e;
    --accent-violet: #8b5cf6;
    --accent-amber: #f59e0b;
    
    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gray-950: #020617;
    
    /* Semantic Colors */
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --gradient-secondary: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-mesh: radial-gradient(at 40% 20%, hsla(240, 90%, 70%, 0.15) 0px, transparent 50%),
                     radial-gradient(at 80% 0%, hsla(280, 90%, 70%, 0.1) 0px, transparent 50%),
                     radial-gradient(at 0% 50%, hsla(340, 90%, 70%, 0.1) 0px, transparent 50%),
                     radial-gradient(at 80% 50%, hsla(200, 90%, 70%, 0.1) 0px, transparent 50%),
                     radial-gradient(at 0% 100%, hsla(22, 90%, 70%, 0.1) 0px, transparent 50%);
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px 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.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.4);
    --shadow-glow-lg: 0 0 60px rgba(99, 102, 241, 0.5);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Typography */
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;
    
    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slower: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* Reset & Base */
*, *::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: var(--leading-normal);
    color: var(--gray-800);
    background: var(--bg-secondary);
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

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

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

.text-gradient-warm {
    background: linear-gradient(135deg, #f97316 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    padding: 1rem 0;
    transition: all var(--transition-slow);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1200px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 1.5rem !important;
    flex-wrap: nowrap !important;
}

@media (max-width: 1200px) {
    .navbar .container {
        padding: 0 1rem !important;
        gap: 0.75rem;
    }

    .nav-link {
        padding: 0.45rem 0.75rem;
        font-size: 0.82rem;
    }

    .navbar-actions {
        gap: 0.5rem;
    }

    .navbar-actions .btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.82rem;
    }
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--gray-900);
    text-decoration: none;
    flex-shrink: 0;
}

.brand-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
    box-shadow: var(--shadow-md);
}

.navbar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav li {
    list-style: none;
}

.nav-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-600);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--gray-900);
    background: var(--gray-100);
}

.nav-link.active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.navbar-toggler {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    background: transparent;
    border: none;
    cursor: pointer;
}

.navbar-toggler:hover {
    background: var(--gray-100);
}

/* Mobile Navigation Menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: calc(var(--z-fixed) + 10);
    padding: var(--space-6);
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}

.mobile-nav.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-8);
}

.mobile-nav-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

.mobile-nav-close:hover {
    background: var(--gray-100);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-links a {
    display: block;
    padding: var(--space-4);
    font-weight: 500;
    font-size: var(--text-lg);
    color: var(--gray-700);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    text-decoration: none;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--primary-600);
    background: var(--primary-50);
}

.mobile-nav-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.mobile-nav-actions .btn {
    width: 100%;
    justify-content: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-weight: 600;
    font-size: var(--text-sm);
    line-height: var(--leading-tight);
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--gray-900);
    color: white;
}

.btn-secondary:hover {
    background: var(--gray-800);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

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

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

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-xl {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-lg);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--primary-50);
    color: var(--primary-600);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    border: 1px solid var(--primary-100);
    margin-bottom: var(--space-6);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--gray-900);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--gray-500);
    line-height: var(--leading-relaxed);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-2xl);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: all var(--transition-slow);
}

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

.card-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--gray-900);
    color: white;
    padding-top: var(--space-20);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: var(--space-12);
    padding-bottom: var(--space-16);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 800;
    font-size: var(--text-xl);
    color: white;
    margin-bottom: var(--space-4);
}

.footer-brand .brand-icon {
    background: var(--gradient-primary);
}

.footer-desc {
    color: var(--gray-400);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: var(--space-3);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--gray-400);
    transition: all var(--transition-base);
}

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

.footer-column h6 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: white;
    margin-bottom: var(--space-5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-links a {
    color: var(--gray-400);
    font-size: var(--text-sm);
    transition: all var(--transition-base);
}

.footer-links a:hover {
    color: white;
    padding-left: var(--space-2);
}

.footer-bottom {
    padding: var(--space-6) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: var(--text-sm);
}

.footer-bottom-links {
    display: flex;
    gap: var(--space-6);
}

.footer-bottom-links a {
    color: var(--gray-500);
    font-size: var(--text-sm);
    transition: color var(--transition-base);
}

.footer-bottom-links a:hover {
    color: white;
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

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

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

/* Grid */
.grid {
    display: grid;
    gap: var(--space-6);
}

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

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Delay utilities */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
    
    .footer-info {
        grid-column: span 2;
    }
}

@media (max-width: 991px) {
    .navbar-nav {
        display: none;
    }
    
    .navbar-actions {
        display: none;
    }
    
    .navbar-toggler {
        display: flex;
    }
}

@media (max-width: 768px) {
    :root {
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
        --text-7xl: 3.5rem;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: var(--space-16) 0;
    }
    
    .section-title {
        font-size: var(--text-3xl);
    }

    .container {
        padding: 0 var(--space-4);
    }

    .btn {
        max-width: 100%;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-info {
        grid-column: span 2;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .btn-lg {
        padding: var(--space-3) var(--space-6);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-info {
        grid-column: span 1;
    }
}
