:root {
    --bg-dark: #0f1016;
    --bg-darker: #050508;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(139, 92, 246, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    opacity: 0.8;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 3rem;
    /* Increased from 1.5rem to give space to CTA */
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

p {
    color: var(--text-muted);
}

.text-gradient {
    background: linear-gradient(90deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero Section */
.hero {
    min-height: 50vh;
    /* Reduced from 70vh to prevent massive gaps */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding-top: 4rem;
}

.hero-content {
    flex: 1;
}



.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.image-wrapper {
    position: relative;
    max-width: 400px;
    border-radius: 20px;
    overflow: hidden;
}

.portrait {
    width: 100%;
    display: block;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    z-index: -1;
    filter: blur(40px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--primary);
}

/* Services */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    gap: 2rem;
    margin: 6rem 0 6rem;
    /* Standardized uniform gap */
}

.card {
    padding: 2.5rem;
    border-radius: 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
    border-color: var(--primary);
}

.icon-box {
    width: 50px;
    height: 50px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
}

.copyright {
    font-size: 0.9rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-top: 4rem;
    display: block;
}

/* About Section */
.about {
    text-align: center;
    margin: 6rem auto;
    max-width: 800px;
}

.text-block {
    margin-bottom: 4rem;
}

.text-block:last-child {
    margin-bottom: 0;
}

/* Certification Badge */
.certification-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.certification-badge svg {
    flex-shrink: 0;
    color: var(--primary);
}

/* Logos */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .logo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.logo-placeholder {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s ease;
    position: relative;
}

/* Remove hover from non-link tiles */
.logo-link:hover .logo-placeholder {
    background: var(--card-hover);
    border-color: var(--primary);
    color: var(--text-main);
    transform: translateY(-2px);
}

/* Case Study Logos */
.logo-case-study {
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    cursor: pointer;
    height: 80px;
    justify-content: center;
}

.logo-case-study:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.1));
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.case-study-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    padding: 0.25rem 0.6rem;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.case-study-metric {
    position: absolute;
    top: 65%;
    left: 50%;
    transform: translate(-50%, 0);
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.logo-case-study:hover .case-study-metric {
    opacity: 1;
}

.logo-cta {
    background: linear-gradient(135deg, var(--primary), #a78bfa, var(--primary));
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite, pulse 2s ease-in-out infinite;
    color: white;
    font-weight: 700;
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.logo-cta:hover {
    animation: gradientShift 1.5s ease infinite, pulse 1s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
    transform: translateY(-4px);
    border-color: #fff;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 0 0 4rem;
    position: relative;
}

/* ... (skip middle content) ... */
/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
        letter-spacing: -0.03em;
    }

    h2 {
        font-size: 1.4rem;
    }

    .hero {
        min-height: auto;
        flex-direction: column-reverse;
        padding-top: 2rem;
        padding-bottom: 0;
        gap: 2rem;
        text-align: center;
        justify-content: flex-start;
    }

    main {
        padding: 1rem;
    }

    .hero-image {
        justify-content: center;
    }

    /* Force text wrapping on mobile to prevent horizontal overflow */
    h1 span {
        white-space: normal !important;
    }

    .buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        margin: 0 !important;
    }

    .about {
        margin: 4rem auto;
    }

    .certification-badge {
        display: flex;
        justify-content: center;
        width: fit-content;
        margin: 1.5rem auto 0;
    }

    .text-block {
        margin-bottom: 3rem;
    }

    .logo-grid {
        margin-top: 2rem;
        grid-template-columns: 1fr 1fr;
        /* Two columns on mobile for better fit */
    }
}