:root {
    /* Colors - Intense Red Theme */
    --primary: #cc0000;
    --primary-light: #ff4d4d;
    --secondary: #990000;
    --accent: #660000;
    --bg-light: #fffcfc;
    --white: #ffffff;
    --text-main: #2d0000;
    --text-muted: #664444;
    --border: #f8e1e1;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #cc0000 0%, #ff4d4d 100%);
    --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 100%);

    /* Spacing */
    --section-padding: 8rem 2rem;
    --container-max: 1200px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.1;
}

/* Accessibility: Focus styles */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--grad-primary);
    z-index: 2000;
    transition: width 0.1s ease-out;
}

/* Header & Nav */
.header {
    position: fixed;
    top: 2rem;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;

    &.scrolled {
        top: 0;
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0.5rem 0;

        .nav {
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: none;
            box-shadow: none;
            width: 100%;
        }
    }
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.75rem 1rem 0.75rem 2rem;
    border-radius: 99px;
    width: 95%;
    max-width: var(--container-max);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.25rem;

    .logo-img {
        height: 33px;
        width: auto;
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;

    .nav-link {
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
        transition: color 0.2s;

        &:hover {
            color: var(--primary);
        }
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    text-decoration: none;

    &.btn-primary {
        background: var(--grad-primary);
        color: white;
        box-shadow: 0 4px 14px 0 rgba(204, 0, 0, 0.3);

        &:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px 0 rgba(204, 0, 0, 0.4);
        }
    }

    &.btn-large {
        padding: 1.1rem 2.2rem;
        font-size: 1.05rem;
    }

    &.btn-gradient {
        background: var(--grad-primary);
        color: white;
    }

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

        &:hover {
            background: var(--white);
            border-color: var(--primary);
        }
    }

    &.btn-outline-white {
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: white !important;
        /* Ensure white on red backgrounds */
        padding: 0.75rem 1.5rem;
        border-radius: 99px;
        text-decoration: none;
        font-weight: 600;
        font-size: 0.9rem;
        transition: all 0.2s;
        display: inline-block;

        &:hover {
            background: white;
            color: var(--primary) !important;
        }
    }

    &.btn-text {
        color: var(--primary);
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 4px;
        font-size: 0.95rem;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        transition: all 0.2s;

        &:after {
            content: '→';
            text-decoration: none;
            display: inline-block;
        }

        &:hover {
            gap: 0.6rem;
            color: var(--primary-light);
        }
    }
}

/* Fallback for btn-text without .btn class */
.btn-text {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;

    &:after {
        content: '→';
        text-decoration: none;
        display: inline-block;
    }

    &:hover {
        gap: 0.6rem;
        color: var(--primary-light);
    }
}

/* Hero Section */
.hero {
    padding-top: 12rem;
    padding-bottom: 8rem;
    width: 100%;
    position: relative;
    background-image: radial-gradient(circle at top right, rgba(204, 0, 0, 0.08), transparent);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;

    .hero-content {
        width: 100%;
    }

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

    .hero-slider {
        position: relative;
        width: 100%;
        height: 400px;
        /* Increased to make room for dots below */
        overflow: hidden;
        margin-bottom: 2rem;
    }

    .hero-slides {
        position: relative;
        width: 100%;
        height: 100%;
    }

    .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        visibility: hidden;
        transform: translateY(30px);
        transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
        /* Bouncy premium feel */
        display: flex;
        flex-direction: column;
        align-items: center;
        pointer-events: none;
    }

    .hero-slide.active {
        position: relative;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;

        .badge-container,
        .hero-title,
        .hero-description {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .hero-slide.exit {
        opacity: 0;
        transform: translateY(-30px);
    }

    /* Staggered entrance for premium feel */
    .hero-slide .badge-container,
    .hero-slide .hero-title,
    .hero-slide .hero-description {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .hero-slide.active .badge-container {
        transition-delay: 0.1s;
    }

    .hero-slide.active .hero-title {
        transition-delay: 0.2s;
    }

    .hero-slide.active .hero-description {
        transition-delay: 0.3s;
    }

    /* Slider Controls */
    .hero-slider-wrapper {
        position: relative;
        width: 100%;
    }

    .slider-controls {
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        transform: translateY(-50%);
        display: flex;
        justify-content: space-between;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
        z-index: 20;
        pointer-events: none;
    }

    .hero-slider-wrapper:hover .slider-controls {
        opacity: 1;
        visibility: visible;
    }

    .slider-control {
        background: rgba(255, 255, 255, 0.6);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.8);
        color: var(--primary);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.3s;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
        pointer-events: auto;
        position: absolute;

        &:hover {
            background: var(--primary);
            color: white;
            border-color: var(--primary);
            transform: scale(1.1);
        }

        &:active {
            transform: scale(0.95);
        }

        &.prev {
            left: -80px;
        }

        &.next {
            right: -80px;
        }
    }

    /* Desktop Adjustments for Arrows */
    @media (max-width: 1400px) {
        .slider-control.prev {
            left: -40px;
        }

        .slider-control.next {
            right: -40px;
        }
    }

    @media (max-width: 1250px) {
        .slider-control.prev {
            left: 0;
        }

        .slider-control.next {
            right: 0;
        }
    }

    .slider-dots {
        position: absolute;
        bottom: 10px;
        /* Positioned at the bottom of the increased min-height */
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.8rem;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 20;
        pointer-events: auto;
    }

    .hero-slider-wrapper:hover .slider-dots {
        opacity: 1;
        visibility: visible;
        bottom: 20px;
    }

    .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(204, 0, 0, 0.15);
        cursor: pointer;
        transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);

        &.active {
            background: var(--primary);
            width: 30px;
            border-radius: 10px;
        }

        &:hover {
            background: rgba(204, 0, 0, 0.4);
        }
    }

    @media (max-width: 768px) {
        .slider-controls {
            display: none;
            /* Hide arrows on mobile */
        }

        .slider-dots {
            opacity: 1;
            visibility: visible;
            bottom: 20px !important;
        }

        .hero-slider {
            min-height: 550px;
        }
    }

    @media (max-width: 480px) {
        .hero-slider {
            min-height: 600px;
        }
    }

    .badge-container {
        display: flex;
        justify-content: center;
        margin-bottom: 1.5rem;

        .badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            background: rgba(204, 0, 0, 0.1);
            color: var(--primary);
            border-radius: 99px;
            font-size: 0.85rem;
            font-weight: 600;
            letter-spacing: 0.05em;
            text-transform: uppercase;
        }
    }

    .hero-title {
        font-size: clamp(2.5rem, 6vw, 4.5rem);
        margin-bottom: 1.5rem;
        color: #1e293b;
        letter-spacing: -0.02em;

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

    .hero-description {
        max-width: 700px;
        margin: 0 auto 2.5rem;
        font-size: 1.15rem;
        color: var(--text-muted);
    }

    .hero-btns {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .social-proof {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;

        .avatar-group {
            display: flex;

            .avatar {
                width: 40px;
                height: 40px;
                border-radius: 50%;
                background: #cbd5e1;
                border: 3px solid var(--white);
                margin-left: -12px;

                &:first-child {
                    margin-left: 0;
                }
            }
        }

        .rating-text {
            font-size: 0.9rem;
            color: var(--text-muted);

            .stars {
                color: #fbbf24;
                margin-left: 0.5rem;
            }
        }
    }
}

/* Engine Visual */
.engine-visual-container {
    margin-top: 6rem;
    position: relative;
    z-index: 1;

    .engine-grid {
        display: grid;
        grid-template-columns: 1fr 1.5fr 1fr;
        align-items: center;
        gap: 2rem;
        max-width: 1100px;
        margin: 0 auto;
    }

    .node-column {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .node-card {
        background: var(--grad-surface);
        backdrop-filter: blur(8px);
        border: 1px solid var(--white);
        padding: 1.25rem;
        border-radius: 1.25rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
        text-align: left;
        transition: transform 0.3s ease, box-shadow 0.3s ease;

        &:hover {
            transform: scale(1.05);
            box-shadow: var(--shadow-xl);
        }

        .icon-box {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;

            &.purple {
                background: rgba(204, 0, 0, 0.1);
                color: #cc0000;
            }

            &.blue {
                background: rgba(153, 0, 0, 0.1);
                color: #990000;
            }

            &.green {
                background: rgba(102, 0, 0, 0.1);
                color: #660000;
            }

            &.teal {
                background: rgba(204, 0, 0, 0.1);
                color: #cc0000;
            }

            &.blue-alt {
                background: rgba(153, 0, 0, 0.1);
                color: #990000;
            }

            &.purple-alt {
                background: rgba(204, 0, 0, 0.1);
                color: #cc0000;
            }
        }

        .node-info {
            h3 {
                font-size: 1rem;
                margin-bottom: 0.25rem;
            }

            p {
                font-size: 0.85rem;
                color: var(--text-muted);
            }
        }
    }
}

/* Center Engine */
.center-engine {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;

    .engine-circles {
        position: relative;
        width: 260px;
        height: 360px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        animation: float 6s ease-in-out infinite;
    }

    .circle-filled {
        width: 220px;
        height: 220px;
        background: var(--grad-primary);
        border-radius: 50%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        color: white;
        box-shadow: 0 10px 40px rgba(204, 0, 0, 0.4);
        position: relative;
        z-index: 10;
        overflow: hidden;

        &::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg,
                    transparent 45%,
                    rgba(255, 255, 255, 0.1) 50%,
                    transparent 55%);
            animation: shimmer 3s infinite linear;
        }

        .engine-label {
            font-size: 0.65rem;
            font-weight: 700;
            letter-spacing: 0.2em;
            opacity: 0.8;
            position: relative;
            z-index: 2;
        }

        .engine-logo {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            margin: 0.5rem 0;
            position: relative;
            z-index: 2;

            .core-text {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 0.25rem;
                font-weight: 700;
                font-size: 1.25rem;

                svg {
                    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
                }
            }
        }
    }

    .circle-outline {
        position: absolute;
        width: 260px;
        height: 260px;
        border: 2px dashed var(--primary);
        border-radius: 50%;
        z-index: 5;
        opacity: 0.4;
        animation: rotate 20s linear infinite;
    }

    .pulse-ring {
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 2px solid rgba(255, 255, 255, 0.5);
        animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;

        &::before {
            content: '';
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.3);
            animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite 1s;
        }
    }

    .connector-svg-container {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;

        .connectors-svg {
            width: 100%;
            height: 100%;
            overflow: visible;

            .path {
                fill: none;
                stroke: var(--primary);
                stroke-width: 2;
                stroke-linecap: round;
                opacity: 0.2;
                stroke-dasharray: 10, 10;
                animation: flow 20s linear infinite;

                &.path-left-top,
                &.path-left-mid,
                &.path-left-bottom {
                    stroke: url(#grad-left);
                    animation-direction: reverse;
                }

                &.path-right-top,
                &.path-right-mid,
                &.path-right-bottom {
                    stroke: url(#grad-right);
                }
            }
        }
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(50%, 50%) rotate(0deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@keyframes flow {
    from {
        stroke-dashoffset: 200;
    }

    to {
        stroke-dashoffset: 0;
    }
}

/* Sections */
.section {
    padding: 3rem 0;

    .section-title {
        font-size: 2.5rem;
        text-align: center;
        margin-bottom: 4rem;
        color: var(--text-main);
    }
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;

    .feature-card {
        padding: 3rem;
        background: var(--white);
        border-radius: 2rem;
        box-shadow: var(--shadow-md);
        transition: all 0.3s ease;
        border: 1px solid var(--border);

        &:hover {
            transform: translateY(-10px);
            box-shadow: var(--shadow-xl);
            border-color: var(--primary-light);
        }

        h3 {
            margin-bottom: 1rem;
            color: var(--primary);
        }
    }
}

/* Footer */
.footer {
    position: relative;
    background-image: radial-gradient(circle at bottom left, rgba(204, 0, 0, 0.08), transparent);
    background-size: cover;
    background-position: center;
    color: var(--text-muted);
    padding: 6rem 0 3rem;
    border-top: 1px solid var(--border);

    .container {
        display: flex;
        flex-direction: column;
        gap: 5rem;
    }

    h4 {
        color: var(--text-dark);
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        font-weight: 600;
    }

    a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s;

        &:hover {
            color: var(--primary);
        }
    }
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border);

    .footer-cta {
        h2 {
            color: var(--text-dark);
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }

        p {
            font-size: 1.1rem;
            opacity: 0.8;
        }
    }

    .footer-newsletter {
        .newsletter-form {
            display: flex;
            background: white;
            border: 1px solid var(--border);
            padding: 0.5rem;
            border-radius: 99px;
            width: 100%;
            max-width: 450px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

            input {
                background: transparent;
                border: none;
                padding: 0.5rem 1.5rem;
                color: var(--text-dark);
                flex: 1;
                font-family: inherit;
                outline: none;

                &::placeholder {
                    color: var(--text-muted);
                }
            }

            .btn-subscribe {
                background: var(--grad-primary);
                color: white;
                border: none;
                padding: 0.75rem 1.5rem;
                border-radius: 99px;
                font-weight: 600;
                cursor: pointer;
                display: flex;
                align-items: center;
                gap: 0.5rem;
                transition: transform 0.2s;

                &:hover {
                    transform: scale(1.02);
                }
            }
        }
    }
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 4rem;

    .footer-col {
        &.about {
            p {
                font-size: 0.95rem;
                line-height: 1.7;
                margin-bottom: 1.5rem;
            }

            .social-links {
                display: flex;
                gap: 1rem;

                a {
                    width: 40px;
                    height: 40px;
                    background: white;
                    border: 1px solid var(--border);
                    border-radius: 50%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    transition: all 0.3s;
                    color: var(--text-dark);
                    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);

                    &:hover {
                        background: var(--primary);
                        border-color: var(--primary);
                        transform: translateY(-3px);
                        color: white;
                    }

                    svg {
                        width: 18px;
                        height: 18px;
                    }
                }
            }
        }

        &.links {
            ul {
                list-style: none;
                display: flex;
                flex-direction: column;
                gap: 0.75rem;

                a {
                    font-size: 0.95rem;
                    position: relative;
                    left: 0;
                    transition: all 0.2s;

                    &:hover {
                        left: 5px;
                    }
                }
            }
        }

        &.contact {
            ul {
                list-style: none;
                display: flex;
                flex-direction: column;
                gap: 1.25rem;

                li {
                    display: flex;
                    gap: 1rem;
                    font-size: 0.95rem;
                    align-items: flex-start;

                    svg {
                        width: 20px;
                        height: 20px;
                        color: var(--primary);
                        flex-shrink: 0;
                    }

                    span {
                        line-height: 1.4;
                    }
                }
            }
        }
    }
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid var(--border);

    .footer-branding {
        .footer-logo {
            height: 28px;
            filter: none;
            /* Logo shouldn't be inverted on light background */
        }
    }

    .footer-copyright {
        font-size: 0.85rem;
        opacity: 0.6;
    }

    .footer-apps {
        display: flex;
        gap: 1rem;

        .app-btn {
            height: 40px;
            transition: transform 0.2s;

            &:hover {
                transform: translateY(-2px);
            }

            img {
                height: 100%;
                width: auto;
            }
        }
    }
}

/* Responsive */
@media (max-width: 968px) {
    .engine-grid {
        grid-template-columns: 1fr;
    }

    .node-column {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .node-card {
        width: calc(50% - 1rem);
    }

    .center-engine {
        order: -1;
    }

    .connector-svg-container,
    .nav-links {
        display: none;
    }
}

@media (max-width: 640px) {
    .node-card {
        width: 100%;
    }
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}

.back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent);
}

/* Trust Bar */
.trust-bar {
    padding: 3rem 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;

    .trust-container {
        display: flex;
        align-items: center;
        gap: 3rem;
    }

    .trust-label {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-muted);
        white-space: nowrap;
    }

    .logo-scroll {
        flex: 1;
        overflow: hidden;
        position: relative;

        .logo-track {
            display: flex;
            gap: 4rem;
            width: max-content;
            animation: scroll 40s linear infinite;

            .partner-logo {
                font-size: 1.25rem;
                font-weight: 700;
                color: var(--text-muted);
                opacity: 0.5;
                transition: opacity 0.3s;

                &:hover {
                    opacity: 1;
                }
            }
        }
    }
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    text-align: center;

    .stat-item {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;

        .stat-number {
            font-size: 3.5rem;
            font-weight: 800;
            background: var(--grad-primary);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .stat-label {
            font-size: 1.1rem;
            color: var(--text-muted);
            font-weight: 500;
        }
    }
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;

    .service-card {
        padding: 3.5rem;
        background: var(--white);
        border-radius: 2.5rem;
        box-shadow: var(--shadow-md);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid var(--border);

        &:hover {
            transform: translateY(-12px);
            box-shadow: var(--shadow-xl);
            border-color: var(--primary-light);
        }

        .service-icon {
            width: 64px;
            height: 64px;
            background: rgba(204, 0, 0, 0.1);
            color: var(--primary);
            border-radius: 1.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 2rem;
        }
    }
}

/* Solutions Section */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;

    .solution-card {
        background: var(--white);
        padding: 3rem 2.5rem;
        border-radius: 2rem;
        border: 1px solid var(--border);
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        box-shadow: var(--shadow-lg);

        &:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-xl);
            border-color: var(--primary-light);

            .solution-icon {
                transform: scale(1.1);
            }
        }

        .solution-icon {
            margin-bottom: 2rem;
            color: var(--primary);
            transition: transform 0.3s ease;
        }

        h3 {
            font-size: 1.25rem;
            margin-bottom: 1rem;
            color: var(--text-main);
        }

        p {
            font-size: 0.95rem;
            color: var(--text-muted);
            margin-bottom: 2rem;
            line-height: 1.6;
        }

        &.partner-eye {
            background: var(--grad-primary);
            color: white;
            border: none;
            justify-content: center;

            .solution-icon {
                color: white;
            }

            h3,
            p {
                color: white;
            }

            .partner-text {
                font-size: 1.1rem !important;
                font-weight: 500;
                margin-bottom: 2.5rem !important;
                max-width: 240px;
            }
        }
    }
}

/* Appointment Section */
.appointment-box {
    background: var(--grad-primary);
    border-radius: 3rem;
    padding: 5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    gap: 4rem;

    .appointment-text {
        h2 {
            font-size: 2.5rem;
            margin-bottom: 1.5rem;
        }

        p {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 500px;
        }
    }

    .appointment-action {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;

        .support-contact {
            font-size: 0.95rem;
            opacity: 0.8;
        }
    }
}

/* References & Case Studies */
.page-header {
    padding: 10rem 0 5rem;
    text-align: center;
    background: radial-gradient(circle at top, rgba(204, 0, 0, 0.05), transparent);

    h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
        margin: 1rem 0;
    }

    p {
        font-size: 1.2rem;
        color: var(--text-muted);
        max-width: 700px;
        margin: 0 auto;
    }
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.2);
}

.filter-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.5rem;
}

/* Pill specific styling */
.pill-btn {
    background: transparent !important;
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
    padding: 0.5rem 1.2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.pill-btn:hover,
.pill-btn.active {
    background: var(--primary) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3) !important;
}

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

.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.ref-card {
    background: white;
    border-radius: 2rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;

    &:hover {
        transform: translateY(-10px);
        box-shadow: var(--shadow-xl);
        border-color: var(--primary-light);

        .ref-logo img {
            transform: scale(1.05);
        }
    }

    .ref-logo {
        height: 200px;
        background: #f8fafc;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        overflow: hidden;
        border-bottom: 1px solid var(--border);

        img {
            max-width: 100%;
            max-height: 100%;
            transition: transform 0.4s ease;
            opacity: 1;
        }
    }

    &:hover .ref-logo img {
        filter: grayscale(0);
        opacity: 1;
    }

    .ref-info {
        padding: 2rem;
        flex: 1;

        .ref-cat {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--primary);
            font-weight: 700;
            display: block;
            margin-bottom: 0.5rem;
        }

        h3 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            color: var(--text-dark);
        }

        p {
            font-size: 0.95rem;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }
    }
}

/* Case Study Detail */
.case-study-hero {
    padding: 12rem 0 6rem;
    background: radial-gradient(circle at bottom left, rgba(204, 0, 0, 0.05), transparent);

    .back-link {
        display: inline-block;
        margin-bottom: 3rem;
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s;

        &:hover {
            color: var(--primary);
        }
    }

    .case-header-content {
        display: flex;
        align-items: center;
        gap: 4rem;

        .case-logo {
            width: 240px;
            height: 240px;
            background: white;
            border-radius: 2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border);

            img {
                max-width: 100%;
                max-height: 100%;
            }
        }

        .case-meta {
            flex: 1;

            h1 {
                font-size: 4rem;
                margin: 1rem 0;
                color: var(--text-dark);
            }

            .lead {
                font-size: 1.5rem;
                color: var(--text-muted);
                max-width: 600px;
            }
        }
    }
}

.case-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 5rem;
}

.case-main {
    h2 {
        font-size: 2.5rem;
        margin-bottom: 2rem;
    }

    p {
        font-size: 1.15rem;
        line-height: 1.8;
        margin-bottom: 2rem;
    }

    .case-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        margin-top: 4rem;

        .detail-block {
            h3 {
                color: var(--primary);
                margin-bottom: 1rem;
            }
        }
    }
}

.case-card-stats {
    background: white;
    padding: 2.5rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);

    h4 {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border);
    }

    ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 1rem;

        li {
            font-size: 1rem;
            display: flex;
            justify-content: space-between;

            strong {
                color: var(--text-dark);
            }
        }
    }
}

.cta-mini {
    background: var(--grad-primary);
    padding: 2.5rem;
    border-radius: 2rem;
    color: white;


    h3 {
        margin-bottom: 1rem;
    }

    p {
        margin-bottom: 2rem;
        opacity: 0.9;
    }

    .btn {
        width: 100%;
        background: white;
        color: var(--primary);
        text-decoration: none;
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 968px) {
    .case-header-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

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

    .case-details {
        grid-template-columns: 1fr !important;
    }
}

.section-title-left {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.references-grid.mini {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;

    .ref-card.mini {
        .ref-logo {
            height: 140px;
            padding: 2rem;
        }

        .ref-info {
            padding: 1.5rem;

            h3 {
                font-size: 1.2rem;
                margin-bottom: 0;
            }
        }
    }
}

/* --- CONTACT PAGE --- */
.contact-page-header {
    border-bottom: 1px solid var(--border);
}

.contact-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 4rem;
    margin-top: 5rem;
    position: relative;
    z-index: 10;
}

.contact-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method-card {
    background: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.contact-method-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(205, 3, 51, 0.1);
}

.method-icon {
    width: 48px;
    height: 48px;
    background: rgba(205, 3, 51, 0.05);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.contact-method-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 600;
}

.contact-method-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.contact-method-card .text-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
    display: inline-block;
}

.contact-method-card .text-link:hover {
    text-decoration: underline;
}

.contact-form-container {
    background: white;
    padding: 4rem;
    border-radius: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 1rem 1.25rem;
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(205, 3, 51, 0.08);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.submit-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.privacy-note {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .contact-grid {
        grid-template-columns: 1fr;
        margin-top: 2rem;
    }
}

/* --- BUSINESS INFO SECTION --- */
.bg-light {
    background-color: #f8f9fa;
    padding: 6rem 0;
}

.info-block {
    background: white;
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    height: 100%;
    transition: var(--transition);
}

.info-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.info-block h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 1rem;
}

.info-block h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.info-block p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 1rem;
}

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

@media (max-width: 968px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .bg-light {
        padding: 4rem 0;
    }

    .contact-form-container {
        padding: 2.5rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* --- LEGAL PAGES (Impressum/Datenschutz) --- */
.legal-card {
    max-width: 100%;
    margin: 0 auto;
    padding: 4rem;
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section h3 {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

.legal-section p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.legal-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.legal-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.legal-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.legal-grid {
    margin-bottom: 1rem;
}

.legal-card a {
    color: var(--primary) !important;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid rgba(204, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.legal-card a:hover {
    color: var(--primary-light) !important;
    border-bottom-color: var(--primary);
}

@media (max-width: 768px) {
    .legal-card {
        padding: 2rem 1.5rem;
    }
}