:root {
    --bg-color: #0a0a0a;
    --text-color: #ededed;
    --accent-color: #ccff00;
    --border-color: #333;
    --font-display: 'Unbounded', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Hide default cursor */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Custom Cursor */
.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent-color);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 4rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    mix-blend-mode: difference;
}

.logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 3rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.lang-select {
    display: flex;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
}

.lang-opt {
    color: #666;
    cursor: pointer;
    transition: color 0.3s;
}

.lang-opt:hover,
.lang-opt.active {
    color: var(--accent-color);
}

.divider {
    color: #333;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}


#wormholeCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.6;
    /* Subtle blend */
}

/* Deprecating old grid for now */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    overflow: hidden;
    filter: brightness(0.6) contrast(1.1);
    /* Darken for text readability */
}

.bg-tile {
    width: 100%;
    height: 100%;
    background-image: url('assets/bg_grid.jpg');
    background-size: 500% 500%;
    /* 5x5 scaling */
    opacity: 0;
    transform: scale(0.1);
    /* Start small */
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy pop-in */
}

/* Active tile animation */
.bg-tile.active {
    opacity: 1;
    transform: scale(1);
}


.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    transform-style: preserve-3d;
    perspective: 300px;
    /* Applied directly to parent of scene */
}

.hero-title {
    font-family: var(--font-display);
    font-size: 8vw;
    line-height: 0.9;
    text-transform: uppercase;
    font-weight: 900;
    position: relative;
    z-index: 1;
}

.outline-text {
    -webkit-text-stroke: 2px var(--text-color);
    color: transparent;
    transition: 0.5s;
}

.hero-title:hover .outline-text {
    color: var(--accent-color);
    -webkit-text-stroke: 0px;
}

.hero-subtitle {
    margin-top: 2rem;
    font-size: 1.2rem;
    max-width: 400px;
    font-weight: 300;
    color: #ccc;
    position: relative;
    z-index: 1;
}

.scroll-indicator {
    position: absolute;
    bottom: 4rem;
    right: 4rem;
    font-family: var(--font-display);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
    z-index: 1;
}

/* Marquee */
.marquee-container {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 0;
    overflow: hidden;
    background: var(--accent-color);
    color: var(--bg-color);
}

.marquee-content {
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2rem;
    text-transform: uppercase;
}

/* Grid Layout */
.grid-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 60vh;
    border-bottom: 1px solid var(--border-color);
}

.grid-item {
    padding: 4rem;
    border-right: 1px solid var(--border-color);
}

.grid-item:last-child {
    border-right: none;
}

.label-cell h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #555;
    position: sticky;
    top: 6rem;
}

.big-text {
    font-size: 3rem;
    font-family: var(--font-display);
    line-height: 1.2;
    text-transform: uppercase;
    margin-bottom: 4rem;
}

/* Video Grid (New) */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

.video-card {
    position: relative;
    border: 1px solid #333;
    padding: 1rem;
    transition: transform 0.3s;
}

.video-card:hover {
    transform: scale(1.02);
    border-color: var(--accent-color);
}

.video-card video {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.video-card:hover video {
    opacity: 1;
}

.video-caption h3 {
    font-family: var(--font-display);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.video-caption p {
    color: #888;
    font-size: 0.9rem;
}


/* Project List */
.project-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4rem 2rem;
    /* More padding */
    border-bottom: 1px solid #333;
    transition: all 0.4s;
    position: relative;
    /* For video positioning */
    overflow: hidden;
}

.project-item:hover {
    padding-left: 2rem;
    padding-right: 2rem;
    background: transparent;
    /* Changed from text-color to avoid covering video */
}

/* Project Hover Video */
.hover-video-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 60%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: all 0.5s;
    pointer-events: none;
}

.hover-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.project-item:hover .hover-video-wrapper {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    z-index: 0;
}

.project-item:hover .project-name,
.project-item:hover .project-tag {
    color: #fff;
    z-index: 1;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.project-name {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    text-transform: uppercase;
}

.project-tag {
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.9rem;
    border: 1px solid currentColor;
    padding: 0.4rem 1rem;
    border-radius: 50px;
}

/* Footer */
.footer {
    padding: 6rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-header {
    font-family: var(--font-body);
    margin-bottom: 1rem;
    color: #888;
}

.email-link {
    font-family: var(--font-display);
    font-size: 6vw;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4rem;
    transition: color 0.3s;
}

.email-link:hover {
    color: var(--accent-color);
}

.footer-links a {
    color: var(--text-color);
    margin-right: 2rem;
    text-decoration: none;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 1rem;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-copy {
    margin-top: 4rem;
    color: #444;
}

/* Animations */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

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

@keyframes bounce {

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

    50% {
        transform: translateY(10px);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        background: rgba(10, 10, 10, 0.9);
        backdrop-filter: blur(10px);
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        width: 100%;
    }

    .nav-links a {
        margin-left: 0;
        margin-right: 1rem;
        font-size: 0.8rem;
    }

    .lang-select {
        margin-top: 0.5rem;
    }

    .hero {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 13vw;
    }

    .hero-subtitle {
        font-size: 1rem;
        max-width: 100%;
    }

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

    .grid-item {
        padding: 2rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .label-cell h2 {
        position: static;
        margin-bottom: 1rem;
    }

    .big-text {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

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

    .project-item {
        padding: 2rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        /* Ensure specific height for video bg */
        min-height: 250px;
        justify-content: center;
    }

    .project-name {
        font-size: 2rem;
        z-index: 2;
        /* Ensure text is above video */
        position: relative;
    }

    .project-tag {
        font-size: 0.8rem;
        z-index: 2;
        /* Ensure text is above video */
        position: relative;
    }

    /* Enable Video on Mobile */
    .hover-video-wrapper {
        display: block;
        /* Show it */
        width: 100%;
        height: 100%;
        opacity: 0.4;
        /* Dim it */
        transform: translate(-50%, -50%) scale(1);
        z-index: 1;
    }

    .hover-video {
        filter: grayscale(100%) brightness(0.6);
    }

    /* Active state for mobile touch if needed, or just keep it static background */
    .project-item:active .hover-video-wrapper {
        opacity: 0.8;
    }

    /* Footer */
    .footer {
        padding: 4rem 1.5rem;
    }

    .email-link {
        font-size: 10vw;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    /* Hide custom cursor on mobile */
    .cursor-dot,
    .cursor-outline {
        display: none;
    }

    * {
        cursor: auto;
    }

    /* Blob Button Position */
    .blob-btn {
        position: relative;
        /* Remove absolute positioning */
        bottom: auto;
        right: auto;
        margin: 2rem auto;
        /* Center it */
        width: 100px;
        height: 100px;
        font-size: 0.9rem;
        order: 2;
        /* Place after text */
    }

    .hero {
        padding: 0 1.5rem;
        display: flex;
        /* Ensure flex context */
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .hero-content {
        order: 1;
        /* First */
        width: 100%;
        text-align: center;
    }

    .scroll-indicator {
        position: relative;
        /* Remove absolute positioning */
        bottom: auto;
        right: auto;
        margin-top: 2rem;
        order: 3;
        /* Last */
        animation: none;
        /* Optional: remove bounce if distracting */
        opacity: 0.7;
    }

    .logo-track img {
        height: 40px;
        margin: 0 1rem;
    }
}

/* 3D Text Effect */
:root {
    --depth-spacing: 2px;
    --color-front: #ccff00;
    --color-back: #4d4d4d;
    --stroke-width: 2px;
}

.hero {
    perspective: 100px;
    /* Extreme 3D distortion (near 0) */
}

.scene {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    gap: 4vw;
    /* Increased gap based on viewport width to prevent overlap */
    height: 100%;
    /* Ensure it takes up space */
}

.logo-group {
    position: relative;
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    cursor: default;
    transform-style: preserve-3d;
    user-select: none;
    height: 8vw;
    /* Explicit height to reserve space */
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transform-style: preserve-3d;
}

/* Mixed Style Logic (default) */
.logo-group.mixed .layer:first-child {
    color: var(--color-front);
    -webkit-text-stroke: 0;
    z-index: 10;
}

.logo-group.mixed .layer:not(:first-child) {
    color: transparent;
    -webkit-text-stroke: 1px var(--color-back);
}

/* Specific styling for the middle line 'REMIXED' */
.logo-group.outline .layer {
    color: transparent;
    -webkit-text-stroke: 2px var(--color-front);
}

/* Partner Section (Marquee) */
.logo-marquee {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.logo-track {
    display: flex;
    width: max-content;
    animation: scrollLogos 20s linear infinite;
}

.logo-track img {
    height: 80px;
    width: auto;
    margin: 0 3rem;
    filter: grayscale(0%) brightness(1.1) contrast(1.1);
    /* Full color, slightly boosted */
    opacity: 1;
    /* Fully visible */
    transition: all 0.3s;
}

.logo-track img:hover {
    transform: scale(1.1);
    /* Slight zoom instead of color shifting */
    filter: brightness(1.2);
}

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

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

    /* Shift by half because we duplicated the set */
}

/* Mobile adjustments for partners */
@media (max-width: 768px) {
    .logo-track img {
        height: 50px;
        margin: 0 1.5rem;
    }
}

/* Request Form */
.request-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 0.05em;
}

.request-form input,
.request-form textarea {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 1rem;
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s;
    border-radius: 0;
}

.request-form input:focus,
.request-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(204, 255, 0, 0.05);
}

.submit-btn {
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    align-self: flex-start;
    transition: all 0.3s;
    margin-top: 1rem;
}

.submit-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 255, 0, 0.3);
}

/* Mobile adjustments for form */
@media (max-width: 768px) {
    .request-form {
        width: 100%;
    }

    .submit-btn {
        width: 100%;
    }

    .blob-btn {
        width: 90px;
        height: 90px;
        font-size: 1rem;
        bottom: 10%;
        right: 10%;
    }
}

/* 3D Blob Button */
.blob-btn {
    position: absolute;
    bottom: 20%;
    right: 15%;
    width: 120px;
    height: 120px;
    /* 3D Gradient Base */
    background: radial-gradient(circle at 30% 30%, #eeff00, var(--accent-color));
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.2rem;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    /* Complex Shadows for Depth */
    box-shadow:
        /* Specular Highlight (Rim Light) */
        inset 10px 10px 30px rgba(255, 255, 255, 0.9),
        /* Deep Shadow */
        inset -10px -20px 20px rgba(0, 0, 0, 0.3),
        /* Ambient Reflection */
        inset 20px 0 30px rgba(204, 255, 0, 0.5),
        /* Drop Shadow */
        5px 15px 30px rgba(0, 0, 0, 0.3);
    animation:
        morphBlob 8s ease-in-out infinite,
        floatBlob 6s ease-in-out infinite;
    z-index: 20;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Glassy shine effect */
    position: absolute;
    overflow: visible;
    /* Prevent clipping */
}

/* Specular Reflection Spot */
.blob-btn::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 25%;
    height: 15%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 70%);
    filter: blur(2px);
    transform: rotate(-45deg);
    pointer-events: none;
}

.blob-btn:hover {
    transform: scale(1.05);
    /* Reduced scale to prevent jumping */
    box-shadow:
        inset 10px 10px 40px rgba(255, 255, 255, 1),
        inset -10px -20px 20px rgba(0, 0, 0, 0.3),
        0 20px 40px rgba(204, 255, 0, 0.6);
}

@keyframes morphBlob {

    0%,
    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    34% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }

    67% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
    }
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(10px, -15px) rotate(2deg);
    }

    66% {
        transform: translate(-5px, -5px) rotate(-1deg);
    }

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