/* Premium Studio Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #E8E8E5; /* Original Cream */
    --text-color: #1C1D20;
    --accent-color: #999D9E;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark-theme {
    --bg-color: #1C1D20;
    --text-color: #E8E8E5;
}

/* ------------------------
   CUSTOM CURSOR
------------------------ */
.cursor {
    width: 8px;
    height: 8px;
    background-color: var(--text-color);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(28, 29, 32, 0.2);
    border-radius: 50%;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s ease, 
                height 0.3s ease, 
                background-color 0.3s ease, 
                border-color 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--bg-color);
}

/* ------------------------
   INTRO PRELOADER
------------------------ */
.intro-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #1C1D20;
    color: #FFF;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.intro-text-wrapper {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#intro-text {
    font-size: 4vw;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 15px;
}

#intro-text::before {
    content: "•";
    font-size: 0.8em;
}

.navbar {
    display: flex;
    justify-content: space-between;
    padding: calc(1.5rem + env(safe-area-inset-top)) 4rem 1.5rem 4rem;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: rgba(232, 232, 229, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: background-color 0.5s ease;
}

body.dark-theme .navbar {
    background: rgba(28, 29, 32, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--text-color);
    z-index: 9999;
}

.nav-logo a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
}

/* ------------------------
   HERO SECTION
------------------------ */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem;
    position: relative;
}

.hero h1 {
    font-size: 7.5vw;
    line-height: 1.05;
    font-weight: 500;
    letter-spacing: -2px;
    max-width: 90%;
}

.hero p {
    font-size: 1.6rem;
    margin-top: 2rem;
    color: var(--text-color);
    font-weight: 400;
    max-width: 600px;
    line-height: 1.4;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 4rem;
    right: 4rem;
    width: 100px;
    height: 100px;
    animation: rotate 15s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-scroll-indicator svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--text-color);
    stroke-width: 1;
}
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ------------------------
   TRUSTED BY MARQUEE
------------------------ */
.trusted-by {
    padding: 6rem 0;
    background-color: var(--bg-color); /* Same as body to blend in */
    color: transparent;
    -webkit-text-stroke: 1px rgba(28, 29, 32, 0.2);
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    width: 100vw;
    border-top: 1px solid rgba(28, 29, 32, 0.1);
    border-bottom: 1px solid rgba(28, 29, 32, 0.1);
}

.trusted-by:hover {
    -webkit-text-stroke: 1px var(--text-color);
}

.marquee-wrapper {
    display: flex;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    padding-left: 4rem;
    animation: marquee 30s linear infinite;
}

.marquee-content span {
    font-size: 5vw;
    font-weight: 600;
    letter-spacing: -2px;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.marquee-logo {
    height: 55px; /* Uniform height */
    width: 160px; /* Uniform width bounding box */
    object-fit: contain;
    object-position: center;
    /* brightness(0) turns all colors to pure black. opacity(0.15) makes it a sleek grey */
    filter: brightness(0) opacity(0.15);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.trusted-by:hover .marquee-logo {
    /* Return to original colors and full opacity on hover */
    filter: brightness(1) opacity(1);
}

.marquee-content .dot {
    font-size: 2vw;
    -webkit-text-stroke: 0px;
    color: rgba(28, 29, 32, 0.2);
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ------------------------
   ABOUT SNIPPET
------------------------ */
.about-snippet {
    padding: 6rem 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.about-snippet-text {
    flex: 1;
    padding-right: 4rem;
}

.about-snippet-text h2 {
    font-size: 3vw;
    font-weight: 400;
    line-height: 1.3;
    font-family: 'Inter', sans-serif;
}

.about-snippet-text h2 span {
    color: var(--accent-color);
}

.about-snippet-text a {
    display: inline-block;
    margin-top: 3rem;
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 1px solid var(--text-color);
    font-weight: 500;
    padding-bottom: 5px;
    transition: opacity 0.3s;
}

.about-snippet-text a:hover {
    opacity: 0.6;
}

.about-snippet-image {
    flex: 1;
    text-align: right;
}

.about-snippet-image img {
    max-width: 100%;
    border-radius: 10px;
    filter: grayscale(100%);
    transition: filter 0.5s;
}

.about-snippet-image img:hover {
    filter: grayscale(0%);
}

/* ------------------------
   PROJECTS SECTION
------------------------ */
.recent-work {
    padding: 4rem;
    padding-top: 6rem;
}

.recent-work h2 {
    font-size: 1.2rem;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4rem;
    color: var(--accent-color);
    font-weight: 500;
}

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

.project-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 2rem;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border-top: none !important;
}

.project-item:nth-child(even) {
    margin-top: 10rem;
}

.project-item h3 {
    font-size: 5vw;
    font-weight: 500;
    letter-spacing: -2px;
    transition: transform 0.4s ease;
}

.project-item .category {
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    font-weight: 500;
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--text-color);
    border-radius: 50px;
    transition: transform 0.4s ease;
}

.project-item:hover {
    padding-left: 3rem;
    padding-right: 2rem;
}

/* Floating Image Preview */
.project-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 200px;
    pointer-events: none;
    overflow: hidden;
    z-index: 9997;
    opacity: 0;
    transform: scale(0.8) translate(-50%, -50%);
    border-radius: 0; /* Sharp edges for brutalist look */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.mobile-project-img {
    display: none;
    width: 100%;
    margin-bottom: 1.5rem;
}
.mobile-project-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 12px; /* Fix bad mobile styling by making them nice rounded cards */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}





/* ------------------------
   AWWWARDS ANIMATIONS & MOBILE MENU
------------------------ */
/* Preloader Percent */
#preloader-percent {
    position: absolute;
    bottom: 4rem;
    right: 4rem;
    font-size: 8vw;
    font-weight: 500;
    color: var(--bg-color);
    letter-spacing: -2px;
}

/* Button Split Hover */
.btn {
    overflow: hidden;
    position: relative;
}
.btn span {
    display: block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn::after {
    content: attr(data-text);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover span { transform: translateY(-120%); }
.btn:hover::after { transform: translateY(-100%); }

/* Scroll Parallax Wrapper */
.parallax-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: 10px;
}
.parallax-wrapper img[data-parallax] {
    height: 140%; /* Taller to allow scrolling */
    transform: translateY(-20%); /* Will be overwritten by GSAP */
}

/* Giant Footer Marquee */
.footer-marquee-container {
    width: calc(100% + 8rem); /* Counteract the 4rem left and right padding of footer */
    overflow: hidden;
    display: flex;
    white-space: nowrap;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 4rem;
    padding-bottom: 2rem;
    transform: translateX(-4rem);
}

.footer-marquee {
    display: flex;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
}

.footer-marquee span {
    font-size: 10vw;
    font-weight: 600;
    letter-spacing: -2px;
    padding-right: 2vw;
}

.magnetic {
    display: inline-block;
}

.reveal-text {
    /* Fallback visibility if JS takes time. JS wraps words and hides them with transform anyway */
    opacity: 1;
}

.reveal-word {
    overflow: hidden;
    display: inline-flex;
    vertical-align: top;
}

.reveal-word span {
    display: inline-block;
    transform: translateY(110%) rotateZ(5deg);
}

/* Curtain Footer */
.main-wrapper {
    position: relative;
    z-index: 1;
    background-color: var(--bg-color);
    /* margin-bottom handled by JS */
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: -1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
}

.footer-subtitle {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-title {
    font-size: 3vw;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.2rem;
}

/* Mobile Menu */
.menu-btn {
    display: none;
    width: 50px;
    height: 50px;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    cursor: pointer;
}

.menu-btn-burger {
    width: 30px;
    height: 2px;
    background-color: var(--text-color);
    position: relative;
    transition: all 0.3s ease-in-out;
}

.menu-btn-burger::before,
.menu-btn-burger::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}

.menu-btn-burger::before { transform: translateY(-8px); }
.menu-btn-burger::after { transform: translateY(8px); }

.menu-btn.open .menu-btn-burger { background-color: transparent; }
.menu-btn.open .menu-btn-burger::before { transform: rotate(45deg) translate(0, 0); background-color: var(--bg-color); }
.menu-btn.open .menu-btn-burger::after { transform: rotate(-45deg) translate(0, 0); background-color: var(--bg-color); }

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--text-color);
    color: var(--bg-color);
    z-index: 10000;
    display: flex;
    align-items: center;
    padding-left: 4rem;
    clip-path: circle(0px at calc(100% - 4rem) 4rem);
    transition: clip-path 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.mobile-menu.open {
    clip-path: circle(150% at calc(100% - 4rem) 4rem);
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-menu-inner a {
    color: var(--bg-color);
    text-decoration: none;
    font-size: 10vw;
    font-weight: 500;
    letter-spacing: -2px;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.8s;
}

.mobile-menu.open .mobile-menu-inner a {
    transform: translateY(0);
    opacity: 1;
}

/* ------------------------
   SWUP TRANSITIONS
------------------------ */
.transition-fade {
    transition: 0.8s opacity ease, 0.8s transform cubic-bezier(0.16, 1, 0.3, 1);
}

html.is-animating .transition-fade {
    opacity: 0;
    transform: translateY(60px);
}

/* ------------------------
   PAGE LAYOUTS (ABOUT, CONTACT, WORK)
------------------------ */
.page-hero {
    min-height: 100vh;
    padding: 15rem 4rem 4rem 4rem;
}

.page-hero h1 {
    font-size: 7.5vw;
    font-weight: 500;
    letter-spacing: -2px;
    margin-bottom: 2rem;
}

.page-hero .lead {
    font-size: 1.6rem;
    font-weight: 400;
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.page-hero .secondary {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.8;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* About specific */
.about-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.about-text {
    flex: 1;
    padding-right: 4rem;
}
.about-image {
    flex: 1;
}
.about-image img {
    width: 100%;
    border-radius: 10px;
    filter: grayscale(100%);
}

/* Work specific */
.work-hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.no-padding-top {
    padding-top: 0 !important;
}
.project-item .subtitle {
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 5px;
    font-family: 'Inter', sans-serif;
}

/* Contact specific */
.contact-layout {
    display: flex;
    flex-direction: column;
}
.contact-form-wrapper {
    max-width: 600px;
    width: 100%;
    margin-top: 2rem;
}
.form-group {
    position: relative;
    margin-bottom: 3rem;
}
.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
    pointer-events: none;
    transition: all 0.3s ease;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(28,29,32,0.2);
    color: var(--text-color);
    font-size: 1.2rem;
    outline: none;
    font-family: inherit;
    transition: border-color 0.3s;
}
.form-group textarea {
    resize: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-bottom: 1px solid var(--text-color);
}
.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label {
    top: -1.2rem;
    font-size: 0.8rem;
    color: var(--text-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    font-weight: 500;
}
.outline-btn {
    border: 1px solid var(--text-color);
    color: var(--text-color);
}
.outline-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
}
.solid-btn {
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
}

.flash-message {
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 5px;
}
.flash-message.error { background-color: #ffcccc; color: red; }
.flash-message.success { background-color: #ccffcc; color: green; }

/* ------------------------
   MOBILE RESPONSIVENESS
------------------------ */
@media (max-width: 768px) {
    * {
        cursor: auto; /* Restore cursor on mobile */
    }
    
    .cursor, .cursor-follower {
        display: none !important;
    }

    .navbar {
        padding: 1.5rem 2rem;
    }

    .nav-links {
        display: none !important;
    }
    
    .menu-btn {
        display: flex;
    }

    .hero {
        padding: 0 2rem;
    }
    
    .navbar {
        padding: 1.5rem 2rem;
    }

    /* Tactile Feedback for Touch */
    .project-item:active, .btn:active, .menu-btn:active {
        transform: scale(0.96);
        transition: transform 0.1s ease;
    }



    .hero h1 {
        font-size: 14vw;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 1.2rem;
        margin-top: 1.5rem;
    }

    .mobile-menu {
        padding-left: 2rem;
    }
    
    .mobile-menu-inner a {
        font-size: 15vw;
    }

    .hero-scroll-indicator {
        display: none;
    }

    #intro-text {
        font-size: 8vw;
    }

    .trusted-by {
        padding: 3rem 0;
    }
    
    /* Project Layout for Mobile */
    .project-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        padding-bottom: 2rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .project-list::-webkit-scrollbar {
        display: none;
    }
    .project-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
        padding: 0;
        flex-direction: column;
        align-items: flex-start;
    }
    .project-item:nth-child(even) {
        margin-top: 0;
    }
    .project-item h3 {
        font-size: 8vw;
        margin-bottom: 0.5rem;
    }
    .mobile-project-img {
        display: block;
    }

    .about-snippet {
        flex-direction: column;
        padding: 4rem 2rem;
        gap: 3rem;
    }

    .about-snippet-text {
        padding-right: 0;
    }

    .about-snippet-text h2 {
        font-size: 7vw;
    }

    .about-snippet-image {
        text-align: center;
    }

    .recent-work {
        padding: 2rem;
    }

    .project-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 0;
    }

    .project-item h3 {
        font-size: 10vw;
        letter-spacing: -1px;
    }

    .project-item .category {
        margin-top: 1rem;
        font-size: 1rem;
    }
    
    .project-item:hover {
        padding-left: 0;
        padding-right: 0;
        background-color: transparent;
    }

    .footer {
        padding: 2rem !important;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 2rem;
    }

    .page-hero {
        padding: 8rem 2rem 2rem 2rem;
        min-height: auto;
    }

    .page-hero h1 {
        font-size: 14vw;
        letter-spacing: -1px;
    }

    .page-hero .lead {
        font-size: 1.2rem;
    }

    .about-layout {
        flex-direction: column;
        gap: 3rem;
    }

    .about-text {
        padding-right: 0;
    }

    .contact-form-wrapper {
        margin-top: 1rem;
    }

    /* Sticky Mobile Contact Button */
    .sticky-contact-btn {
        display: flex;
        position: fixed;
        bottom: calc(2rem + env(safe-area-inset-bottom));
        right: 2rem;
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: var(--text-color);
        color: var(--bg-color);
        z-index: 90;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        transition: transform 0.3s ease;
    }
    .sticky-contact-btn svg {
        width: 100%;
        height: 100%;
        animation: rotateText 10s linear infinite;
        fill: var(--bg-color);
        font-size: 14px;
        font-weight: 600;
        letter-spacing: 2px;
    }
    .sticky-contact-btn .inner-dot {
        position: absolute;
        width: 12px;
        height: 12px;
        background: var(--bg-color);
        border-radius: 50%;
    }
    
    .footer {
        padding-bottom: calc(2rem + env(safe-area-inset-bottom)) !important;
    }
}

@keyframes rotateText {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.sticky-contact-btn {
    display: none;
}
