:root {
    /* Base Token Defaults (Light Mode Default) */
    --bg-color: #ffffff;
    --text-color: #0a0a0a;
    --accent-color: #0a0a0a;

    /* Functional Tokens */
    --section-bg: var(--bg-color);
    --section-text: var(--text-color);
    --section-border: rgba(0, 0, 0, 0.1);
    --section-muted: rgba(0, 0, 0, 0.5);
    --section-line: rgba(0, 0, 0, 0.1);

    /* Typography Scale - Cuberto/Editorial Style */
    --font-main: 'Outfit', sans-serif;

    /* Hierarchical Scale - Rescaled to 0.8x (80% Zoom Equivalent) */
    --h1-size: clamp(38px, 6.4vw, 88px);
    --h2-size: clamp(26px, 4vw, 51px);
    --h3-size: clamp(16px, 2vw, 29px);
    --p-large: clamp(14px, 1.2vw, 18px);
    --p-body: clamp(13px, 0.9vw, 14px);
    /* slightly larger for readability */

    /* Spacing */
    --container-padding: 3.2vw;
    --section-spacing: 9.6vh;
}

/* --- Theme Providers --- */

/* Dark Theme Provider */
[data-bgcolor="#0a0a0a"],
[data-bgcolor="#000000"] {
    --section-bg: #0a0a0a;
    --section-text: #ffffff;
    --section-border: rgba(255, 255, 255, 0.15);
    --section-muted: rgba(255, 255, 255, 0.5);
    --section-line: rgba(255, 255, 255, 0.15);
    --accent-color: #ffffff;
}

/* Light Theme Provider (Explicit) */
[data-bgcolor="#ffffff"],
[data-bgcolor="#f8f8f8"],
[data-bgcolor="#f4f4f4"] {
    --section-bg: #ffffff;
    --section-text: #0a0a0a;
    /* Use passed color if slightly off-white, handle via background-color rule below */
    --section-border: rgba(0, 0, 0, 0.1);
    --section-muted: rgba(0, 0, 0, 0.5);
    --section-line: rgba(0, 0, 0, 0.1);
    --accent-color: #0a0a0a;
}

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

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    background-color: #f8f8f8;
    /* Default page bg */
    color: #0a0a0a;
    overflow-x: hidden;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography System --- */
h1,
h2,
h3,
h4,
p,
a {
    color: var(--section-text);
    transition: color 0.4s ease;
}

h1 {
    font-size: var(--h1-size);
    font-weight: 500;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    /* Editorial Choice */
}

h2 {
    font-size: var(--h2-size);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

h3 {
    font-size: var(--h3-size);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

p {
    font-size: var(--p-body);
    line-height: 1.6;
    letter-spacing: -0.01em;
    color: var(--section-muted);
}

.is-large {
    font-size: var(--p-large);
    line-height: 1.4;
    font-weight: 400;
}

/* --- Container --- */
.container {
    padding: 0 var(--container-padding);
    max-width: 1440px;
    /* Cuberto is wide - scaled to 0.8x */
    margin: 0 auto;
}

/* --- Section Architectures --- */
.section {
    position: relative;
    padding-top: var(--section-spacing);
    padding-bottom: var(--section-spacing);
    background-color: var(--section-bg);
    color: var(--section-text);
    transition: background-color 0.5s ease, color 0.5s ease;
    /* Optional: Rounded corners separate sections like cards */
    /* border-radius: 0;  <-- Cuberto usually full bleed or subtle */
}

/* Specific overrides for spacing rhythm */
[data-bgcolor="#0a0a0a"] {
    /* Dark sections closer together for density */
    padding-top: calc(var(--section-spacing) * 0.9);
    padding-bottom: calc(var(--section-spacing) * 0.9);
}

.section__label {
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--section-muted);
    margin-bottom: 6vh;
    display: block;
    font-weight: 500;
}


/* --- Custom Cursor --- */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    /* V6 Negative Effect */
    will-change: transform;
}

.cursor__dot {
    width: 8px;
    height: 8px;
    background: white;
    /* Always white for difference mode */
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
}

.cursor__circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    pointer-events: none;
    transform: translate(-50%, -50%);
    will-change: transform;
}

.cursor__visual {
    width: 100%;
    height: 100%;
    background: white;
    /* Always white for difference mode */
    border-radius: 50%;
    transform: scale(0.1);
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform, opacity;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.cursor__text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 500;
    color: black;
    /* Inverted inside white circle */
    opacity: 0;
    white-space: nowrap;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    will-change: opacity;
}

.cursor__icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    color: black;
    /* Inverted inside white circle */
    opacity: 0;
    will-change: opacity, transform;
}

/* Video State (Play Icon) */
.cursor.is-video .cursor__visual {
    transform: scale(1);
    opacity: 1;
}

.cursor.is-video .cursor__text {
    opacity: 0;
}

.cursor.is-video .cursor__icon {
    opacity: 1;
}

.cursor.is-video .cursor__dot {
    opacity: 0;
}

/* Project State (Explore Text) */
.cursor.is-project .cursor__visual {
    transform: scale(1);
    opacity: 1;
}

.cursor.is-project .cursor__text {
    opacity: 1;
}

.cursor.is-project .cursor__icon {
    opacity: 0;
}

.cursor.is-project .cursor__dot {
    opacity: 0;
}

.cursor.magnetic-active .cursor__dot {
    transform: scale(2.5);
    background: rgba(255, 255, 255, 0.2);
}

/* --- Loader --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20vh;
}


/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px var(--container-padding);
    pointer-events: none;
    mix-blend-mode: difference;
    /* Ensures visibility on all bg */
    color: white;
    /* Mix blend will invert this against white bg to look black */
}

.nav__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    pointer-events: auto;
}

.nav__logo {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -0.03em;
    text-decoration: none;
    color: inherit;
    text-transform: lowercase;
}

.nav__links {
    display: flex;
    gap: 40px;
}

.nav__link {
    text-decoration: none;
    color: inherit;
    font-size: 16px;
    font-weight: 500;
    opacity: 0.8;
    position: relative;
    padding-bottom: 4px;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__link:hover {
    opacity: 1;
}

.nav__link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav__menu-btn {
    display: none;
}

@media (max-width: 768px) {
    .nav__links {
        display: none;
    }

    .nav__menu-btn {
        display: block;
        cursor: pointer;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        font-size: 14px;
        z-index: 1002;
        position: relative;
    }
}

/* --- Mobile Navigation Overlay --- */
.nav__mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--section-bg);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav__mobile.is-active {
    opacity: 1;
    pointer-events: auto;
}

.nav__mobile-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.nav__mobile-link {
    text-decoration: none;
    color: var(--section-text);
    font-size: 32px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.nav__mobile.is-active .nav__mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.nav__mobile.is-active .nav__mobile-link:nth-child(1) {
    transition-delay: 0.1s;
}

.nav__mobile.is-active .nav__mobile-link:nth-child(2) {
    transition-delay: 0.15s;
}

.nav__mobile.is-active .nav__mobile-link:nth-child(3) {
    transition-delay: 0.2s;
}

.nav__mobile.is-active .nav__mobile-link:nth-child(4) {
    transition-delay: 0.25s;
}


/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 12vh;
    /* Space for nav */
    gap: 6.5vh;
    /* Explicitly inheriting variables from section generic */
}

.hero__content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    align-items: center;
    gap: 24px;
    max-width: 1120px;
    z-index: 2;
}

.hero__title {
    color: var(--section-text);
    /* Ensure implicit inheritance */
    width: 100%;
}

.hero__title .line {
    display: block;
    opacity: 0;
    /* Animation handled by JS/GSAP */
}

.hero__subtitle {
    font-size: var(--p-large);
    max-width: 480px;
    opacity: 0.6;
    /* Uses section-muted effectively via opacity on text color */
    color: var(--section-text);
}

.hero__video-wrap {
    width: 64vw;
    max-width: 1120px;
    aspect-ratio: 16/9;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.hero__video-inner {
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.1);
    cursor: pointer;
}

.hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero__video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.hero__video-overlay span {
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.hero__video-inner:hover .hero__video-overlay {
    opacity: 0;
}

.hero__video-inner:hover .hero__video {
    transform: scale(1);
}


/* --- Services --- */
/* --- Services (Horizontal Concept A) --- */
.services__header {
    text-align: left;
    max-width: 100%;
    margin: 0 auto 0;
    padding-bottom: 40px;
    /* border-bottom: 1px solid var(--section-line); Removed to merge with grid top border */
}

.services__header h2 {
    margin-bottom: 24px;
}

.services__header p {
    opacity: 0.6;
    font-size: var(--p-large);
    max-width: 600px;
}

/* Horizontal Flex Container */
.services__grid {
    display: flex;
    flex-direction: row;
    height: 48vh;
    /* Fixed height for the columns */
    min-height: 400px;
    margin-bottom: 96px;
}

.service-card {
    position: relative;
    flex: 1;
    /* Equal width by default */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 32px;
    border-right: 1px solid var(--section-line);
    transition: flex 0.6s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s ease, opacity 0.4s ease;
    cursor: pointer;
    text-decoration: none;
    overflow: hidden;
}

/* Remove last border */
.service-card:last-child {
    border-right: none;
}

/* Interaction: Expand on Hover */
.service-card:hover {
    flex: 1.5;
    background-color: #111;
    z-index: 2;
}

/* Peer Dimming */
.services__grid:hover .service-card:not(:hover) {
    opacity: 0.3;
}

.service-card__top {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.service-card__num {
    font-size: 14px;
    font-family: monospace;
    opacity: 0.5;
    color: #fff;
    margin-bottom: 10px;
}

.service-card__top h3 {
    font-size: clamp(26px, 2.5vw, 36px);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fff;
}

.service-summary {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

/* Hide summary on expand? Optional. Let's keep it but maybe dim it */
.service-card:hover .service-summary {
    opacity: 0.3;
}

.service-card__content {
    margin-top: auto;
    margin-bottom: 0;
    /* Reduced to 0 */
    opacity: 0;
    transition: opacity 0.5s ease 0.1s, transform 0.5s ease 0.1s;
}

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

/* Detailed Description (Hidden by default) */
.service-card__content p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 95%;
    margin-top: 0;
    height: 0;
    overflow: hidden;
    color: #dedede;
}

/* Reveal description on hover */
.service-card:hover .service-card__content p {
    opacity: 1;
    transform: translateY(0);
    height: auto;
    margin-top: 0;
}

.service-card__bottom {
    /* border-top: 1px solid rgba(255, 255, 255, 0.1); Removed as requested */
    padding-top: 12px;
    /* Reduced from 24px */
    display: flex;
    justify-content: flex-end;
}

.service-arrow {
    font-size: 24px;
    opacity: 0;
    color: #fff;
    transform: translateX(-20px);
    transition: all 0.4s ease;
}

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

.services__footer {
    text-align: left;
    padding-top: 0;
}


/* Mobile Responsiveness */
@media (max-width: 900px) {
    .services__grid {
        display: grid;
        grid-template-columns: 1fr;
        /* Stack vertically */
        height: auto;
        border-bottom: none;
    }

    .service-card {
        border-right: none;
        border-bottom: 1px solid var(--section-line);
        padding: 40px 24px;
        min-height: auto;
    }

    .service-card:hover {
        flex: none;
        background-color: transparent;
    }

    .service-card__top h3 {
        font-size: 28px;
    }

    .service-card__content {
        opacity: 1;
        margin-bottom: 0;
    }

    .service-card__content p {
        opacity: 0.8;
        height: auto;
        transform: none;
        margin-top: 15px;
        color: rgba(255, 255, 255, 0.8);
    }

    .service-summary {
        display: none;
    }

    .services__grid:hover .service-card {
        opacity: 1;
    }

    .service-arrow {
        display: none;
    }
}


/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    border-radius: 100px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn.is-outline {
    border: 1px solid var(--section-line);
    /* Adaptive border */
    color: var(--section-text);
}

.btn.is-outline:hover {
    background: var(--section-text);
    color: var(--section-bg);
    border-color: var(--section-text);
}


/* --- Work Grid (Editorial) --- */
.work__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 6.4vw;
    /* Horizontal gap - scaled */
    padding: 0 2vw;
    margin: 0 auto;
    max-width: 1320px;
}

.work__item {
    margin-bottom: 12vh;
}

/* Offsets for editorial rhythm */
.work__item[data-offset="0"] {
    margin-top: 0;
}

.work__item[data-offset="60"] {
    margin-top: 48px;
}

.work__item[data-offset="100"] {
    margin-top: 80px;
}

.work__item[data-offset="120"] {
    margin-top: 96px;
}

.work__item[data-offset="180"] {
    margin-top: 144px;
}

.work__item:nth-child(5) {
    grid-column: 1 / -1;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.work__item:nth-child(5) .work__info {
    padding-left: 0;
    align-items: center;
}

.work__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.work__img-wrap {
    width: 100%;
    aspect-ratio: 0.8;
    /* Portraitish */
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 30px;
    background-color: #222;
}

.work__img {
    width: 100%;
    height: auto;
    object-position: top;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.work__item:hover .work__img {
    transform: scale(1.05);
}

.work__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.work__category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--section-muted);
}

.work__title {
    font-size: var(--h3-size);
    font-weight: 400;
}


/* --- About Section --- */
.about__content {
    max-width: 90%;
    margin: 0 auto;
}

.about__headline {
    font-size: clamp(26px, 3.2vw, 48px);
    margin-bottom: 3.2vh;
}

/* Standardized Spacing - Removed erratic custom offsets, padding now managed globally by .section */


/* --- Philosophy --- */
.philosophy {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.philosophy__slider {
    position: relative;
    width: 100%;
    text-align: center;
}

.philosophy__item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    width: 100%;
}

.philosophy__item.active {
    opacity: 1;
    pointer-events: auto;
}

.philosophy__item h2 {
    font-size: clamp(48px, 9.6vw, 160px);
    color: var(--section-text);
}

.philosophy__item p {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 14px;
    margin-top: 20px;
}


/* --- Contact --- */
.container.is-split {
    display: flex;
    flex-wrap: wrap;
    gap: 6.4vw;
}

.contact__left,
.contact__right {
    flex: 1;
    min-width: 320px;
}

.contact__link {
    display: block;
    font-size: clamp(19px, 2.8vw, 38px);
    text-decoration: none;
    color: var(--section-text);
    margin-bottom: 20px;
    font-weight: 400;
    transition: opacity 0.3s;
}

.contact__link:hover {
    opacity: 0.6;
}

.contact__link.is-button {
    display: inline-block;
    font-size: 11px;
    padding: 16px 32px;
    border: 1px solid var(--section-line);
    border-radius: 100px;
    margin-top: 32px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Form */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.form__group {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--section-line);
    position: relative;
    transition: border-color 0.3s ease;
}

.form__group:focus-within {
    border-color: var(--section-text);
}

.form__group label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--section-muted);
    margin-bottom: 12px;
}

.form__group input,
.form__group textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--section-text);
    padding: 8px 0;
    font-size: 18px;
    font-family: inherit;
    outline: none;
    resize: none;
    border-radius: 0;
}

/* Date & Time Specifics */
input[type="date"],
input[type="time"] {
    font-family: var(--font-main);
    text-transform: uppercase;
    cursor: pointer;
}

/* Placeholder Styling */
::placeholder {
    color: var(--section-muted);
    opacity: 0.5;
}

.contact__form button {
    background: var(--section-text);
    /* Auto-invert */
    color: var(--section-bg);
    /* Auto-invert */
    border: none;
    padding: 20px 48px;
    border-radius: 100px;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.3s ease, background-color 0.3s ease;
    align-self: flex-start;
    margin-top: 10px;
}

.contact__form button:hover {
    transform: scale(1.05);
}

/* Mobile Adjustments for Form */
@media (max-width: 768px) {
    .form__row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* --- Form Success State --- */
.form-wrapper {
    position: relative;
    width: 100%;
}

.contact__success {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%) translateY(20px);
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    visibility: hidden;
}

.contact__success .success-title {
    font-size: clamp(26px, 4vw, 51px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--section-text);
}

.contact__success .success-text {
    font-size: clamp(14px, 1.2vw, 18px);
    color: var(--section-muted);
    max-width: 80%;
}

.footer {
    padding-top: 20px;
    border-top: 1px solid var(--section-line);
    margin-top: 40px;
    padding-bottom: 20px;
    opacity: 0.5;
    font-size: 11px;
    letter-spacing: 0.02em;
    display: flex;
    justify-content: space-between;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .footer {
        flex-direction: column;
        gap: 10px;
        align-items: center;
        text-align: center;
    }

    .work__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .work__item {
        margin-bottom: 80px;
        margin-top: 0 !important;
    }

    .work__item:nth-child(5) {
        max-width: 100%;
    }

    .hero__title {
        font-size: 50px;
    }
}