:root {
    --bg: #FFFFFF;
    --bg-alt: #000000;
    --text: #000000;
    --text-inverse: #FFFFFF;
    --border: #000000;
    --border-light: rgba(0, 0, 0, 0.1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Syne', sans-serif;
    --container-width: 1000px;
    --spacing-unit: 4px;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg: #000000;
    --bg-alt: #FFFFFF;
    --text: #FFFFFF;
    --text-inverse: #000000;
    --border: #FFFFFF;
    --border-light: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.4;
    overflow-x: hidden;
    font-size: 12px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

::selection {
    background: var(--text);
    color: var(--bg);
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.6;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 50px;
}

.logo {
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.logo-img {
    height: 20px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    height: 100%;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-left: 1px solid var(--border-light);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links a:hover {
    background: var(--bg-alt);
    color: var(--text-inverse);
    opacity: 1;
}

.cta-button {
    background: var(--bg-alt) !important;
    color: var(--text-inverse) !important;
}

.cta-button:hover {
    background: var(--bg) !important;
    color: var(--text) !important;
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    margin-left: auto;
}

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

.theme-toggle svg {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    stroke: var(--text);
}

.theme-toggle:hover svg {
    stroke: var(--text-inverse);
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

/* Dark mode icon states */
[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.25;
    pointer-events: none;
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-section:hover .hero-background {
    opacity: 1;
}

.hero-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.hero-banner.base {
    opacity: 0.25;
}

.hero-banner.reveal {
    opacity: 1;
    -webkit-mask-image: radial-gradient(circle 300px at var(--x, 50%) var(--y, 50%), black 0%, transparent 100%);
    mask-image: radial-gradient(circle 300px at var(--x, 50%) var(--y, 50%), black 0%, transparent 100%);
}


.hero-content {
    max-width: 800px;
    text-align: center;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.gradient-text {
    display: block;
    font-style: normal;
}

.hero-content p {
    font-size: 0.875rem;
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    opacity: 0.8;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: inline-flex;
    gap: 0;
    border: 1px solid var(--border);
}

.primary-btn,
.secondary-btn {
    padding: 0.75rem 2rem;
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 0.7rem;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
}

.primary-btn {
    background: var(--bg-alt);
    color: var(--text-inverse);
    border-right: 1px solid var(--border);
}

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

.secondary-btn {
    background: var(--bg);
    color: var(--text);
}

.secondary-btn:hover {
    background: var(--bg-alt);
    color: var(--text-inverse);
}

/* Sections */
.section {
    padding: 5rem 0;
    border-bottom: 1px solid var(--border);
}

/* Scroll offset for anchor links */
#approach,
#verticals {
    scroll-margin-top: 50px;
}

/* Full Screen Sections */
#approach,
#verticals,
#syndicate,
#team {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#approach .container,
#verticals .container,
#syndicate .container,
#team .container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

#approach .grid-3,
#verticals .portfolio-grid,
#syndicate .syndicate-grid,
#team .team-grid {
    flex-grow: 1;
    min-height: 50vh;
    /* Ensure grids take up substantial space */
}

/* Adjust card heights to fill grid */
.card,
.syndicate-member,
.team-member {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.section-header p {
    font-size: 0.875rem;
    max-width: 400px;
    opacity: 0.7;
}

.header-separator {
    opacity: 0.3;
    font-weight: 300;
    margin: 0 1rem;
}

.header-subtitle {
    font-size: 0.875rem;
    font-weight: 300;
    opacity: 0.7;
    font-family: var(--font-main);
}

/* Philosophy Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-light);
    border: 1px solid var(--border-light);
    padding: 0;
}

.card {
    padding: 2rem 1.5rem;
    background: var(--bg);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 300px;
}

/* Editorial Background Numbers */
.card::before {
    content: attr(data-index);
    position: absolute;
    bottom: -2rem;
    right: -1rem;
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 800;
    color: var(--border);
    opacity: 0.1;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    line-height: 1;
    z-index: 0;
}

.card:hover {
    background: var(--bg-alt);
    color: var(--text-inverse);
}

.card:hover::before {
    opacity: 0.15;
    transform: translateY(-2rem);
    color: var(--text-inverse);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.card p {
    font-size: 0.875rem;
    opacity: 0.7;
    position: relative;
    z-index: 1;
    max-width: 80%;
}

/* Portfolio */
.dark-bg {
    background: var(--bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border-light);
    border: 1px solid var(--border-light);
    padding: 0;
}

.portfolio-item {
    background: var(--bg);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.portfolio-item:hover {
    background: var(--bg-alt);
    color: var(--text-inverse);
}

.portfolio-image {
    width: 100%;
    height: 200px;
    background: var(--bg);
    position: relative;
    border-bottom: 1px solid var(--border-light);
    overflow: hidden;
}

.portfolio-image canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.portfolio-image::after {
    display: none;
}

.portfolio-info {
    padding: 2rem;
}

.portfolio-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.portfolio-info p {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Team */
#team {
    background: var(--bg);
    color: var(--text);
}

#team .section-header h2 {
    color: var(--text);
}

#team .header-subtitle {
    color: var(--text);
    opacity: 0.6;
}

/* Team section uses 6 columns */
#team .syndicate-grid {
    grid-template-columns: repeat(6, 1fr);
}

/* Ensure all team member images are the same size */
#team .syndicate-member img {
    width: 100%;
    height: 100%;
}

/* Ensure consistent text alignment in team cards */
#team .member-info {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

#team .member-info h3 {
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#team .member-info .status-text {
    min-height: 2.5rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
    font-size: 0.5rem;
}

/* Syndicate Section */
.syndicate-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border-light);
    border: 1px solid var(--border-light);
    padding: 0;
}

.syndicate-member {
    text-align: center;
    padding: 3rem 3rem;
    background: var(--bg);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    position: relative;
    overflow: hidden;
    border: none;
}

.syndicate-member:last-child {
    border-right: none;
}

.syndicate-member:first-child .member-photo,
.syndicate-member:first-child:hover .member-photo {
    background: transparent;
    border: none;
}

.syndicate-member .member-photo {
    width: auto;
    height: 120px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.syndicate-member:hover .member-photo {
    transform: scale(1.05);
    background: transparent;
}

.syndicate-member img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

/* Adjust specific logo sizes for visual balance */
.syndicate-member:nth-child(1) img,
.syndicate-member:nth-child(2) img {
    width: 80%;
    height: 80%;
}

.syndicate-member h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.status-text {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.5;
    color: var(--text);
    font-weight: 400;
    position: relative;
    z-index: 1;
}

.status-text.join {
    opacity: 1;
    font-weight: 600;
    text-decoration: underline;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.25rem;
    margin-top: 1rem;
    justify-content: center;
    align-items: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    transition: all 0.3s ease;
    opacity: 1;
}

.social-links a:hover {
    background: var(--bg-alt);
    opacity: 1;
}

.social-links a svg {
    stroke: var(--text);
    transition: stroke 0.3s ease;
}

.social-links a:hover svg {
    stroke: var(--text-inverse);
}

/* Contact */
.contact-section {
    background: var(--bg-alt);
    color: var(--text-inverse);
    padding: 0;
    border-bottom: none;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-margin-top: 50px;
}

.contact-wrapper {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.contact-wrapper h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-wrapper p {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: 2rem;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--text-inverse);
    border: 1px solid var(--text-inverse);
}

.contact-form input,
.contact-form textarea {
    background: var(--bg-alt);
    border: 1px solid transparent;
    padding: 1rem;
    color: var(--text-inverse);
    font-family: var(--font-main);
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--border-light);
    background: var(--bg-alt);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-inverse);
    opacity: 0.5;
}

.contact-form textarea {
    grid-column: span 2;
    resize: vertical;
    min-height: 100px;
}

.contact-form button {
    grid-column: span 2;
    background: var(--text-inverse);
    color: var(--bg-alt);
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    border: none;
}

.contact-form button:hover {
    opacity: 0.8;
}

/* Footer */
footer {
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 0;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-section {
    background: var(--bg);
    padding: 5rem 2rem 5rem 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.footer-brand {
    padding: 5rem 3rem 5rem 0;
}

.footer-logo-wrapper {
    position: relative;
    width: 100%;
    max-width: 240px;
}

.footer-logo-img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

/* Theme-based logo switching */
.light-theme-logo {
    opacity: 1;
}

.dark-theme-logo {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

[data-theme="dark"] .light-theme-logo {
    opacity: 0;
}

[data-theme="dark"] .dark-theme-logo {
    opacity: 1;
}

.footer-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-label {
    font-family: var(--font-main);
    font-size: 0.6rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.4;
    margin-bottom: 1rem;
}

.footer-nav-group a {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    transition: opacity 0.2s ease;
    line-height: 2;
    opacity: 0.8;
}

.footer-nav-group a:hover {
    opacity: 1;
}

.footer-big-text {
    font-family: var(--font-main);
    font-size: 13.5vw;
    font-weight: 600;
    text-align: center;
    line-height: 0.8;
    letter-spacing: -0.06em;
    color: var(--text);
    opacity: 0.2;
    padding: 2rem 0 0;
    margin-top: 2rem;
    border-top: 1px solid var(--border-light);
    width: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
}

.footer-bottom {
    background: var(--bg);
    padding: 1rem 0 2rem;
    border-top: none;
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-tagline {
    font-size: 0.65rem;
    font-weight: 300;
    opacity: 0.5;
    letter-spacing: -0.01em;
}

.copyright {
    font-size: 0.55rem;
    font-weight: 300;
    opacity: 0.3;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 1.5rem;
    border-left: 1px solid var(--border);
}

.mobile-menu-btn span {
    width: 18px;
    height: 1px;
    background: var(--text);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in-up.delay-1 {
    animation-delay: 0.15s;
}

.fade-in-up.delay-2 {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

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

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

@media (max-width: 768px) {
    .navbar {
        height: 50px;
    }

    .logo {
        font-size: 0.75rem;
        padding: 0 1rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 50px;
        left: 0;
        width: 100%;
        height: calc(100vh - 50px);
        background: var(--bg);
        flex-direction: column;
        padding: 0;
        border-bottom: 1px solid var(--border);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 1.25rem 1.5rem;
        border-left: none;
        border-bottom: 1px solid var(--border-light);
        font-size: 0.75rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        border: none;
        border-bottom: 1px solid var(--border);
    }

    .primary-btn {
        border-right: none;
    }

    .section {
        padding: 3rem 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .card {
        padding: 1.5rem 1rem;
    }

    .portfolio-info {
        padding: 1rem;
    }

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

    /* Reset team section to 1 column on mobile */
    #team .syndicate-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper h2 {
        font-size: 1.5rem;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .contact-form textarea {
        grid-column: span 1;
    }

    .contact-form button {
        grid-column: span 1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 1.5rem;
    }

    .footer-brand {
        grid-column: 1;
        padding: 2rem 0 1.5rem;
        border-bottom: 1px solid var(--border-light);
        align-items: center;
    }

    .footer-logo-wrapper {
        max-width: 180px;
        margin: 0 auto;
    }

    /* Override grid to show nav sections in 3 columns */
    .footer-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: auto auto;
        gap: 0 0.5rem;
        padding: 0 1.5rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .footer-nav {
        grid-column: 1;
        grid-row: 2;
        padding: 1.5rem 0;
        border-bottom: none;
    }

    .footer-connect {
        grid-column: 2;
        grid-row: 2;
        padding: 1.5rem 0;
        border-bottom: none;
    }

    .footer-contact {
        grid-column: 3;
        grid-row: 2;
        padding: 1.5rem 0;
        border-bottom: none;
    }

    .footer-section {
        padding: 1.5rem 0;
        border-bottom: none;
    }

    .footer-nav-group {
        gap: 0.5rem;
    }

    .footer-label {
        font-size: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .footer-nav-group a {
        font-size: 0.65rem;
        line-height: 1.8;
    }

    .footer-big-text {
        padding: 1rem 0 0;
        margin-top: 1rem;
        font-size: 15vw;
    }

    .footer-bottom {
        padding: 1rem 0 2rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 0 1.5rem;
    }

    .footer-tagline {
        font-size: 0.65rem;
    }
}