/* ==========================================================================
   The Workplace - Modern CSS Framework
   ========================================================================== */

/* CSS Custom Properties (Variables) */
:root {
    /* Color System */
    --primary: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #8B5CF6;
    --secondary: #1F2937;
    --secondary-light: #374151;
    --accent: #F97316;
    --accent-light: #FB923C;
    --success: #10B981;
    --success-light: #34D399;
    --neutral: #6B7280;
    --neutral-light: #9CA3AF;
    --warm-gray: #F9FAFB;
    --white: #FFFFFF;
    --black: #000000;
    
    /* Typography */
    --font-display: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --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-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 0.15s ease-out;
    --transition-base: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;
}

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

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

html {
    scroll-behavior: smooth;
    font-size: 100%;
    line-height: 1.6;
}

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--secondary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.font-display {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent) 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

.glass-effect {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.1);
}

.warm-glow {
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.1), 0 10px 40px rgba(99, 102, 241, 0.15);
}

.warm-glow:hover {
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2), 0 20px 60px rgba(99, 102, 241, 0.25);
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    transition: all var(--transition-base);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    padding: 0 var(--space-lg);
    flex-wrap: nowrap;
    overflow: hidden;
}

.navbar-brand {
    flex-shrink: 0;
}

.navbar-brand img {
    max-height: 2.5rem;
    width: auto;
}

.navbar-nav {
    display: none;
    align-items: center;
    gap: var(--space-lg);
    flex-wrap: nowrap;
    white-space: nowrap;
}

.navbar-nav a {
    color: var(--neutral);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.navbar-nav a:hover,
.navbar-nav a:focus {
    color: var(--primary);
    transform: scale(1.05);
}

.navbar-nav a.active {
    color: var(--accent);
    font-weight: 700;
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--neutral);
    padding: var(--space-sm);
    cursor: pointer;
    transition: color var(--transition-base);
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    color: var(--primary);
}

.mobile-menu {
    position: fixed;
    top: 4rem;
    right: 0;
    height: calc(100vh - 4rem);
    width: 16rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-2xl);
    border-left: 1px solid rgba(99, 102, 241, 0.1);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    padding: var(--space-lg);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu a {
    display: block;
    padding: var(--space-md) var(--space-sm);
    color: var(--neutral);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    margin-bottom: var(--space-sm);
}

.mobile-menu a:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--primary);
}

/* Desktop Navigation */
@media (min-width: 768px) {
    .navbar-nav {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .navbar-container {
        gap: var(--space-md);
    }
}

/* Responsive navbar for medium screens */
@media (min-width: 768px) and (max-width: 1200px) {
    .navbar-nav {
        gap: var(--space-md);
    }
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
    gap: var(--space-sm);
    min-height: 3.5rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #7C3AED 100%);
    box-shadow: 0 8px 40px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    color: var(--white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.3);
}

.btn-accent:hover {
    background: linear-gradient(135deg, #EA580C 0%, var(--accent) 100%);
    box-shadow: 0 8px 40px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
}

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

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.loading-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    margin-left: var(--space-sm);
}

/* Navbar specific button styling */
.navbar-nav .btn {
    padding: 0.75rem 1.5rem;
    min-height: 2.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.navbar-nav .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(99, 102, 241, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.navbar-nav .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #7C3AED 100%);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Mobile menu button styling */
.mobile-menu .btn {
    padding: 0.875rem 1.5rem;
    min-height: 3rem;
    font-size: 0.875rem;
    justify-content: center;
    text-align: center;
}

.mobile-menu .btn-primary {
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mobile-menu .btn-primary:hover {
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Responsive button adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .navbar-nav .btn {
        padding: 0.625rem 1.25rem;
        min-height: 2.5rem;
        font-size: 0.8125rem;
    }
}

@media (min-width: 1024px) {
    .navbar-nav .btn {
        padding: 0.875rem 1.75rem;
        min-height: 2.875rem;
        font-size: 0.9375rem;
    }
}

/* Enhanced button contrast for better readability across different backgrounds */
.btn-primary:focus,
.btn-primary:active {
    color: var(--white) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Ensure button text remains readable in all contexts */
.btn-primary,
.btn-primary:visited {
    color: var(--white) !important;
    text-decoration: none;
}

.btn-primary:hover,
.btn-primary:focus {
    color: var(--white) !important;
    text-decoration: none;
}

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

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 25%, var(--primary) 75%, var(--primary-light) 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.hero-bg-elements {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.25;
}

.hero-bg-elements > div {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: float 6s ease-in-out infinite;
}

/* ==========================================================================
   Cards & Content Blocks
   ========================================================================== */

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 32px 64px -12px rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.2);
}

.feature-icon {
    width: 5rem;
    height: 5rem;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    transition: transform var(--transition-base);
}

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

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--secondary);
    margin-bottom: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: 1.25rem 1.5rem;
    border: 2px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    transition: all var(--transition-base);
    background: var(--white);
    min-height: 3.5rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-error .form-input {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-success .form-input {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ==========================================================================
   Notifications
   ========================================================================== */

.notification {
    position: fixed;
    top: 5rem;
    right: var(--space-lg);
    max-width: 25rem;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 60;
    animation: notificationIn 0.3s ease-out;
    word-wrap: break-word;
}

.notification.success {
    background: var(--success);
    color: var(--white);
    border: 1px solid #059669;
}

.notification.error {
    background: #ef4444;
    color: var(--white);
    border: 1px solid #dc2626;
}

.notification.warning {
    background: #f59e0b;
    color: var(--white);
    border: 1px solid #d97706;
}

.notification.info {
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary-dark);
}

.notification.hiding {
    animation: notificationOut 0.3s ease-in;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 50%, var(--primary) 100%);
    color: var(--white);
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.footer-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.05;
}

.footer-content {
    position: relative;
    z-index: 10;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.footer-links a:hover {
    color: var(--accent);
    transform: scale(1.05);
}

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.2) 50%, transparent 100%);
    margin: var(--space-xl) 0;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

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

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-30px); }
    100% { opacity: 1; transform: translateX(0); }
}

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

@keyframes notificationIn {
    0% { opacity: 0; transform: translateX(100%); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes notificationOut {
    0% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}

.animate-fade-in { animation: fadeIn 1s ease-out; }
.animate-slide-up { animation: slideUp 0.8s ease-out; }
.animate-slide-in-left { animation: slideInLeft 0.6s ease-out; }
.animate-slide-in-right { animation: slideInRight 0.6s ease-out; }

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

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: var(--accent);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    text-decoration: none;
    z-index: 100;
    transform: translateY(-100vh);
    transition: transform var(--transition-base);
}

.skip-link:focus {
    transform: translateY(0);
}

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

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Mobile First Approach */
@media (min-width: 475px) {
    .container {
        padding: 0 var(--space-lg);
    }
}

@media (min-width: 640px) {
    .navbar-container {
        padding: 0 var(--space-xl);
    }
    
    .container {
        padding: 0 var(--space-xl);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-2xl);
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles would go here */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    /* High contrast styles would go here */
}

/* Print styles */
@media print {
    .navbar,
    .mobile-menu,
    .notification {
        display: none !important;
    }
    
    .hero {
        background: var(--white) !important;
        color: var(--black) !important;
    }
}