/* =========================================
   DESIGN TOKENS & VARIABLES
   ========================================= */
:root {
    /* Colors */
    --bg-base: #030305;
    --bg-surface: rgba(15, 15, 20, 0.6);
    --bg-panel: rgba(25, 25, 35, 0.4);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-purple: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 8rem;
    
    /* Effects */
    --glass-blur: blur(12px);
    --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-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

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

ul {
    list-style: none;
}

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

.section-padding {
    padding: var(--space-2xl) 0;
}

/* Background Effects */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
}

.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

/* =========================================
   COMPONENTS
   ========================================= */

/* Typography Utils */
.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

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

/* Spacing Utils */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-base);
}

.btn-primary:hover {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--text-primary);
}

.btn.large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 1.25rem 0;
    transition: all var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(3, 3, 5, 0.8);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--accent-purple);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a:not(.btn) {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 24px;
    height: 24px;
    position: relative;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 5rem; /* Account for navbar */
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    z-index: 2;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 999px;
    color: var(--accent-indigo);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

/* Hero Visuals */
.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.abstract-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    animation: float 10s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(59, 130, 246, 0.4);
    top: 10%;
    right: 20%;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: rgba(139, 92, 246, 0.4);
    bottom: 10%;
    left: 10%;
    animation-delay: -5s;
}

.hero-glass-card {
    position: relative;
    z-index: 1;
    width: 380px;
    height: 260px;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: rotateY(-10deg) rotateX(5deg);
    transform-style: preserve-3d;
    transition: transform var(--transition-slow);
}

.hero-visual:hover .hero-glass-card {
    transform: rotateY(0deg) rotateX(0deg);
}

.card-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.card-body {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.code-line {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.code-line.active {
    background: var(--accent-gradient);
}

.w-50 { width: 50%; }
.w-60 { width: 60%; }
.w-80 { width: 80%; }
.w-90 { width: 90%; }

/* =========================================
   TRUST SECTION
   ========================================= */
.container-narrow {
    max-width: 900px;
}
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }

.trust-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(10, 10, 15, 0.4);
}

.trust-label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.metric-item h3 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.metric-item p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

/* =========================================
   SERVICES SECTION
   ========================================= */
.section-heading {
    margin-bottom: 4rem;
}

.section-heading .title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

@media (min-width: 1200px) {
    .services-grid.services-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    padding: 2.5rem 2rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

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

.service-card.featured {
    background: linear-gradient(180deg, rgba(30, 30, 45, 0.8) 0%, rgba(20, 20, 30, 0.6) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-gradient);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    color: white;
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-icon.ai {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-indigo);
    border-color: rgba(99, 102, 241, 0.2);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.service-link {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.service-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.service-link .arrow {
    margin-left: 0.5rem;
    transition: transform var(--transition-fast);
}

.service-card:hover .service-link .arrow {
    transform: translateX(4px);
    color: var(--accent-blue);
}

/* =========================================
   HOW WE WORK (TIMELINE)
   ========================================= */
.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding-top: 2rem;
}

.timeline-line {
    position: absolute;
    top: 3rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

@media (max-width: 768px) {
    .timeline-line {
        display: none;
    }
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
    gap: 1.5rem;
}

.timeline-step {
    flex: 1;
    text-align: center;
}

.step-dot {
    width: 48px;
    height: 48px;
    background: var(--bg-surface);
    border: 2px solid var(--accent-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
    transition: all var(--transition-normal);
}

.timeline-step:hover .step-dot {
    background: var(--accent-gradient);
    border-color: transparent;
    transform: scale(1.1);
}

.timeline-step h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.timeline-step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* =========================================
   SOLUTIONS SHOWCASE
   ========================================= */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.solution-pill {
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    font-family: var(--font-heading);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(135deg, rgba(20, 20, 30, 0.4), rgba(30, 30, 45, 0.6));
    transition: all var(--transition-fast);
}

.solution-pill:hover {
    border-color: var(--accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

/* =========================================
   CASE STUDIES
   ========================================= */
.studies-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.study-card {
    padding: 3rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.study-card:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.3);
}

.study-category {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 1rem;
}

.study-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.study-card p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    flex-grow: 1;
}

.study-metric {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.study-metric .text-gradient {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.25rem;
}

/* =========================================
   WHY VEGALOGIC
   ========================================= */
.features-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 4rem;
    align-items: center;
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.8) 0%, rgba(10, 10, 15, 0.6) 100%);
}

.differentiators-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.differentiators-list li {
    display: flex;
    gap: 1.5rem;
}

.list-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 50%;
    background: var(--accent-gradient);
    position: relative;
    top: 4px;
}

.list-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.differentiators-list p {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.features-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.shield-graphic {
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

/* =========================================
   MISSION SECTION
   ========================================= */
.mission-content {
    padding: 5rem 4rem;
    text-align: center;
    position: relative;
}

.quote-mark {
    font-size: 6rem;
    font-family: Georgia, serif;
    color: rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 2rem;
    left: 4rem;
    line-height: 1;
}

.mission-content h2 {
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.mission-footer .company-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.mission-footer .company-role {
    color: var(--accent-purple);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* =========================================
   CTA SECTION
   ========================================= */
.cta-banner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem;
    gap: 2rem;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.8) 0%, rgba(30, 20, 40, 0.8) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.cta-text h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.cta-text p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    border-top: 1px solid var(--border-color);
    padding-top: 4rem;
    background: #020203;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-group h4 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.link-group a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.link-group a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(0, -20px); }
    100% { transform: translate(0, 0); }
}

/* Initial hide for intersection observer */
.fade-in-up, .fade-in {
    opacity: 0;
}

.stagger-in > * {
    opacity: 0;
}

/* Animation classes active state */
.fade-in-up.active {
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in.active {
    animation: fadeIn 1s ease-out forwards;
}

.stagger-in.active > * {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Stagger delay */
.stagger-in.active > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-in.active > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-in.active > *:nth-child(3) { animation-delay: 0.3s; }

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

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

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3.5rem; }
    .services-grid, .services-grid.services-4 { grid-template-columns: repeat(2, 1fr); }
    .hero-content { gap: 2rem; }
    .studies-grid { grid-template-columns: 1fr; }
    .features-wrapper { padding: 3rem 2rem; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* simple mobile menu setup */
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-visual {
        margin-top: 3rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid, .services-grid.services-4 {
        grid-template-columns: 1fr;
    }

    .timeline-steps {
        flex-direction: column;
        gap: 3rem;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .features-wrapper {
        grid-template-columns: 1fr;
        padding: 2.5rem 1.5rem;
    }
    
    .features-visual {
        margin-top: 3rem;
    }

    .mission-content {
        padding: 3rem 2rem;
    }

    .mission-content h2 {
        font-size: 1.75rem;
    }

    .cta-banner {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 2.5rem;
    }
    
    .cta-action {
        justify-content: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
    }
}
