/* CSS Variables */
@font-face {
    font-family: 'Belgiano';
    src: url('assets/fonts/Belgiano Serif 2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --highlight-color: #9eff66;
    --pixel-font: 'Pixelify Sans', monospace;
    --serif-font: 'Belgiano', 'Playfair Display', serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.header {
    padding: 1.5rem 2rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    color: black;
}

.logo {
    width: 170px;
    height: auto;
    image-rendering: pixelated;
}

.main-content {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 2rem 0rem 2rem 4rem;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
    gap: 2rem;
    overflow: hidden;
}

/* Text Styling */
.text-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 600px;
    padding-bottom: 4rem;
}

.headline {
    display: flex;
    flex-direction: column;
    line-height: 0.85;
}

.line {
    display: block;
    margin-bottom: -8px;
}

.pixel-font {
    font-family: var(--pixel-font);
    text-transform: lowercase;
    font-size: 7.5rem;
    font-weight: 400;
    letter-spacing: -3px;
    line-height: 0.85;
}

.serif-font {
    font-family: var(--serif-font);
    font-size: 4rem;
    font-style: normal;
    font-weight: 400;
    margin-top: 0.5rem;
    letter-spacing: -2px;
    line-height: 1;
}

.highlight {
    color: var(--highlight-color);
    font-style: normal;
}

/* Image Styling */
.image-section {
    flex: 1.5;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    overflow: visible;
    padding-bottom: 2rem;
    position: relative;
}

.monitor-image {
    width: 900px;
    height: auto;
    object-fit: contain;
    position: absolute;
    right: -250px;
    bottom: 2rem;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .header {
        padding: 1.25rem 1.5rem;
    }

    .logo {
        width: 120px;
    }

    .main-content {
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 0;
        padding-top: 90px;
        min-height: 100vh;
        gap: 2rem;
    }

    .image-section {
        order: 1;
        width: 100%;
        justify-content: flex-end;
        padding: 0;
        margin-bottom: 1rem;
        position: relative;
        overflow: visible;
    }

    .monitor-image {
        width: 480px;
        height: auto;
        object-fit: contain;
        position: absolute;
        right: -130px;
        top: 0;
    }

    .text-section {
        order: 2;
        width: 100%;
        padding: 0 1.5rem 2.7rem;
        max-width: none;
    }

    .headline {
        line-height: 0.9;
    }

    .line {
        margin-bottom: -4px;
    }

    .pixel-font {
        font-size: 5rem;
        letter-spacing: -2px;
        line-height: 0.9;
        font-weight: 400;
    }

    .serif-font {
        font-size: 3.25rem;
        margin-top: 0.25rem;
        letter-spacing: -1px;
    }
}

/* Text Animation */
.roll-container {
    display: inline-grid;
    grid-template-areas: "stack";
    overflow: hidden;
    vertical-align: bottom;
    height: 1.15em;
    transform: translateY(10px);
    margin-left: 10px;
}

.roll-word {
    grid-area: stack;
    white-space: nowrap;
}

.roll-out {
    animation: rollOut 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.roll-in {
    animation: rollIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rollOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes rollIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

/* Gallery Styles */
.gallery-section {
    padding: 12rem 2rem 6rem 4rem;
    /* Added top padding */
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.gallery-container {
    display: flex;
    /* Or grid */
    gap: 1.5rem;
    width: 100%;
}

.gallery-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.col-right {
    margin-top: 3vw;
    /* Further reduced to target 25% box offset */
}

.green-box {
    width: 100%;
    aspect-ratio: 0.75;
    background-color: #90FF66;
    object-fit: cover;
    display: block;
}

.gallery-text {
    font-size: 8rem;
    /* Increased from 3.5rem */
    line-height: 1;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.text-right {
    text-align: right;
    margin-bottom: -0.5rem;
}

/* Contact Styles */
.contact-section {
    width: 100%;
}

.contact-top {
    padding: 8rem 2rem 8rem;
    display: flex;
    justify-content: center;
    background-color: var(--bg-color);
}

.contact-branding {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-logo {
    width: 220px;
    image-rendering: pixelated;
}

.studio-text {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    /* Optical adjustment */
}

.services-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align text left */
    width: 100%;
    max-width: 350px;
    /* Align with logo visual width */
}

.services-list p {
    font-size: 2.5rem;
    margin: 0;
    line-height: 1.1;
}

.contact-footer {
    background-color: #90FF66;
    padding: 6rem 4rem;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-cta {
    text-align: right;
}

.cta-text {
    font-size: 6rem;
    line-height: 0.9;
    text-transform: lowercase;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
}

.contact-item .label {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.contact-item .value {
    font-size: 3.5rem;
    text-decoration: none;
    color: black;
    line-height: 1;
}

/* Interaction Styles (Mobile Scroll + Desktop Hover) */
.box-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.green-box-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background-color: rgba(144, 255, 102, 0.75);
    transition: height 0.5s ease-out 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
    overflow: hidden;
}

.box-wrapper.active .green-box-overlay,
.box-wrapper:hover .green-box-overlay {
    height: 100%;
    transition: height 0.5s ease-out 0s;
}

.overlay-text {
    font-family: 'Pixelify Sans', sans-serif;
    color: black;
    font-size: 2rem;
    opacity: 0;
    transition: opacity 0.2s ease 0s;
}

.box-wrapper.active .overlay-text,
.box-wrapper:hover .overlay-text {
    opacity: 1;
    transition: opacity 0.3s ease 0.5s;
}

@media (max-width: 900px) {
    .gallery-section {
        padding: 8rem 1.5rem 4rem;
    }

    .gallery-container {
        gap: 0.75rem;
    }

    .gallery-col {
        gap: 0.75rem;
    }

    .col-right {
        margin-top: 2vw;
    }

    .gallery-text {
        font-size: 2.5rem;
    }

    /* Contact Mobile */
    .contact-top {
        padding: 10rem 1.5rem;
        /* More white space */
    }

    .logo-wrapper {
        margin-bottom: 0.25rem;
        /* Closer to services */
    }

    .contact-logo {
        width: 140px;
    }

    .studio-text {
        font-size: 2rem;
    }

    .services-list p {
        font-size: 2rem;
    }

    .contact-footer {
        padding: 4rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
        align-items: stretch;
        /* Allow children to fill width */
    }

    .footer-cta {
        order: 1;
        text-align: right;
        /* Right aligned */
    }

    .cta-text {
        font-size: 5rem;
        /* Increased size */
    }

    .contact-details {
        order: 2;
        width: 100%;
    }

    .contact-item .value {
        font-size: 3.2rem;
        /* Way bigger */
        word-break: break-word;
        /* Ensure it wraps if needed */
    }

}

.nav-menu {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    font-family: 'Pixelify Sans', sans-serif;
    font-size: 2rem;
    color: black;
    cursor: pointer;
    z-index: 10000;
    user-select: none;
    text-align: right;
    mix-blend-mode: difference;
    /* Optional: ensures visibility against any background */
    color: white;
    /* With difference, white becomes black on white bg */
}

/* Ensure links are interactive */
.nav-link {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.nav-link:hover {
    text-decoration: underline;
}

.nav-close {
    cursor: pointer;
    margin-left: 0.5rem;
}

@media (max-width: 900px) {
    .nav-menu {
        font-size: 1.5rem;
        /* Smaller on mobile to fit */
        top: 1.5rem;
        right: 1.5rem;
    }
}