/* Base theme tokens */
:root {
    color-scheme: light dark;

    /* Light defaults - Corporate palette */
    --bg-main: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    --bg-elevated: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-section-alt: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --bg-section-accent: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    --bg-section-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

    --nav-bg: linear-gradient(to right, #ffffff 0%, #f1f5f9 50%, #e2e8f0 100%);
    --nav-border: rgba(100, 116, 139, 0.2);

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-soft: #64748b;

    --card-border: rgba(148, 163, 184, 0.2);
    --card-bg-strong: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --card-bg-soft: #ffffff;
    --card-gradient-end: #ffffff;

    --contact-card-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, #ffffff 100%);
    --contact-card-border: rgba(59, 130, 246, 0.3);

    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-start: #3b82f6;
    --accent-end: #1d4ed8;
    --accent-soft: rgba(59, 130, 246, 0.08);
    --accent-hover: #1e40af;

    --pill-bg: rgba(255, 255, 255, 0.95);
    --pill-border: rgba(59, 130, 246, 0.3);

    --chip-bg: rgba(241, 245, 249, 0.8);
    --chip-border: rgba(100, 116, 139, 0.25);

    --hero-note-text: #64748b;

    --shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-medium: 0 8px 24px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.06);
    --shadow-strong: 0 20px 48px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);

    --glow-1: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent);
    --glow-2: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent);

    /* Redesign-2 Gradient Colors */
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --hero-bg-light: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
    --hero-bg-dark: linear-gradient(135deg, #1e293b 0%, #312e81 100%);

    /* Form & Button Colors */
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
    --border-color: rgba(148, 163, 184, 0.2);
    --btn-primary-bg: #667eea;
    --btn-primary-hover: #5568d3;
}

/* System = follow OS. If OS prefers dark and no explicit override is set, use dark tokens */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-main: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
        --bg-elevated: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        --bg-subtle: #0f172a;
        --bg-section-alt: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
        --bg-section-accent: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
        --bg-section-dark: linear-gradient(135deg, #0c0a09 0%, #1c1917 100%);

        --nav-bg: linear-gradient(to right, #0f172a 0%, #1e293b 50%, #334155 100%);
        --nav-border: rgba(148, 163, 184, 0.2);

        --text-main: #f1f5f9;
        --text-muted: #cbd5e1;
        --text-soft: #94a3b8;

        --card-border: rgba(148, 163, 184, 0.2);
        --card-bg-strong: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.9) 100%);
        --card-bg-soft: rgba(30, 41, 59, 0.8);
        --card-gradient-end: #1e293b;

        --contact-card-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(30, 41, 59, 0.95) 100%);
        --contact-card-border: rgba(59, 130, 246, 0.4);

        --accent-primary: #3b82f6;
        --accent-secondary: #60a5fa;
        --accent-start: #60a5fa;
        --accent-end: #3b82f6;
        --accent-soft: rgba(59, 130, 246, 0.15);
        --accent-hover: #2563eb;

        --pill-bg: rgba(30, 41, 59, 0.9);
        --pill-border: rgba(59, 130, 246, 0.4);

        --chip-bg: rgba(30, 41, 59, 0.8);
        --chip-border: rgba(100, 116, 139, 0.4);

        --hero-note-text: #94a3b8;

        --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
        --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
        --shadow-strong: 0 20px 48px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.4);
        --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);

        /* Form & Button Colors */
        --input-bg: #1e293b;
        --input-border: #334155;
        --border-color: rgba(148, 163, 184, 0.1);
        --btn-primary-bg: #667eea;
        --btn-primary-hover: #7c8ff0;

        --glow-1: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent);
        --glow-2: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent);

        /* Redesign-2 Gradient Colors */
        --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
        --hero-bg-light: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
        --hero-bg-dark: linear-gradient(135deg, #1e293b 0%, #312e81 100%);
    }
}

/* Explicit light override */
html[data-theme="light"] {
    --bg-main: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    --bg-elevated: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-section-alt: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --bg-section-accent: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    --bg-section-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-border: rgba(100, 116, 139, 0.15);

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-soft: #64748b;

    --card-border: rgba(148, 163, 184, 0.2);
    --card-bg-strong: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --card-bg-soft: #ffffff;

    --contact-card-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, #ffffff 100%);
    --contact-card-border: rgba(59, 130, 246, 0.3);

    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-start: #3b82f6;
    --accent-end: #1d4ed8;
    --accent-soft: rgba(59, 130, 246, 0.08);
    --accent-hover: #1e40af;

    --pill-bg: rgba(255, 255, 255, 0.95);
    --pill-border: rgba(59, 130, 246, 0.3);

    --chip-bg: rgba(241, 245, 249, 0.8);
    --chip-border: rgba(100, 116, 139, 0.25);

    --hero-note-text: #64748b;

    --shadow-soft: 0 4px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-medium: 0 8px 24px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.06);
    --shadow-strong: 0 20px 48px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.06);

    --glow-1: radial-gradient(circle, rgba(59, 130, 246, 0.12), transparent);
    --glow-2: radial-gradient(circle, rgba(99, 102, 241, 0.1), transparent);

    /* Redesign-2 Gradient Colors */
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --hero-bg-light: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
    --hero-bg-dark: linear-gradient(135deg, #1e293b 0%, #312e81 100%);

    /* Form & Button Colors */
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
    --border-color: rgba(148, 163, 184, 0.2);
    --btn-primary-bg: #667eea;
    --btn-primary-hover: #5568d3;
}

/* Explicit dark override */
html[data-theme="dark"] {
    --bg-main: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    --bg-elevated: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    --bg-subtle: #0f172a;
    --bg-section-alt: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --bg-section-accent: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    --bg-section-dark: linear-gradient(135deg, #0c0a09 0%, #1c1917 100%);

    --nav-bg: rgba(15, 23, 42, 0.95);
    --nav-border: rgba(148, 163, 184, 0.15);

    --text-main: #f1f5f9;
    --text-muted: #cbd5e1;
    --text-soft: #94a3b8;

    --card-border: rgba(148, 163, 184, 0.2);
    --card-bg-strong: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.9) 100%);
    --card-bg-soft: rgba(30, 41, 59, 0.8);

    --contact-card-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(30, 41, 59, 0.95) 100%);
    --contact-card-border: rgba(59, 130, 246, 0.4);

    --accent-primary: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-start: #60a5fa;
    --accent-end: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.15);
    --accent-hover: #2563eb;

    --pill-bg: rgba(30, 41, 59, 0.9);
    --pill-border: rgba(59, 130, 246, 0.4);

    --chip-bg: rgba(30, 41, 59, 0.8);
    --chip-border: rgba(100, 116, 139, 0.4);

    --hero-note-text: #94a3b8;

    --shadow-soft: 0 4px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-strong: 0 20px 48px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);

    --glow-1: radial-gradient(circle, rgba(59, 130, 246, 0.3), transparent);
    --glow-2: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent);

    /* Redesign-2 Gradient Colors */
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    --hero-bg-light: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%);
    --hero-bg-dark: linear-gradient(135deg, #1e293b 0%, #312e81 100%);

    /* Form & Button Colors */
    --input-bg: #1e293b;
    --input-border: #334155;
    --border-color: rgba(148, 163, 184, 0.1);
    --btn-primary-bg: #667eea;
    --btn-primary-hover: #7c8ff0;
}

/* Reset and base layout */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "SF Pro Display", system-ui, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(8px) saturate(120%);
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.logo-clickable:hover {
    opacity: 0.8;
}

.logo-clickable:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.logo-image {
    height: 50px;
    display: inline-block;
}

/* Default: show dark logotype (for light background) */
.logo-image-light {
    display: none;
}
.logo-image-dark {
    display: inline-block;
}

/* When the effective theme is dark, swap to light logotype */
html[data-theme-mode="dark"] .logo-image-dark {
    display: none;
}
html[data-theme-mode="dark"] .logo-image-light {
    display: inline-block;
}

.nav-tagline {
    font-size: 13px;
    color: var(--text-soft);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.theme-btn {
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
    color: var(--text-soft);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-main);
}

.theme-btn.active {
    background: var(--btn-primary-bg);
    color: #ffffff;
}

.theme-btn svg,
.theme-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* Nav CTA */
.nav-cta {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.nav-cta span {
    font-size: 16px;
    transform: translateY(1px);
}

.nav-cta-short {
    display: none;
}

.nav-cta-full {
    display: inline;
}

/* Hero */
.hero {
    position: relative;
    padding: 100px 0 80px;
    overflow: hidden;
    background: var(--hero-bg-light);
}

html[data-theme-mode="dark"] .hero {
    background: var(--hero-bg-dark);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

@media (max-width: 1023px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.hero-eyebrow {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent-primary);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
    line-height: 1.15;
    color: var(--text-main);
}

.hero-slogan {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 28px;
    opacity: 0.9;
}

.hero-body {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 24px;
}

.hero-body p {
    margin: 0 0 10px;
}

.hero-body p:last-child {
    margin-bottom: 0;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.btn-primary {
    border-radius: 999px;
    padding: 14px 32px;
    font-size: 15px;
    border: none;
    cursor: pointer;
    color: #ffffff;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.btn-ghost {
    border-radius: 999px;
    padding: 13px 30px;
    font-size: 15px;
    font-weight: 500;
    border: 2px solid var(--card-border);
    cursor: pointer;
    color: var(--text-main);
    background: var(--bg-elevated);
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

.hero-note {
    font-size: 12px;
    color: var(--hero-note-text);
    margin-top: 10px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.hero-visual-card {
    background: linear-gradient(135deg, var(--bg-section-dark) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-radius: 24px;
    padding: 40px 32px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-strong);
    position: relative;
    overflow: hidden;
}

.hero-visual-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-start), var(--accent-end));
}

.visual-stats {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.stat-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    border-radius: 12px;
    flex-shrink: 0;
}

.stat-icon .icon {
    width: 24px;
    height: 24px;
    color: #60a5fa;
    stroke-width: 2;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.3;
}

/* Hero card */
.hero-card {
    position: relative;
    border-radius: 24px;
    padding: 28px 24px;
    background: var(--card-bg-strong);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
}

.hero-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.pill {
    padding: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    opacity: 0.7;
}

.hero-card-badge {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-secondary);
    line-height: 1.4;
}

.hero-card-list {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.hero-card-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    transition: all 0.2s ease;
}

.hero-card-item:last-child {
    border-bottom: 0;
}

.hero-card-item > div:nth-child(2) {
    flex: 1;
}

.hero-card-label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.hero-card-sub {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.5;
}

.hero-card-tag {
    font-size: 11px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--chip-bg);
    border: 1px solid rgba(129, 140, 248, 0.7);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 2px;
}

/* Sections */
.section {
    padding: 100px 0;
    position: relative;
}

.section:nth-child(even) {
    background: var(--bg-section-alt);
}

/* Section-specific backgrounds for contrast */
.section-services {
    background: var(--bg-section-accent);
    position: relative;
}

.section-services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.section-approach {
    background: var(--bg-elevated);
}

/* Decorative Elements */
.decorative-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    opacity: 0.5;
}

.section-contact {
    background: linear-gradient(180deg, var(--bg-section-alt) 0%, var(--bg-section-accent) 100%);
    overflow: hidden;
}

.section-header {
    margin-bottom: 56px;
    text-align: left;
}

.section-eyebrow {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-primary);
    margin-bottom: 16px;
}

.section-title {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 20px;
    line-height: 1.15;
}

.section-description {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 680px;
    line-height: 1.7;
}

/* Gradient Text Effect */
.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Services */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

/* On large screens, aim for three columns */
@media (min-width: 1024px) {
    .services-grid .card {
        flex: 1 1 calc(33.333% - 24px);
    }
}

/* On medium screens, two columns */
@media (min-width: 640px) and (max-width: 1023px) {
    .services-grid .card {
        flex: 1 1 calc(50% - 24px);
    }
}

/* On small screens, full width */
@media (max-width: 639px) {
    .services-grid .card {
        flex: 1 1 100%;
    }
}

/* Icons */
.icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.card-icon .icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

/* Vibrant contrasting colors for each service card */
.services-grid .card:nth-child(1) .card-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
}

.services-grid .card:nth-child(1) .card-icon .icon {
    color: #3b82f6;
}

.services-grid .card:nth-child(2) .card-icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.1));
}

.services-grid .card:nth-child(2) .card-icon .icon {
    color: #a855f7;
}

.services-grid .card:nth-child(3) .card-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
}

.services-grid .card:nth-child(3) .card-icon .icon {
    color: #22c55e;
}

.services-grid .card:nth-child(4) .card-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.1));
}

.services-grid .card:nth-child(4) .card-icon .icon {
    color: #f97316;
}

.services-grid .card:nth-child(5) .card-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(219, 39, 119, 0.1));
}

.services-grid .card:nth-child(5) .card-icon .icon {
    color: #ec4899;
}

.card:hover .card-icon {
    transform: scale(1.05);
}

.approach-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.approach-icon .icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Vibrant contrasting colors for each approach item */
.approach-grid > div:nth-child(1) .approach-icon {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
}

.approach-grid > div:nth-child(1) .approach-icon .icon {
    color: #fbbf24;
}

.approach-grid > div:nth-child(2) .approach-icon {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(2, 132, 199, 0.1));
}

.approach-grid > div:nth-child(2) .approach-icon .icon {
    color: #0ea5e9;
}

.approach-grid > div:nth-child(3) .approach-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
}

.approach-grid > div:nth-child(3) .approach-icon .icon {
    color: #ef4444;
}

.approach-grid > div:nth-child(4) .approach-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(79, 70, 229, 0.1));
}

.approach-grid > div:nth-child(4) .approach-icon .icon {
    color: #6366f1;
}

.approach-grid > div:hover .approach-icon {
    transform: scale(1.05);
}

.hero-card-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.hero-card-icon .icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Vibrant colors for each hero capability */
.hero-card-item:nth-child(1) .hero-card-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
}

.hero-card-item:nth-child(1) .hero-card-icon .icon {
    color: #3b82f6;
}

.hero-card-item:nth-child(2) .hero-card-icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(147, 51, 234, 0.1));
}

.hero-card-item:nth-child(2) .hero-card-icon .icon {
    color: #a855f7;
}

.hero-card-item:nth-child(3) .hero-card-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
}

.hero-card-item:nth-child(3) .hero-card-icon .icon {
    color: #22c55e;
}

.hero-card-item:nth-child(4) .hero-card-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(234, 88, 12, 0.1));
}

.hero-card-item:nth-child(4) .hero-card-icon .icon {
    color: #f97316;
}

.hero-card-item:nth-child(5) .hero-card-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(219, 39, 119, 0.1));
}

.hero-card-item:nth-child(5) .hero-card-icon .icon {
    color: #ec4899;
}

.hero-card-item:hover .hero-card-icon {
    transform: scale(1.05);
}

.card {
    border-radius: 16px;
    padding: 32px 28px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Service cards need stronger background to contrast with blue section */
.services-grid .card {
    background: var(--hero-bg-light);
}

html[data-theme-mode="dark"] .services-grid .card {
    background: var(--hero-bg-dark);
}

/* Section background colors - contrasting warm/cool */
.section-services {
    background-color: rgba(59, 130, 246, 0.08); /* Cool blue */
}

.section-who {
    background-color: rgba(16, 185, 129, 0.06); /* Subtle green */
}

.section-approach {
    background-color: rgba(249, 115, 22, 0.08); /* Warm orange */
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Matching top border colors */
.services-grid .card:nth-child(1)::before {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.services-grid .card:nth-child(2)::before {
    background: linear-gradient(90deg, #a855f7, #9333ea);
}

.services-grid .card:nth-child(3)::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.services-grid .card:nth-child(4)::before {
    background: linear-gradient(90deg, #f97316, #ea580c);
}

.services-grid .card:nth-child(5)::before {
    background: linear-gradient(90deg, #ec4899, #db2777);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-primary);
}

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

.card-muted {
    background: var(--card-bg-soft);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
    line-height: 1.3;
    color: var(--text-main);
}

.card-body {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
}

.card-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.chip {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--chip-border);
    color: var(--text-muted);
    background: var(--chip-bg);
    transition: all 0.2s ease;
}

.card:hover .chip {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Who We Are */
.section-who {
    background: var(--bg-elevated);
}

.who-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.who-card {
    padding: 32px;
    border-radius: 16px;
    background: var(--bg-main);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.who-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: var(--accent-primary);
}

.who-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.who-icon .icon {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.who-card:nth-child(1) .who-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
}

.who-card:nth-child(1) .who-icon .icon {
    color: #3b82f6;
}

.who-card:nth-child(2) .who-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.1));
}

.who-card:nth-child(2) .who-icon .icon {
    color: #10b981;
}

.who-card:hover .who-icon {
    transform: scale(1.05);
}

.who-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
    color: var(--text-main);
}

.who-card-body {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
}

@media (max-width: 768px) {
    .who-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .who-card {
        padding: 24px;
    }
}

/* Approach */
.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
}

.approach-grid > div {
    padding: 28px 24px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}



.approach-grid > div:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

.approach-grid > div {
    padding: 24px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.approach-grid > div:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
    border-color: var(--accent-primary);
}

.approach-item-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--text-main);
}

.approach-item-body {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 48px;
}

.contact-copy {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 560px;
    line-height: 1.7;
}

.contact-note {
    font-size: 14px;
    color: var(--text-soft);
    margin-top: 20px;
    line-height: 1.6;
}

.contact-card {
    border-radius: 20px;
    padding: 32px 28px;
    background: var(--contact-card-bg);
    border: 1px solid var(--contact-card-border);
    box-shadow: var(--shadow-medium);
    backdrop-filter: blur(10px);
}

form {
    margin: 0;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.field {
    margin-bottom: 18px;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--card-border);
    background: var(--bg-elevated);
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-soft);
}

input:focus,
textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
    min-height: 90px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.submit-text {
    font-size: 11px;
    color: var(--text-soft);
}

/* Form Status Messages */
.form-status {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

.form-status:not(:empty) {
    display: block;
}

.form-status-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.form-status-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(0) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top .icon {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .scroll-to-top .icon {
        width: 20px;
        height: 20px;
    }
}

/* Footer */
footer {
    border-top: 1px solid var(--card-border);
    padding: 40px 0 48px;
    margin-top: 100px;
    background: var(--bg-section-alt);
    color: var(--text-soft);
    font-size: 13px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 24px;
    align-items: center;
}

.footer-left {
    justify-self: start;
}

.footer-center {
    justify-self: center;
}

.footer-right {
    justify-self: end;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-primary);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        justify-self: center;
    }
}

/* Glow elements */
.glow {
    position: absolute;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.5;
    mix-blend-mode: normal;
}

.glow-1 {
    top: -100px;
    left: -80px;
    width: 400px;
    height: 400px;
    background: var(--glow-1);
    animation: float 20s ease-in-out infinite;
}

.glow-2 {
    bottom: -120px;
    right: -80px;
    width: 450px;
    height: 450px;
    background: var(--glow-2);
    animation: float 25s ease-in-out infinite reverse;
}

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

/* Responsive */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-card {
        margin-top: 10px;
    }

    .contact-wrapper {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .nav-cta {
        display: none;
    }

    /* Add more space to the left of the logo */
    .logo {
        margin-left: 8px;
    }

    /* Right-align the tagline on mobile */
    .nav-tagline {
        text-align: right;
        margin-left: auto;
    }

    .hero {
        padding-top: 40px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
    }
}