/* Copyright © 2026 EntireSoftwareLabs — entiresoftwarelabs.com — All rights reserved. */
/* ===================================
    Variables & Base Styles (Mobile-First 2026)
    =================================== */
:root {
    /* Color Palette */
    --primary-color: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #6366F1;
    --secondary-color: #10B981;
    --accent-color: #06B6D4;
    --accent-start: #06B6D4;
    --accent-mid: #8B5CF6;
    --accent-end: #F472B6;
    --dark-bg: #0F172A;
    --dark-secondary: #1E293B;
    --dark-tertiary: #334155;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-light: #94A3B8;
    --white: #ffffff;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Fluid Spacing (Mobile-first with clamp) */
    --spacing-xs: clamp(0.25rem, 0.5vw, 0.5rem);
    --spacing-sm: clamp(0.75rem, 2vw, 1rem);
    --spacing-md: clamp(1.25rem, 3vw, 2rem);
    --spacing-lg: clamp(2.5rem, 5vw, 4rem);
    --spacing-xl: clamp(4rem, 8vw, 6rem);

    /* Fluid Typography (clamp for responsive scaling) */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: clamp(1rem, 2.5vw, 1.125rem);
    --font-size-sm: clamp(0.875rem, 2vw, 1rem);
    --font-size-lg: clamp(1.125rem, 2.75vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 3vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 4vw, 2rem);
    --font-size-3xl: clamp(1.875rem, 5vw, 2.5rem);
    --font-size-4xl: clamp(2.25rem, 6vw, 3.5rem);
    --font-size-5xl: clamp(2.5rem, 7vw, 4.5rem);

    /* Container widths */
    --container-xs: 20rem;
    --container-sm: 40rem;
    --container-md: 48rem;
    --container-lg: 64rem;
    --container-xl: 80rem;
    --container-2xl: 90rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.03);

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Touch target minimum (iOS/Android guidelines) */
    --touch-target-min: 48px;
}

/* Global resets */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth;
    /* Use base 16px for rem calculations */
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body { 
    font-family: var(--font-primary); 
    color: var(--text-primary); 
    font-size: var(--font-size-base);
    line-height: 1.6; 
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Reserve space for fixed header - uses CSS variable for responsiveness */
    padding-top: var(--header-height, 80px);
}

/* Container with fluid max-width */
.container { 
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto; 
    padding: 0 clamp(1rem, 3vw, 2rem);
}

section { 
    padding: var(--spacing-xl) 0; 
}

/* Responsive images by default */
img, 
picture, 
video, 
canvas, 
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Page header styling for non-home pages */
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers) { position: relative; min-height: 40vh; display: flex; align-items: center; background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-dark) 100%); color: var(--white); }
.section .container { position: relative; z-index: 1; }
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers)::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.4) 0%, transparent 40%), radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.3) 0%, transparent 40%); animation: backgroundPulse 15s ease infinite; }

/* Header/navbar styles moved to pages/header.css */

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.hero-background {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(79, 70, 229, 0.4) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.3) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.15) 0%, transparent 60%);
    animation: backgroundPulse 15s ease infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: min(900px, 90%);
    padding: 0 var(--spacing-sm);
}

.hero-title {
    font-size: var(--font-size-5xl);
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease;
    line-height: 1.1;
    /* Ensure readable line length on mobile */
    /* max-width moved to responsive rules to avoid constraining desktop layout */
    margin-left: auto;
    margin-right: auto;
}

.title-highlight {
    display: inline-block;
    font-weight: 800;
    padding: 0 0.12rem;
    border-radius: 4px;
    /* animated gradient text using brand accents */
    background: linear-gradient(90deg, var(--accent-start) 0%, var(--accent-mid) 50%, var(--accent-end) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease 0.2s backwards;
    line-height: 1.6;
    /* Optimal line length: 45-75 characters */
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: column; /* primary button above secondary buttons */
    gap: var(--spacing-md);
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.secondary-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

/* .mouse removed - scroll indicator simplified */

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

/* ===================================
   Buttons (Touch-optimized, 48x48px minimum)
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-target-min);
    min-width: var(--touch-target-min);
    padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-normal);
    font-size: var(--font-size-base);
    text-decoration: none;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-start), var(--accent-mid));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: linear-gradient(90deg, var(--accent-mid), var(--accent-end));
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-primary.loading {
    position: relative;
    color: transparent;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--accent-mid);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--white);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ===================================
   Section Headers
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-tag {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.section-title {
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    margin-top: 0.75rem;
    line-height: 1.6;
}

/* Section header / title styles (centralized - derived from Services) */
.section .section-header {
    text-align: center;
    margin-bottom: 3rem;
    /* Ensure section headers are fully visible and not cut off by fixed header */
    padding-top: 1rem;
}

.section .section-tag {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.section .section-title {
    /* Keep a minimal base for section titles here; page-specific styles
       (src/css/pages/*) should provide the definitive size and decorative
       ::after widths to avoid conflicting large overrides. */
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    font-weight: 800;
}

.section .section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* White text for sections with dark backgrounds */
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers) .section-header,
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers) .section-title,
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers) .section-subtitle,
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers) p,
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers) h1,
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers) h2,
.section:not(.about):not(.services):not(.portfolio):not(.technologies):not(.contact):not(.careers) h3 {
    color: var(--white);
}

/* ===================================
   About Section
   =================================== */
.about {
    background: var(--gray-100);
}

.about-text h3 {
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: var(--spacing-md);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Services styles moved to pages/services.css */

/* ===================================
   Portfolio Section
   =================================== */
/* Portfolio styles moved to pages/portfolio.css */

/* ===================================
   Technologies Section
   =================================== */
/* Technologies styles moved to pages/technologies.css */

/* ===================================
   Contact Section
   =================================== */
/* Contact styles moved to pages/contact.css */

/* ===================================
   Careers Section
   =================================== */
/* Careers styles moved to pages/careers.css */
/* Footer Legal Links */
.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--dark-secondary);
    color: var(--text-light);
}

.footer-legal {
    margin-bottom: var(--spacing-sm);
}

.footer-legal a {
    color: var(--text-light);
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--primary-light);
}

.footer-legal .divider {
    margin: 0 var(--spacing-sm);
    color: var(--dark-tertiary);
}

/* Footer - mobile-first base (desktop variants are applied at larger widths) */
.footer {
    background: var(--dark-bg);
    color: var(--text-light);
    /* keep mobile padding modest; page-specific footer overrides in pages/footer.css */
    padding: var(--spacing-md) 0 var(--spacing-sm);
}

/* Desktop & larger screens: apply richer layout and sizing */
@media (min-width: 48em) {
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }

    .footer-content {
        display: grid;
        grid-template-columns: 1fr 0.9fr 0.9fr 0.9fr;
        gap: 1.5rem;
        margin-bottom: var(--spacing-md);
        align-items: start;
    }

    .footer-section h3 {
        color: var(--white);
        margin-bottom: var(--spacing-md);
        font-size: 1.25rem;
    }

    /* Footer layout is defined in pages/footer.css; keep lightweight
       desktop fallbacks here to avoid strong duplication. */
    .footer-logo {
        max-height: 120px;
        width: auto;
        max-width: 320px;
        margin: 0;
        object-fit: contain;
        display: block;
        padding: 0;
    }

    .footer-section:first-child {
        /* allow pages/footer.css to control precise layout and spacing */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 0;
    }

    .footer-section:first-child p {
        color: var(--text-light);
        line-height: 1.6;
        font-size: 0.95rem;
        margin: 0;
    }

    .footer-section:first-child p:last-child {
        margin-top: 0;
    }

    .footer-description {
        color: var(--text-light);
        line-height: 1.8;
        font-size: 0.95rem;
        margin: 0;
        margin-top: 0;
        max-width: 48ch;
        text-align: left;
        letter-spacing: 0.3px;
        word-spacing: 0.05em;
        font-weight: 400;
        opacity: 0.95;
    }

    .footer-links {
        list-style: none;
    }

    .footer-section:not(:first-child) {
        margin-left: 2rem;
    }

    .footer-links li {
        margin-bottom: 0.75rem;
    }

    .footer-links a {
        color: var(--text-light);
        transition: var(--transition-fast);
        position: relative;
    }
    .footer-links a:hover { color: var(--primary-light); }

    .footer-contact {
        list-style: none;
    }

    .footer-contact li {
        display: flex;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
        align-items: flex-start;
    }

    .footer-contact i {
        color: var(--primary-light);
        margin-top: 0.25rem;
    }

    .footer-contact a {
        color: var(--text-light);
        transition: var(--transition-fast);
    }

    .footer-contact a:hover {
        color: var(--primary-light);
    }

    .footer-social {
        display: flex;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md);
    }

    .footer-social a {
        width: 40px;
        height: 40px;
        background: var(--dark-secondary);
        border-radius: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.125rem;
        color: var(--text-light);
        transition: var(--transition-normal);
    }

    .footer-social a:hover {
        background: var(--primary-color);
        color: var(--white);
        transform: translateY(-3px);
    }
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2rem; }
    
    .container {
        padding: 0 var(--spacing-md);
        border-left: none;
        border-right: none;
    }
    
    .tech-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.75rem; }
    
    .container {
        padding: 0 var(--spacing-sm);
        border-left: none;
        border-right: none;
    }
    
    section {
        padding: var(--spacing-lg) 0;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    /* Responsive logo sizing */
    .logo img {
        height: 70px;
    }

    .footer-logo {
        height: 60px;
        filter: none;
    }
    
    /* Mobile nav menu is handled in pages/header.css (anchored dropdown).
       Remove legacy fixed-position mobile menu rules here to avoid conflicts
       with the anchored dropdown implementation. Keep a minimal, non-positioned
       fallback to preserve layout when header styles are loaded separately. */
    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
        padding: 0;
        max-height: none;
        position: static;
        box-shadow: none;
        overflow: visible;
        transition: none;
    }
    
    .nav-link {
        padding: var(--spacing-sm);
        text-align: center;
    }
    
    .cta-nav {
        margin-top: var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .secondary-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn,
    .secondary-buttons .btn {
        width: 100%;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-item {
        aspect-ratio: 16/9;
        min-height: 180px;
        height: auto;
    }
    
    .tech-icons {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-row-phone {
        grid-template-columns: 1fr;
    }
    
    .form-group-country,
    .form-group-phone {
        width: 100%;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer mobile responsiveness */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }

    .footer-section {
        text-align: center;
    }

    .footer-section:first-child {
        text-align: center;
        align-items: center;
    }

    .footer-logo {
        margin: 0 auto;
        display: block;
        max-height: 70px;
        width: auto;
    }

    .footer-tagline {
        text-align: center;
        margin: 0;
    }

    .footer-section:first-child p {
        text-align: center;
        margin: 0;
    }
    
    .social-links, .footer-social {
        justify-content: center;
    }

    .footer-links, .footer-contact {
        text-align: center;
    }

    /* Jobs mobile */
    .job-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .job-description {
        font-size: 0.9rem;
    }

    .job-requirements li {
        font-size: 0.875rem;
    }

    /* Legal links mobile */
    .footer-legal {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-legal .divider {
        display: none;
    }

    /* Contact section mobile */
    .contact-info {
        text-align: center;
    }

    .contact-item {
        justify-content: center;
    }

    /* Tech category mobile */
    .tech-categories {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-category {
        padding: var(--spacing-md);
    }

    .tech-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .tech-stats .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3.5rem;
    }
    
    h1 { font-size: 2rem; line-height: 1.2; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container { padding: 0 1rem; }
    
    section { padding: var(--spacing-lg) 0; }
    
    .hero-title { font-size: 2rem; line-height: 1.2; }
    .hero-subtitle { font-size: 1rem; }
    
    .btn { padding: 0.875rem 1.5rem; font-size: 0.95rem; }
    
    .stat-number { font-size: 2rem; }
    
    .section-title { font-size: 1.75rem; }
    .section-subtitle { font-size: 1rem; }
    
    /* Better card layouts on small screens */
    .service-card,
    .portfolio-item,
    .tech-category { padding: 1.25rem; }
    
    /* Optimize images for mobile */
    img { max-width: 100%; height: auto; }
}

/* ===================================
   Animations & Utilities
   =================================== */
.fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

/* Desktop-specific footer overrides (apply only at tablet+ widths) */
@media (min-width: 48em) {
    .footer .footer-section:first-child {
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }

    .footer .footer-section:first-child .footer-logo {
        margin: 0;
        padding: 0;
        display: block;
        max-height: 120px; /* preserve aspect ratio, avoid fixed height on mobile */
        max-width: 350px;
        object-fit: contain;
        align-self: flex-start;
    }

    .footer .footer-section:first-child .footer-description {
        margin: 0;
        margin-top: 0;
        max-width: 44ch;
        width: auto;
        text-align: left;
    }

    /* Ensure footer grid children align left on larger screens */
    .footer .footer-content {
        justify-items: start;
    }
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Legal pages moved to their own page stylesheet: src/css/pages/privacy.css */

/* Selection styling */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
/* ===================================
/* Capabilities styles moved to pages/capabilities.css */

/* ===================================
   Values Grid (About Page)
   =================================== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0 var(--spacing-lg) 0;
}

.value-item {
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.value-item strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xs);
}

.value-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .values-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* ===================================
   About Page Layout
   =================================== */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.about-text-intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.about-text-intro h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

.about-text-intro p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-image {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-image img {
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 220px;
    height: auto;
    object-fit: cover;
    display: block;
}

.about-section-with-stats {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-xl);
    align-items: flex-start;
    margin-top: var(--spacing-xl);
}

.about-text {
    width: 100%;
}

.about-values h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: 0;
}

.value-item {
    padding: var(--spacing-md);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
    transition: all var(--transition-normal);
}

.value-item:hover {
    background: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.value-item strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

.value-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.stat-item {
    text-align: center;
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 1200px) {
    .about-section-with-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .about-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
        padding: var(--spacing-md);
        position: relative;
        top: 0;
    }

    .stat-item {
        border-bottom: none;
        padding: var(--spacing-md) 0;
    }
}

@media (max-width: 768px) {
    .about-intro {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-lg);
    }

    .about-text-intro h3 {
        font-size: 1.5rem;
    }

    .about-text-intro p {
        font-size: 0.95rem;
    }

    .about-image img {
        aspect-ratio: 16/9;
        min-height: 160px;
        height: auto;
    }

    .about-values h3 {
        font-size: 1.5rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
        padding: var(--spacing-md);
    }

    .stat-number {
        font-size: 2.25rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: all var(--transition-normal);
    will-change: transform, opacity;
}

.back-to-top.show {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px) scale(1.1);
    box-shadow: var(--shadow-xl);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 48em) {
    .back-to-top {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
        width: 44px;
        height: 44px;
    }
}

/* ===================================
   NOTIFICATION COMPONENT
   =================================== */
.notification {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    font-weight: 500;
    z-index: 1100;
    opacity: 0;
    transform: translateX(400px);
    transition: all var(--transition-normal);
    max-width: 400px;
    background: var(--white);
    color: var(--text-primary);
}

.notification-show {
    opacity: 1;
    transform: translateX(0);
}

.notification-success {
    background-color: #10B981;
    color: var(--white);
    border-left: 4px solid #059669;
}

.notification-error {
    background-color: #EF4444;
    color: var(--white);
    border-left: 4px solid #DC2626;
}

.notification-warning {
    background-color: #F59E0B;
    color: var(--white);
    border-left: 4px solid #D97706;
}

.notification-info {
    background-color: #3B82F6;
    color: var(--white);
    border-left: 4px solid #2563EB;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 48em) {
    .notification {
        top: var(--spacing-md);
        right: var(--spacing-md);
        left: var(--spacing-md);
        max-width: none;
    }
}

/* Dark theme variable overrides when data-theme="dark" is set on <html> */
html[data-theme="dark"] {
    --text-primary: #E6EEF8;
    --text-secondary: #B7C6D9;
    --text-light: #94A3B8;
    --white: #0B1220; /* use as dark background in some components */
    --gray-50: #071028;
    --gray-100: #0F1724;
    --gray-200: #111827;
    --dark-bg: #071428;
    --dark-secondary: #0b2130;
    --dark-tertiary: #102235;
    --primary-color: #8B5CF6; /* slightly lighter primary on dark */
    --primary-dark: #5B21A6;
}