:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-1: #189eff;
    /* Shopware Blue-ish */
    --accent-2: #bc13fe;
    /* Vibrant Purple */
    --gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    --font-main: 'Outfit', sans-serif;
    --glass-blur: blur(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    /* Custom cursor */
}

.page-wrapper {
    opacity: 0;
    animation: pageFadeIn 0.8s ease-out forwards;
    transition: opacity 0.4s ease-in-out;
}

@keyframes pageFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.page-wrapper.fade-out {
    opacity: 0;
    pointer-events: none;
}

html {
    background-color: #050505;
    /* Ensures no white flash before CSS loads */
    overflow-x: hidden;
    width: 100%;
}

/* Custom Cursor */
.cursor-dot,
.cursor-glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: white;
    transform: translate(-50%, -50%);
}

.cursor-glow {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(24, 158, 255, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    transform: translate(-50%, -50%);
}

/* Hide custom cursor on mobile/touch devices */
@media (hover: none) and (pointer: coarse) {

    .cursor-dot,
    .cursor-glow {
        display: none;
    }

    body {
        cursor: auto;
    }
}

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

h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
}

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

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

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    transition: 0.3s;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo .highlight {
    color: var(--accent-1);
}

.logo-img {
    height: 60px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a:not(.btn-primary) {
    color: var(--text-secondary);
    font-weight: 500;
}

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

/* Buttons */
.btn-primary {
    background: var(--gradient);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    display: inline-block;
    border: 1px solid transparent;
    /* Match secondary button border width */
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%);
    transition: 0.3s;
}

.btn-primary:hover::before {
    transform: translateX(0);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    /* margin-left: 15px; Removed in favor of gap */
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    flex: 1;
    flex: 1;
    z-index: 2;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.hero-visual {
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite alternate;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent-1);
    top: -50px;
    right: 50px;
}

.shape-2 {
    width: 250px;
    height: 250px;
    background: var(--accent-2);
    bottom: -50px;
    left: 50px;
    animation-delay: -5s;
}

.code-block {
    position: relative;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    z-index: 3;
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: 0.3s;
}

.code-block:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

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

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.keyword {
    color: #bc13fe;
}

.string {
    color: #27c93f;
}

.function {
    color: #189eff;
}

.this {
    color: #ff5f56;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

/* Services */
.services {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px;
    transition: 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.icon-glow {
    font-size: 2.5rem;
    margin-bottom: 20px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-secondary);
}

/* Work */
.work {
    padding: 100px 0;
}

.project-showcase {
    display: grid;
    gap: 50px;
}

.project-card {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 0;
    border-radius: 20px;
    overflow: hidden;
}

.project-image {
    min-height: 300px;
}

.project-info {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.link-arrow {
    margin-top: 20px;
    color: var(--accent-1);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stats */
.stats {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-secondary);
}

/* Contact */
.contact {
    padding: 100px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    padding: 60px;
}

.contact-list {
    list-style: none;
    margin-top: 30px;
}

.contact-list li {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
}

.contact-list i {
    color: var(--accent-1);
    width: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

input,
select,
textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-1);
    background: rgba(255, 255, 255, 0.1);
}

.w-100 {
    width: 100%;
}

.full-width {
    width: 100%;
}

/* FAQ Accordion */
.faq-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: 0.3s ease;
}

.accordion-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.accordion-header {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--accent-1);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 25px;
    background: rgba(0, 0, 0, 0.2);
}

.accordion-content p {
    margin: 20px 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.accordion-item.active .accordion-content {
    /* Max-height will be set by JS, but this is a fallback if needed manually */
    /* max-height: 500px; */
}

/* Testimonials */
.testimonial-section {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 20px;
}

.testimonial-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.03);
    font-family: serif;
    line-height: 1;
    pointer-events: none;
}

.testimonial-quote {
    font-size: 1.5rem;
    line-height: 1.6;
    font-style: italic;
    color: white;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.author-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
}

.author-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stars {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Footer */
footer {
    padding: 50px 0;
    background: rgba(0, 0, 0, 0.5);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.footer-col h4 {
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--accent-1);
}

.social-links {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
}

.social-links a {
    font-size: 1.5rem;
}

/* Animations */
@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, -20px);
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

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

/* Mobile Responsive */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        /* Add JS toggle later */
    }

    .mobile-menu-toggle {
        display: block;
        position: relative;
        z-index: 1001;
        /* Above nav-links overlay */
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 120px;
    }

    .hero-visual {
        margin-top: 50px;
        width: 100%;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    .form-row {
        flex-direction: column;
    }

    .grid-4 {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

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

    .social-links {
        justify-content: center;
    }

    /* Mobile Menu Overlay */
    .nav-links {
        display: flex;
        /* Overwrite display:none */
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 100%;
        height: 100vh;
        background: rgba(5, 5, 5, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 20px 0;
    }
}

/* Copyright Bar */
.copyright-bar {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Exit Intent Popup */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.exit-popup-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.exit-popup-content {
    position: relative;
    max-width: 600px;
    width: 90%;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.exit-popup-overlay.visible .exit-popup-content {
    transform: translateY(0);
}

.exit-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: 0.2s;
    z-index: 10;
}

.exit-popup-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.exit-popup-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Scroll to Top Button */
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(188, 19, 254, 0.4);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#scrollTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#scrollTopBtn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(188, 19, 254, 0.6);
}

/* Lazy Loading Background Placeholder */
.lazy-bg {
    background-color: rgba(255, 255, 255, 0.05);
    /* Placeholder color */
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
}