:root {
    /* Base Colors - Dark Default */
    --bg-color: #050505;
    --text-color: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #ffffff; /* Changed to White for B/W theme */
    --border-color: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(255, 255, 255, 0.03);
    
    --font-main: "Google Sans Flex", -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing System */
    --spacing-container: 4vw;
    --section-padding: 8rem;
    --section-gap: 4rem;
}

[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #050505;
    --text-secondary: #52525b;
    --accent-color: #000000; /* Changed to Black for B/W theme */
    --border-color: rgba(0, 0, 0, 0.1);
    --card-hover: rgba(0, 0, 0, 0.03);
}

html.lenis {
    height: auto;
}

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

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

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

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

body {
    font-family: var(--font-main);
    font-optical-sizing: auto;
    font-weight: 400;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.2;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.5s ease, color 0.5s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem var(--spacing-container);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    mix-blend-mode: difference;
    color: #fff;
    transition: padding 0.3s ease;
}

[data-theme="light"] header {
    mix-blend-mode: normal;
    color: var(--text-color);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: 32px;
    width: auto;
    filter: invert(1);
}

[data-theme="light"] .logo img {
    filter: invert(0);
}

.logo-text {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 700;
    font-variation-settings: "wdth" 120, "wght" 700;
    text-transform: lowercase;
    letter-spacing: -0.05em;
    transition: font-variation-settings 0.3s ease;
}

.logo a:hover .logo-text {
    font-variation-settings: "wdth" 150, "wght" 800;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

nav a {
    font-size: 0.95rem; /* Standardized nav size */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid currentColor;
    color: currentColor;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    margin-left: 2rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: currentColor;
    color: var(--bg-color);
}

/* Sections - Unified Spacing */
section {
    padding: var(--section-padding) 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(var(--section-padding) + 4rem); /* Offset for header */
    padding-bottom: var(--section-padding);
    perspective: 1000px;
}

.hero h1 {
    font-size: clamp(3rem, 9vw, 11rem);
    font-weight: 500;
    line-height: 0.9;
    margin-bottom: var(--section-gap);
    letter-spacing: -0.04em;
    transform-style: preserve-3d;
}

.hero .char {
    display: inline-block;
}

.hero .word {
    display: inline-block;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.8rem);
    max-width: 600px;
    margin-left: auto;
    font-weight: 300;
    color: var(--text-secondary);
}

/* Mission Section */
.mission {
    border-top: 1px solid var(--border-color);
}

.mission h2 {
    font-size: clamp(2rem, 4vw, 4.5rem);
    max-width: 90%;
    margin-bottom: calc(var(--section-gap) * 1.5);
    line-height: 1.1;
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--section-gap);
}

.feature {
    padding: 3rem 2rem; /* Uniform card padding */
    border: 1px solid transparent;
    transition: border-color 0.3s, background 0.3s, transform 0.3s;
    border-radius: 8px;
    /* skew-y handled by JS for fantasy */
}

.feature:hover {
    border-color: var(--border-color);
    background: var(--card-hover);
    transform: translateY(-10px);
}

.feature h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.feature p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Services / Scroll Section */
.services {
    /* Uses standard section padding now */
}

.service-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 6rem 0; /* Slightly larger vertical padding for focus */
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0.3;
    filter: blur(2px);
    transform: scale(0.98);
}

.service-row.active {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
    padding-left: 2rem; /* Indent on active */
    border-color: var(--accent-color);
}

.service-row h3 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    flex: 1;
    letter-spacing: -0.02em;
}

.service-desc {
    flex: 0 0 350px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
}

.service-row.active .service-desc {
    transform: translateX(0);
    opacity: 1;
}

/* Footer */
footer {
    padding: var(--section-padding) var(--spacing-container) 4rem;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--section-gap);
    margin-bottom: var(--section-gap);
}

.footer-heading {
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 0.9;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.4rem;
    justify-content: flex-end;
}

.contact-info a {
    border-bottom: 1px solid var(--border-color);
    width: fit-content;
    padding-bottom: 0.2rem;
    transition: color 0.3s, border-color 0.3s;
}

.contact-info a:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

/* Skew Effect Class */
.skew-on-scroll {
    transform-origin: center center;
    will-change: transform;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 6rem);
    }
    
    .service-row h3 {
        font-size: clamp(2rem, 5vw, 3.5rem);
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 4rem;
        --section-gap: 2rem;
        --spacing-container: 6vw;
    }
    
    .hero h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
        word-break: break-word;
        hyphens: auto;
    }
    
    .hero-subtitle {
        margin-left: 0;
        font-size: 1rem;
    }
    
    .service-row {
        flex-direction: column;
        gap: 1rem;
        opacity: 1;
        filter: none;
        transform: none;
        padding: 3rem 0;
    }
    .service-row.active {
        padding-left: 0;
    }
    .service-row h3 {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    .service-desc {
        flex: auto;
        transform: none;
        opacity: 1;
    }
    .footer-content {
        grid-template-columns: 1fr;
    }
    .footer-heading {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-container: 5vw;
    }
    
    header {
        padding: 1rem var(--spacing-container);
    }
    
    .hero h1 {
        font-size: clamp(1.8rem, 9vw, 2.5rem);
    }
    
    .logo-text {
        font-size: 1.1rem;
    }
    
    .theme-toggle {
        margin-left: 0.5rem;
        padding: 0.35rem 0.6rem;
        font-size: 0.65rem;
    }
    
    nav ul {
        gap: 0.5rem;
    }
}
