/* VARIABLES & SETUP */
:root {
    /* Dark Mode Palette */
    --bg-main: #030304;
    --bg-card: #0A0A0A;
    --border-dim: #1F1F1F;

    /* Typography */
    --text-primary: #F3F4F6;
    --text-secondary: #9CA3AF;
    --text-tertiary: #4B5563;

    /* Accents */
    --accent-color: #2DD4BF;
    /* Electric Teal */
    --accent-glow: rgba(45, 212, 191, 0.4);

    /* Border Glow */
    --gradient-glow: #2DD4BF;

    /* Layout */
    --max-width: 1100px;
    --header-height: 80px;

    /* Mouse Position Defaults */
    --mouse-x: 50%;
    --mouse-y: 50%;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

/* Find this section in styles.css and update it */
body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;

    /* ADD THIS LINE: */
    overflow-x: hidden;

    /* Ensure relative positioning so absolute children align correctly */
    position: relative;
}

img {
    display: block;
    max-width: 100%;
}

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

/* === HEADER FX CONTAINER === */
.header-fx-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 85vh;
    overflow: hidden;
    z-index: -1;
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.grid-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(#1a1a1a 1px, transparent 1px),
        linear-gradient(90deg, #1a1a1a 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

.grid-highlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(#333 1px, transparent 1px),
        linear-gradient(90deg, #333 1px, transparent 1px);
    background-size: 50px 50px;

    mask-image: radial-gradient(350px circle at var(--mouse-x) var(--mouse-y),
            black 0%,
            transparent 100%);
    -webkit-mask-image: radial-gradient(350px circle at var(--mouse-x) var(--mouse-y),
            black 0%,
            transparent 100%);
}

.ambient-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.08) 0%, rgba(0, 0, 0, 0) 60%);
    opacity: 0.5;
}

/* === HEADER & NAV === */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(3, 3, 4, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-dim);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-content {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.brand-logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    z-index: 1002;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.nav-cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    padding: 8px 20px;
    border: 1px solid var(--border-dim);
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s;
}

.nav-cta:hover {
    border-color: #666;
    background: rgba(255, 255, 255, 0.1);
}

/* MOBILE BUTTON STYLES (FIXED) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 1002;
}

.icon-open,
.icon-closed {
    display: block;
    width: 24px;
    height: 24px;
}

/* Default state: Show Hamburger, Hide X */
.icon-open {
    display: block;
}

.icon-closed {
    display: none;
}

/* Active state: Hide Hamburger, Show X */
.mobile-menu-btn.active .icon-open {
    display: none;
}

.mobile-menu-btn.active .icon-closed {
    display: block;
}

@media (max-width: 768px) {
    .glass-header {
        width: 100vw;
        max-width: 100%;
        left: 0;
        right: 0;
    }

    .header-content {
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .mobile-menu-btn {
        display: block;
        flex-shrink: 0;
    }

    .nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: rgba(3, 3, 4, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1001;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-link {
        font-size: 1.5rem;
        font-weight: 700;
    }

    .nav-cta {
        font-size: 1.2rem;
        padding: 12px 32px;
    }
}

/* === HERO === */
.hero {
    position: relative;
    padding-top: 180px;
    padding-bottom: 100px;
}

/* BACKGROUND GRADIENT ADDED HERE */
/* Find this section in styles.css and replace it */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    /* CHANGE 1: Increase size to extend beyond the section borders */
    width: 140%;
    height: 180%;

    /* CHANGE 2: Adjusted gradient to fade out smoother over the larger area */
    background: radial-gradient(circle at center, rgba(45, 212, 191, 0.12) 0%, rgba(3, 3, 4, 0) 50%);

    pointer-events: none;
    z-index: -1;
}

.badge-wrapper {
    margin-bottom: 24px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent-color);
    border: 1px solid rgba(45, 212, 191, 0.2);
    padding: 6px 14px;
    border-radius: 99px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 5rem;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 30px;
}

/* Highlight Text (Solid Teal) */
.highlight-text {
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary);
    max-width: 650px;
    font-weight: 400;
}

/* === PHILOSOPHY SECTION === */
.philosophy-section {
    padding: 60px 0 100px;
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    border-top: 1px solid var(--border-dim);
    padding-top: 60px;
}

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

.feature-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.feature-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.feature-icon {
    color: var(--accent-color);
    margin-bottom: 16px;
    width: 24px;
    height: 24px;
}

/* === GRID SECTION === */
.work-section {
    padding-bottom: 120px;
    scroll-margin-top: 100px;
}

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

.section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 50px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 700;
}

.line {
    height: 1px;
    background: var(--border-dim);
    flex-grow: 1;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* === GLOW CARDS === */
.card {
    position: relative;
    border-radius: 20px;
    background: var(--bg-card);
    transition: transform 0.3s;
    height: 100%;
    display: block;
}

.card-glow-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 20px;
    background: var(--gradient-glow);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.card-inner {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border-radius: 19px;
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-dim);
}

.card:hover {
    transform: translateY(-5px);
}

.card:hover .card-glow-border {
    opacity: 0.6;
}

.app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 24px;
    background-color: #1a1a1a;
    object-fit: cover;
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #fff;
}

.app-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
}

.view-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.arrow {
    transition: transform 0.2s;
}

.card:hover .arrow {
    transform: translateX(5px);
}

/* === MISSION SECTION === */
.mission-section {
    padding: 100px 0;
    border-top: 1px solid var(--border-dim);
    scroll-margin-top: 50px;
}

.mission-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
}

.mission-label {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--text-tertiary);
    text-transform: uppercase;
    padding-top: 8px;
}

.mission-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    color: #ffffff;
    background: none;
    -webkit-text-fill-color: initial;
}

.mission-text p {
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 650px;
}

.mission-text .sub-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* === FOOTER === */
footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-dim);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

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

.brand-logo.small {
    color: var(--text-tertiary);
    margin-bottom: 5px;
    display: block;
}

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

    .mission-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}