/* ===========================
   CSS Variables (Design Tokens)
   =========================== */
:root {
    /* Primary Colors - Blue Gradient Theme */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Accent Colors */
    --accent-cyan: #0ea5e9;
    --accent-teal: #14b8a6;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 50%, #6366f1 100%);
    --gradient-hero: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 50%, #f0f9ff 100%);
    --gradient-cta: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
    
    /* 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 -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===========================
   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: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: #fff;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===========================
   Typography
   =========================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    color: var(--gray-600);
}

.gradient-text {
    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: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.4);
}

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

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

.btn-ghost {
    background: rgba(255, 255, 255, 0.2);
    color: var(--gray-700);
    backdrop-filter: blur(10px);
}

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

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

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

.btn-ghost-white {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.btn-ghost-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all var(--transition-base);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-500);
}

.logo-icon {
    width: 32px;
    height: 32px;
    stroke: var(--primary-500);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-500);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a:not(.btn) {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-links a:not(.btn):hover {
    color: var(--primary-600);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: all var(--transition-fast);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-circles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(59, 130, 246, 0.1));
    animation: float 20s infinite;
}

.circle-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.circle-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.circle-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(20px, -20px) scale(1.05); }
    50% { transform: translate(-10px, 10px) scale(0.95); }
    75% { transform: translate(15px, 5px) scale(1.02); }
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 32px;
    color: var(--gray-600);
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-trust {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.trust-badge svg {
    width: 20px;
    height: 20px;
    color: var(--accent-emerald);
}

/* Dashboard Preview */
.hero-image {
    display: flex;
    justify-content: center;
}

.dashboard-preview {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform var(--transition-slow);
}

.dashboard-preview:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.preview-header {
    padding: 12px 16px;
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.preview-dots {
    display: flex;
    gap: 8px;
}

.preview-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gray-300);
}

.preview-dots span:first-child { background: #ff5f57; }
.preview-dots span:nth-child(2) { background: #febc2e; }
.preview-dots span:last-child { background: #28c840; }

.preview-content {
    display: flex;
    min-height: 280px;
}

.preview-sidebar {
    width: 60px;
    background: linear-gradient(180deg, var(--primary-600), var(--primary-700));
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-item {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.3);
}

.preview-main {
    flex: 1;
    padding: 20px;
    background: var(--gradient-hero);
}

.preview-title {
    width: 120px;
    height: 24px;
    background: var(--gray-300);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.preview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.preview-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.preview-card .card-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.preview-card .card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
}

.preview-card .card-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.card-earnings .card-icon { color: var(--accent-emerald); }
.card-patients .card-icon { color: var(--primary-500); }
.card-appointments .card-icon { color: var(--accent-amber); }

/* ===========================
   Features Section
   =========================== */
.features {
    padding: 120px 0;
    background: #fff;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.section-title {
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.25rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.feature-card {
    background: #fff;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-lg), 0 0 40px rgba(59, 130, 246, 0.1);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.icon-appointments {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: var(--primary-600);
}

.icon-notifications {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: var(--accent-amber);
}

.icon-invoices {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: var(--accent-emerald);
}

.icon-commissions {
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    color: var(--accent-rose);
}

.feature-title {
    margin-bottom: 12px;
}

.feature-description {
    margin-bottom: 20px;
    color: var(--gray-600);
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.feature-list li::before {
    content: '✓';
    color: var(--accent-emerald);
    font-weight: 700;
}

/* ===========================
   How It Works Section
   =========================== */
.how-it-works {
    padding: 120px 0;
    background: var(--gray-50);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 280px;
    padding: 24px;
}

.step-number {
    width: 64px;
    height: 64px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: var(--shadow-lg), 0 0 30px rgba(59, 130, 246, 0.3);
}

.step-content h3 {
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--gray-600);
}

.step-connector {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-300), var(--primary-500));
}

/* ===========================
   Stats Section
   =========================== */
.stats {
    padding: 80px 0;
    background: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-value::after {
    content: '+';
    -webkit-text-fill-color: var(--primary-500);
}

.stat-label {
    font-size: 1rem;
    color: var(--gray-600);
    margin-top: 8px;
}

/* ===========================
   CTA Section
   =========================== */
.cta {
    padding: 100px 0;
    background: var(--gradient-cta);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta h2 {
    color: #fff;
    margin-bottom: 16px;
}

.cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================
   Footer
   =========================== */
.footer {
    padding: 80px 0 32px;
    background: var(--gray-900);
    color: var(--gray-400);
}

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

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    color: #fff;
}

.footer-brand .logo-icon {
    stroke: var(--primary-400);
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.95rem;
}

.footer-links h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--gray-800);
    font-size: 0.875rem;
}

/* ===========================
   Mobile Menu
   =========================== */
.mobile-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    display: none;
    padding: 24px;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav a:not(.btn) {
    font-size: 1.25rem;
    color: var(--gray-700);
    text-decoration: none;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.mobile-nav .btn {
    text-align: center;
    margin-top: 8px;
}

/* ===========================
   Responsive Styles
   =========================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-trust {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 40px;
    }
    
    .dashboard-preview {
        transform: none;
    }
    
    .step-connector {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .preview-cards {
        grid-template-columns: 1fr;
    }
    
    .features, .how-it-works {
        padding: 80px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .hero-trust {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
}
