/* ===== GLOBAL ===== */

html, body {
    margin: 0;
    padding: 0;
    font-family: "Times New Roman", Times, serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    background: #000;
    color: #fff;
}

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

a:hover {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

/* ===== HOME ===== */

body.home-page {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.home-hero-link {
    display: block;
}

.home-hero-img {
    width: 480px;
    max-width: 80vw;
    display: block;
}

/* ===== GLITCH IN ===== */

.glitch-in {
    opacity: 0;
    animation: glitchFade 1.8s ease-out forwards;
}

@keyframes glitchFade {
    0% {
        opacity: 0;
        filter: brightness(1.4) contrast(1.3);
        transform: translateY(1px);
    }
    10% {
        opacity: 0.4;
        filter: brightness(1.2) contrast(1.15);
        transform: translateY(-1px);
    }
    18% {
        opacity: 0.1;
        filter: brightness(1.35) contrast(1.25);
        transform: translateX(1px);
    }
    28% {
        opacity: 0.7;
        filter: brightness(1.1) contrast(1.1);
        transform: translateX(-1px);
    }
    38% {
        opacity: 0.3;
        filter: brightness(1.25) contrast(1.2);
    }
    48% { opacity: 0.9; }
    60% { opacity: 0.6; }
    80% { opacity: 1; }
    100% {
        opacity: 1;
        filter: none;
        transform: none;
    }
}

/* ===== MENU ===== */

body.menu-page {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.menu-nav {
    display: flex;
    gap: 80px;
    font-size: 14px;
    text-transform: lowercase;
}

/* ===== HEADERS ===== */

body.white-page {
    background: #fff;
    color: #000;
}

.header-white,
.header-black {
    --header-height: 120px;
    --header-padding: 0 80px;

    height: var(--header-height);
    padding: var(--header-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.header-white { background: #fff; }
.header-black { background: #000; }

.header-logo {
    width: 240px;
    max-height: 110px;
    object-fit: contain;
}

.header-nav {
    display: flex;
    gap: 60px;
    font-size: 14px;
    text-transform: lowercase;
}

body.projects-page .header-black,
body.info-page .header-black {
    --header-padding: 28px 80px 20px;
}

/* ===== PROJECTS / INFO WRAPPER ===== */

.projects-main,
.info-main {
    margin: 60px auto 140px;
    padding: 0 20px;
}

/* ===== PROJECTS TYPO ===== */

#oc-site {
    max-width: 1000px;
    margin: 120px auto 0;
    font-size: 15px;
    letter-spacing: -0.01em;
    line-height: 1.45;
    text-transform: lowercase;
    color: #f2f2f2;
}

.section-label {
    margin: 32px 0 12px;
    font-size: 15px;
}

/* accordion */

#oc-site details {
    padding: 8px 0;
}

#oc-site summary {
    list-style: none;
    display: grid;
    grid-template-columns: 70px 1fr 16px;
    gap: 32px;
    cursor: pointer;
    align-items: center;
}

#oc-site summary::-webkit-details-marker {
    display: none;
}

#oc-site .arrow svg {
    width: 10px;
    height: 10px;
    transition: transform .25s ease;
}

#oc-site details[open] .arrow svg {
    transform: rotate(90deg);
}

#oc-site .content {
    margin: 14px 0 36px;
    padding-left: calc(70px + 32px);
}

#oc-site .title {
    display: inline-block;
    font-size: 15px;
    border-bottom: 1px solid currentColor;
    margin-bottom: 6px;
}

#oc-site .credits,
#oc-site .description {
    font-size: 13px;
    margin-bottom: 10px;
    white-space: pre-line;
}

/* ===== PROJECT MEDIA — FIXED ===== */

#oc-site .media img,
#oc-site .media video {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    margin: 24px 0;
    object-fit: contain;
}

/* two-up grids */

#oc-site .media.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 24px;
}

#oc-site .media.grid-2 img {
    max-height: 60vh;
}

/* ===== SHOP ===== */

body.shop-page {
    background: #fff;
    color: #000;
}

.shop-main {
    max-width: 1100px;
    margin: 80px auto 160px;
    padding: 0 80px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 120px 80px;
}

.shop-product-image {
    max-width: 430px;
    width: 100%;
}

/* ===== PRODUCT ===== */

body.product-page {
    background: #fff;
    color: #000;
}

.product-main {
    max-width: 900px;
    margin: 80px auto 160px;
    padding: 0 80px;
}

.product-info {
    max-width: 520px;
    margin: 0 auto;
    font-size: 13px;
    text-transform: lowercase;
}

/* ===== CART ===== */

body.cart-page {
    background: #fff;
    color: #000;
}

.cart-main {
    max-width: 900px;
    margin: 80px auto 160px;
    padding: 0 80px;
    font-size: 13px;
    text-transform: lowercase;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    z-index: 9999;
}

.cart-overlay.active {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

.cart-panel {
    background: #000;
    color: #fff;
    width: 40%;
    min-width: 420px;
    padding: 36px 48px;
    overflow-y: auto;
    box-sizing: border-box;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 48px;
}

.cart-header img {
    height: 42px;
}

.cart-close {
    font-size: 13px;
    cursor: pointer;
    text-transform: lowercase;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 48px;
    margin-bottom: 96px;
    align-items: start;
}

.cart-item-text {
    font-size: 13px;
    text-transform: lowercase;
}

.cart-item-text .title {
    text-transform: uppercase;
    margin-bottom: 4px;
}

.cart-item-text .price {
    margin-bottom: 18px;
}

.cart-item-text .meta {
    display: grid;
    grid-template-columns: 1fr auto;
    row-gap: 6px;
    margin-bottom: 18px;
}

.cart-item-text .meta span:last-child {
    text-align: right;
}

.cart-item-text .remove {
    text-decoration: underline;
    cursor: pointer;
}

.cart-item-image img {
    width: 100%;
    display: block;
}

.cart-summary {
    font-size: 13px;
    text-transform: uppercase;
    margin-top: 120px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cart-checkout {
    margin-top: 32px;
}

.cart-checkout button {
    width: 100%;
    padding: 14px 0;
    border: none;
    background: #fff;
    color: #000;
    font-family: inherit;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
}

/* ===== FORMS ===== */

button,
select,
input {
    font-family: inherit;
    font-weight: 300;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
    .header-white,
    .header-black {
        padding: 24px 20px;
        height: auto;
    }

    .projects-main,
    .info-main,
    .shop-main,
    .product-main,
    .cart-main {
        padding: 0 20px;
        margin: 40px auto 100px;
    }

    .shop-grid {
        grid-template-columns: 1fr;
        gap: 80px;
    }
}

@media (max-width: 640px) {
    .home-hero-img {
        max-width: 94vw;
    }

    .menu-nav {
        width: 100%;
        justify-content: space-around;
        gap: 0;
        font-size: 16px;
    }

    .header-white,
    .header-black {
        padding: 14px 16px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .header-logo {
        width: 120px;
    }

    .header-nav {
        width: auto;
        gap: 16px;
        font-size: 11px;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    .projects-main,
    .info-main,
    .shop-main,
    .product-main,
    .cart-main {
        margin-top: 28px;
    }
    #oc-site {
        font-size: 13px;
    }

    #oc-site summary {
        grid-template-columns: 52px 1fr 12px;
        gap: 16px;
    }

    #oc-site .content {
        padding-left: calc(52px + 16px);
    }

    #oc-site .media.grid-2 {
        grid-template-columns: 1fr;
    }
}
