/* --- RESET & CORE --- */
:root {
    --bg: #050505;
    --fg: #F0F0F0;
    --dim: #666;
    --grid: #1a1a1a;
    --accent: #F0F0F0;
    --font-main: 'Poppins', sans-serif;
    --font-brand: 'Satoshi', sans-serif;

    /* Specific brand elements */
    --font-heading: 'Poppins', sans-serif;
}

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

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: var(--font-main);
    overflow-x: hidden;
    font-size: 16px;
    transition: background-color 0.6s ease, color 0.6s ease;
}

/* --- LIGHT THEME (Inverted) --- */
body.light-theme {
    --bg: #F0F0F0;
    --fg: #050505;
    --grid: #d0d0d0;
    /* Modified grid for visibility */
    --dim: #888;
}

body.light-theme .big-text {
    mix-blend-mode: normal;
    /* Exclusion fix for light mode */
}

/* Fix cursor visibility in light mode */
body.light-theme #cursor {
    background: var(--fg);
    /* Should be black in light mode */
    mix-blend-mode: normal;
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3 {
    text-transform: uppercase;
    font-weight: 800;
    line-height: 0.9;
}

p {
    font-weight: 400;
    line-height: 1.4;
    opacity: 0.8;
}

.label {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--dim);
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: block;
}

/* --- CURSOR --- */
#cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    background: var(--fg);
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

/* --- GRID BACKGROUND --- */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    border-right: 1px solid var(--grid);
}

.bg-line {
    border-left: 1px solid var(--grid);
    height: 100%;
}

/* --- CORNER NAV (Fixed) --- */
.corner {
    position: fixed;
    z-index: 100;
    padding: 2rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
}

.tl {
    top: 0;
    left: 0;
}

.tr {
    top: 0;
    right: 0;
    text-align: right;
}

.bl {
    bottom: 0;
    left: 0;
}

.br {
    bottom: 0;
    right: 0;
    text-align: right;
}

.nav-link {
    display: block;
    opacity: 0.5;
    transition: opacity 0.3s;
    text-decoration: none;
    color: var(--fg);
    margin-bottom: 5px;
}

.nav-link:hover {
    opacity: 1;
    text-decoration: line-through;
}

/* --- SECTIONS GENERAL --- */
section {
    padding: 8rem 5vw;
    border-bottom: 1px solid var(--grid);
    position: relative;
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    /* Align bottom */
    justify-content: space-between;
    padding-bottom: 4rem;
}

.hero-left {
    max-width: 400px;
    margin-bottom: 2vw;
}

.hero-statement {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.btn {
    display: inline-block;
    border: 1px solid var(--fg);
    padding: 1rem 2rem;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--fg);
    text-decoration: none;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--fg);
    color: var(--bg);
}

.big-text {
    font-size: 13vw;
    text-align: right;
    letter-spacing: -0.04em;
    mix-blend-mode: exclusion;
    font-family: var(--font-brand);
}

/* --- MARQUEE (The "Catchy" Element) --- */
.marquee-wrap {
    border-bottom: 1px solid var(--grid);
    padding: 1.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    background: var(--bg);
    /* Mask edges for smoother appearance */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee {
    display: flex;
    width: max-content;
    animation: scroll 30s linear infinite;
    will-change: transform;
}

.marquee span {
    font-size: 4vw;
    font-weight: 900;
    text-transform: uppercase;
    padding-right: 4rem;
    /* Use padding for layout stability */
    margin-right: 0;
    -webkit-text-stroke: 1px var(--fg);
    color: transparent;
    /* Outline text style */
    transition: color 0.3s;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.marquee:hover span {
    color: var(--fg);
    cursor: none;
}

@keyframes scroll {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(-50%, 0, 0);
    }
}

/* --- SERVICES GRID --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--grid);
    /* Creates borders between cells */
    border: 1px solid var(--grid);
}

.service-card {
    background: var(--bg);
    padding: 3rem 2rem;
    height: 100%;
    transition: background 0.3s;
}

.service-card:hover {
    background: #0a0a0a;
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 2rem;
    display: block;
}

.service-list {
    margin-top: 2rem;
    list-style: none;
    opacity: 0.6;
    font-size: 0.9rem;
    line-height: 1.8;
}

.service-list li::before {
    content: "+ ";
}

/* --- PROJECTS (Refined) --- */
.project-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 0;
    border-top: 1px solid var(--grid);
    transition: padding 0.3s;
}

.project-row:hover {
    padding-left: 2rem;
    padding-right: 2rem;
    background: #0a0a0a;
}

.project-meta {
    text-align: right;
}

/* --- FOOTER CTA --- */
.footer-cta {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.footer-cta h2 {
    font-size: 8vw;
    margin-bottom: 2rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .hero {
        flex-direction: column-reverse;
        align-items: flex-start;
        justify-content: center;
    }

    .big-text {
        text-align: left;
        font-size: 18vw;
        margin-bottom: 2rem;
        line-height: 0.8;
    }

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

    .bg-grid {
        display: none;
    }

    .marquee span {
        font-size: 8vw;
    }

    .corner {
        padding: 1.5rem;
    }
}