/* ═══════════════════════════════════════════════════════════════
   HODOPHILE — Design System & Global Styles
   Multi-Origin Travel Optimization Engine
   ═══════════════════════════════════════════════════════════════ */

/* ─── CSS Variables / Design Tokens ─── */
:root {
    /* Brand Colors */
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-primary-glow: rgba(99, 102, 241, 0.3);
    
    --color-secondary: #06b6d4;
    --color-secondary-light: #22d3ee;
    
    --color-accent: #f59e0b;
    --color-accent-light: #fbbf24;
    
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Neutral Palette */
    --color-bg-primary: #0a0f1c;
    --color-bg-secondary: #111827;
    --color-bg-tertiary: #1f2937;
    --color-bg-card: rgba(17, 24, 39, 0.7);
    --color-bg-card-hover: rgba(31, 41, 55, 0.9);
    --color-bg-glass: rgba(255, 255, 255, 0.03);
    --color-bg-glass-hover: rgba(255, 255, 255, 0.06);
    
    --color-text-primary: #f9fafb;
    --color-text-secondary: #9ca3af;
    --color-text-tertiary: #6b7280;
    --color-text-muted: #4b5563;
    
    --color-border: rgba(255, 255, 255, 0.06);
    --color-border-hover: rgba(255, 255, 255, 0.12);
    --color-border-active: rgba(99, 102, 241, 0.4);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1, #06b6d4);
    --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
    --gradient-cool: linear-gradient(135deg, #06b6d4, #10b981);
    --gradient-hero: radial-gradient(ellipse at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                     radial-gradient(ellipse at 70% 50%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    --gradient-card: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(6, 182, 212, 0.02));
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --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;
    
    /* 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;
    
    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --shadow-glow-lg: 0 0 80px rgba(99, 102, 241, 0.2);
    
    /* 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: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-toast: 500;
}

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

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: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

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

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

/* ─── Container ─── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ─── Navigation ─── */
.nav-glass {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.nav-glass.scrolled {
    background: rgba(10, 15, 28, 0.95);
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
}

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

.brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xl);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.nav-link {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-glass-hover);
}

.nav-link.active {
    color: var(--color-primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--color-bg-glass-hover);
}

.theme-icon {
    font-size: var(--text-lg);
}

/* ─── Hero Section ─── */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-24) var(--space-6) var(--space-16);
    overflow: hidden;
}

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

.particle-field {
    position: absolute;
    inset: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.12);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(6, 182, 212, 0.1);
    top: 40%;
    right: 10%;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(245, 158, 11, 0.08);
    bottom: 10%;
    left: 30%;
    animation-delay: -14s;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: var(--color-bg-glass);
    border: 1px solid var(--color-border);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
}

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

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: var(--space-6);
}

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

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: var(--space-10);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle strong {
    color: var(--color-text-primary);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-16);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
}

.stat-value {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-text-primary);
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

/* ─── Scroll Indicator ─── */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
}

.scroll-mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--color-text-tertiary);
    border-radius: 12px;
    position: relative;
}

.scroll-dot {
    width: 4px;
    height: 8px;
    background: var(--color-text-tertiary);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollDown 2s ease-in-out infinite;
}

/* ─── Sections ─── */
.section {
    padding: var(--space-24) 0;
    position: relative;
}

.section-dark {
    background: var(--color-bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-4);
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-4);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

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

/* ─── Agent Grid ─── */
.agent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.agent-card {
    position: relative;
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    transition: all var(--transition-slow);
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.1), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-slow);
}

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

.agent-card:hover::before {
    opacity: 1;
}

.agent-icon {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
}

.agent-number {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 800;
    color: var(--color-bg-tertiary);
    line-height: 1;
}

.agent-name {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.agent-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.agent-tools {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tool-tag {
    font-size: var(--text-xs);
    font-weight: 500;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary-light);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

/* ─── About Grid ─── */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.about-card {
    padding: var(--space-8);
    border-radius: var(--radius-lg);
    background: var(--color-bg-glass);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.about-card:hover {
    border-color: var(--color-border-hover);
    background: var(--color-bg-glass-hover);
    transform: translateY(-2px);
}

.about-icon {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.about-card p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* ─── Footer ─── */
.footer {
    padding: var(--space-12) 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-primary);
}

.footer-content {
    text-align: center;
}

.footer-content .footer-brand {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.footer-content .brand-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-lg);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-4);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.footer-divider {
    color: var(--color-text-muted);
}

.footer-copy {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-4);
    }
    
    .stat-divider {
        width: 40px;
        height: 1px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .planner-layout {
        flex-direction: column;
    }
    
    .agent-grid {
        grid-template-columns: 1fr;
    }
}
