:root {
    --bg-color: #030712;
    /* Very dark slate/black */
    --surface-color: #111827;
    /* Dark gray */
    --surface-hover: #1f2937;
    --primary-color: #3b82f6;
    /* Blue */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary-color: #8b5cf6;
    /* Violet */
    --accent-color: #06b6d4;
    /* Cyan */
    --text-color: #f3f4f6;
    /* Off-white */
    --text-muted: #9ca3af;
    /* Gray text */
    --border-color: #1f2937;
    --font-main: 'Outfit', sans-serif;

    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);

    --card-radius: 16px;

    --shadow-glow: 0 0 20px var(--primary-glow);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

.section-padding {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.mt-3 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-5 {
    margin-top: 3rem;
}

.bg-surface {
    background-color: var(--surface-color);
}

.text-muted {
    color: var(--text-muted);
}

.text-gradient {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.badge {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: inline-block;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.1);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(3, 7, 18, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--primary-color);
    transition: width 0.3s;
    box-shadow: 0 0 8px var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Dropdown Support */
.nav-item {
    position: relative;
    padding: 20px 0;
    /* Increase hit area */
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--surface-color);
    min-width: 220px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    z-index: 1001;
    padding: 10px;
}

.nav-item:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-content li {
    margin: 5px 0;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 10px 15px;
    display: block;
    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.dropdown-content a:hover {
    background-color: var(--surface-hover);
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--text-color);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        transform: none;
        display: none;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: transparent;
    }

    .nav-item:hover .dropdown-content {
        display: block;
    }
}

/* Mobile Menu */
.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: fixed;
        right: -100%;
        top: 0;
        gap: 0;
        flex-direction: column;
        background-color: var(--surface-color);
        width: 75%;
        /* Partial width */
        height: 100vh;
        text-align: left;
        transition: 0.3s;
        border-left: 1px solid var(--border-color);
        padding: 80px 20px 20px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-item {
        margin: 16px 0;
    }

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

    .hamburger {
        z-index: 2000;
        /* Ensure above drawer */
        position: relative;
    }
}

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

.hero-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 30%);
    z-index: -1;
    animation: pulseBg 10s infinite alternate;
}

@keyframes pulseBg {
    from {
        transform: scale(1) rotate(0deg);
        opacity: 0.8;
    }

    to {
        transform: scale(1.1) rotate(5deg);
        opacity: 1;
    }
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    justify-content: center;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.align-center {
    align-items: center;
}

/* Cards */
.card {
    background: rgba(17, 24, 39, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 30px;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

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

.card:not(.coming-soon):hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px -10px rgba(59, 130, 246, 0.2);
    background: rgba(17, 24, 39, 0.6);
}

.card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    transition: all 0.3s;
}

.card:hover .card-icon {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    z-index: 1;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    z-index: 1;
}

/* Coming Soon Style */
.coming-soon {
    opacity: 0.6;
    border-style: dashed;
}

.coming-soon img,
.coming-soon .card-icon {
    filter: grayscale(1);
}

.status-badge {
    display: inline-block;
    margin-top: auto;
    padding-top: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-color);
}

.category-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-title::after {
    content: '';
    height: 1px;
    background: var(--border-color);
    flex: 1;
}

/* Service Card Specifics */
.service-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.service-card .card-content {
    flex: 1;
}

.service-card .card-arrow {
    color: var(--primary-color);
    font-size: 1.2rem;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.service-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Feature List */
.feature-list {
    margin-top: 20px;
}

.feature-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.feature-list i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 4px;
}

.gradient-box {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: var(--card-radius);
    padding: 20px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.abstract-shape {
    width: 200px;
    height: 200px;
    background: conic-gradient(from 180deg at 50% 50%, var(--primary-color) 0deg, var(--secondary-color) 180deg, var(--primary-color) 360deg);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: rotate 10s linear infinite;
}

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

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

/* Footer */
footer {
    background-color: var(--surface-color);
    padding: 80px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    margin-bottom: 25px;
    color: var(--text-color);
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 140px;
    }
}

/* Pricing Table */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.pricing-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pricing-card.popular {
    border-color: var(--primary-color);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
}

.pricing-card.popular::before {
    content: 'Most Popular';
    position: absolute;
    top: 20px;
    right: -30px;
    background: var(--primary-color);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: 600;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    margin: 20px 0;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.features-list {
    margin: 30px 0;
    text-align: left;
}

.features-list li {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.features-list li i {
    color: var(--accent-color);
    margin-right: 10px;
}

/* Form Styles */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--card-radius);
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    background: rgba(3, 7, 18, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: white;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* Contact Page Styles */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    padding-right: 20px;
}

.contact-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-details .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.contact-details .value {
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 5px;
}

.inquiry-form-container {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

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

    .contact-info {
        padding-right: 0;
    }
}

/* Scrollytelling Hero */
#brain-hero {
    position: relative;
    background-color: #050505;
    /* Match brain bg */
    z-index: 10;
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#brain-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* or cover based on preference */
    z-index: 1;
}

.scrolly-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass through if needed */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.scrolly-text {
    position: absolute;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
    text-align: center;
    max-width: 800px;
}

.scrolly-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.scrolly-text h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
    background: linear-gradient(to bottom, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.scrolly-text h2 {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
}

.scrolly-text p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.scrolly-text .btn {
    pointer-events: auto;
    /* Re-enable clicks for buttons */
    margin-top: 30px;
}

@media (max-width: 768px) {
    .scrolly-text h1 {
        font-size: 3rem;
    }

    .scrolly-text h2 {
        font-size: 2.5rem;
    }

    .scrolly-text p {
        font-size: 1.1rem;
    }
}

/* Refined Scrollytelling Styles */
#brain-canvas {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.text-left-align {
    left: 10%;
    transform: translateX(0);
    text-align: left;
    right: auto;
}

.text-right-align {
    right: 10%;
    transform: translateX(0);
    text-align: right;
    left: auto;
}

/* Ensure text visible state overrides transforms */
.scrolly-text.visible.text-left-align {
    transform: translateX(0);
}

.scrolly-text.visible.text-right-align {
    transform: translateX(0);
}

/* Continuous Hero Styles */
.hero-wrapper {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* Tech Grid / Scanline Overlay */
.tech-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0) 0px,
            rgba(0, 0, 0, 0) 1px,
            rgba(0, 255, 255, 0.03) 2px,
            rgba(0, 0, 0, 0) 4px);
    pointer-events: none;
    opacity: 0.7;
}

/* Enhanced Canvas Look */
#brain-canvas {
    filter: contrast(1.1) brightness(1.1);
}

/* Specific Vertical Positioning to avoid overlap */
.text-left-align {
    top: 50%;
    /* transform removed to allow JS animation */
    left: 4%;
    /* Further left */
    bottom: auto;
    text-align: left;
    max-width: 400px;
}

.text-right-align {
    top: 40%;
    /* transform removed to allow JS animation */
    right: 4%;
    /* Further right */
    bottom: auto;
    text-align: right;
    max-width: 400px;
}

/* Attractive Typography */
.scrolly-text h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    /* Blue Gradient */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.scrolly-text h2 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    /* Blue Gradient Matched */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.scrolly-text p {
    font-size: 1.2rem;
    color: #e2e8f0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 500;
}

/* Mobile Adjustments */
/* Mobile Adjustments */
@media (max-width: 768px) {

    /* Enable Scroll Track */


    .hero-wrapper {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
    }

    /* Mobile Text Styling */
    .text-left-align,
    .text-right-align {
        position: absolute;
        width: auto;
        max-width: 80%;
        margin: 0;
        transform: none !important;
        text-align: left;
    }

    /* AI Automation - Top Left */
    .text-left-align {
        top: 15%;
        left: 5%;
        bottom: auto;
        right: auto;
    }

    /* Build Apps - Bottom Right */
    .text-right-align {
        top: auto;
        bottom: 15%;
        right: 5%;
        left: auto;
        text-align: right;
    }

    /* White Text, Smaller Size */
    .scrolly-text h1,
    .scrolly-text h2 {
        font-size: 2.5rem;
        /* Smaller than desktop */
        background: none;
        -webkit-text-fill-color: initial;
        color: #ffffff;
        /* White text */
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
        /* readable against video */
    }

    .scrolly-text p {
        font-size: 1rem;
        color: #f0f0f0;
    }

    .scrolly-overlay {
        flex-direction: column;
        justify-content: flex-start;
        padding-bottom: 0;
    }
}