/* =========================================================
   TCG — ARCHIVE (PHOTOS / VIDEOS)
   Styles for templates/archive-index.php and archive-entry.php.
   Same family as the Basement and Stories pages: concrete wall,
   a paper sheet sliding over it, condensed titles.
========================================================= */

/* the theme makes html and body scroll containers, which stops the wall
   from staying in place while the sheet moves over it */
html body.tcg-arc-page {
    overflow-x: clip !important;
    overflow-y: visible !important;
}

html body.tcg-arc-page--listing {
    background: #0d0d0d;
}

html body.tcg-arc-page--entry {
    background: #f1eee8;
}

.tcg-arc,
.tcg-arc-lightbox {
    --tcg-ink: #111111;
    --tcg-paper: #f1eee8;
    --tcg-tile: #d8d3ca;
    --tcg-line: rgba(17, 17, 17, .16);
    --tcg-muted: #6f6d66;
    --tcg-gutter: clamp(18px, 4vw, 50px);

    color: var(--tcg-ink);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.tcg-arc {
    position: relative;
    z-index: 1;
}

.tcg-arc *,
.tcg-arc *::before,
.tcg-arc *::after,
.tcg-arc-lightbox *,
.tcg-arc-lightbox *::before,
.tcg-arc-lightbox *::after {
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   HERO — the wall
--------------------------------------------------------- */

.tcg-arc-hero {
    position: sticky;
    top: 0;
    z-index: 0;
    height: 74vh;
    min-height: 460px;
    overflow: hidden;
    background: #3b3a38;
}

.tcg-arc .tcg-arc-hero__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    filter: grayscale(.25) contrast(.9) brightness(.72);
}

.tcg-arc-hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .46) 0%, rgba(0, 0, 0, .18) 45%, rgba(0, 0, 0, .04) 100%);
}

.tcg-arc-hero__content {
    position: absolute;
    right: var(--tcg-gutter);
    bottom: 86px;
    left: calc(var(--tcg-gutter) + 14px);
    max-width: 760px;
    color: #ffffff;
}

.tcg-arc-hero__content span {
    display: block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.tcg-arc .tcg-arc-hero__content h1 {
    margin: 12px 0 0;
    padding: 0;
    color: #ffffff;
    font-family: "Michroma", "Arial Narrow", sans-serif;
    font-size: clamp(34px, 3.9vw, 60px);
    font-weight: 400;
    line-height: .95;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.tcg-arc .tcg-arc-hero__content h1::after {
    content: "";
    display: block;
    width: 44px;
    height: 2px;
    margin-top: 20px;
    background: #ffffff;
}

.tcg-arc .tcg-arc-hero__content p {
    margin: 16px 0 0;
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: .04em;
    text-transform: uppercase;
}


/* ---------------------------------------------------------
   PANEL — the sheet over the wall
--------------------------------------------------------- */

.tcg-arc-panel {
    position: relative;
    z-index: 2;
    min-height: 60vh;
    margin: -22px 14px 0;
    padding: 34px var(--tcg-gutter) 90px;
    border-radius: 22px 22px 0 0;
    background: var(--tcg-paper);
}

.tcg-arc-tabs {
    display: flex;
    gap: 0 30px;
    margin: 0 0 44px;
    border-bottom: 1px solid var(--tcg-line);
}

.tcg-arc .tcg-arc-tab {
    position: relative;
    padding: 14px 0 17px;
    color: var(--tcg-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color .18s ease;
}

.tcg-arc .tcg-arc-tab:hover,
.tcg-arc .tcg-arc-tab.is-current {
    color: var(--tcg-ink);
}

.tcg-arc-tab.is-current::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--tcg-ink);
}

.tcg-arc-tab sup {
    position: relative;
    top: -.5em;
    margin-left: 5px;
    font-size: 8.5px;
    letter-spacing: .06em;
    vertical-align: baseline;
}

.tcg-arc-section + .tcg-arc-section {
    margin-top: 84px;
}

.tcg-arc-section__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 22px;
}

.tcg-arc .tcg-arc-section__head h2 {
    margin: 0;
    padding: 0;
    color: var(--tcg-ink);
    font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(28px, 2.7vw, 40px);
    font-weight: 700;
    line-height: .92;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.tcg-arc .tcg-arc-section__head a,
.tcg-arc .tcg-arc-back {
    color: var(--tcg-ink);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .18s ease;
}

.tcg-arc .tcg-arc-section__head a:hover,
.tcg-arc .tcg-arc-back:hover {
    color: var(--tcg-ink);
    opacity: .58;
}

.tcg-arc .tcg-arc-empty {
    margin: 0;
    padding: 40px 0 60px;
    font-size: 15px;
}

.tcg-arc-end {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 84px;
    padding-top: 18px;
    border-top: 1px solid var(--tcg-line);
    font-family: "Manrope", "Helvetica Neue", Arial, sans-serif;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.7;
    letter-spacing: .07em;
    text-transform: uppercase;
}


/* ---------------------------------------------------------
   GRID AND CARD
--------------------------------------------------------- */

.tcg-arc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px 14px;
}

.tcg-arc-grid--videos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 14px;
}

.tcg-arc .tcg-arc-card {
    display: block;
    color: var(--tcg-ink);
    text-decoration: none;
}

.tcg-arc-card__media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 6px;
    background: var(--tcg-tile);
}

.tcg-arc-card--video .tcg-arc-card__media {
    aspect-ratio: 16 / 9;
    background: #161616;
}

.tcg-arc .tcg-arc-card__image,
.tcg-arc .tcg-arc-card__clip {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform 1s cubic-bezier(.16, .8, .24, 1), opacity .4s ease;
}

.tcg-arc-card:hover .tcg-arc-card__image {
    transform: scale(1.03);
}

/* the clip is the still (a frame of the video) when there is no cover
   image, and the moving preview while the pointer is over the card */
.tcg-arc .tcg-arc-card__clip {
    opacity: 0;
    pointer-events: none;
}

.tcg-arc .tcg-arc-card__clip.is-poster.is-ready,
.tcg-arc .tcg-arc-card.is-playing .tcg-arc-card__clip {
    opacity: 1;
}

.tcg-arc-card__play {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(241, 238, 232, .94);
    color: #111111;
    transition: transform .3s ease, opacity .3s ease;
}

.tcg-arc-card__play svg {
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

.tcg-arc-card.is-playing .tcg-arc-card__play {
    opacity: 0;
    transform: scale(.8);
}

.tcg-arc-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 13px 2px 0;
    color: var(--tcg-muted);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.tcg-arc-card__title {
    display: block;
    margin: 9px 2px 0;
    color: var(--tcg-ink);
    font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
    font-size: clamp(19px, 1.7vw, 25px);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.025em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.tcg-arc-grid--videos .tcg-arc-card__title {
    font-size: clamp(22px, 2.1vw, 32px);
}


/* ---------------------------------------------------------
   ENTRY — one album or one video
--------------------------------------------------------- */

.tcg-arc--entry {
    min-height: 80vh;
    padding: 84px clamp(12px, 1.3vw, 22px) clamp(70px, 8vw, 120px);
    background: var(--tcg-paper);
}

.tcg-arc-entry__head,
.tcg-arc-player,
.tcg-arc-gallery,
.tcg-arc-more {
    max-width: 1800px;
    margin-right: auto;
    margin-left: auto;
}

.tcg-arc-entry__head {
    padding: 34px 2px 34px;
}

.tcg-arc .tcg-arc-back {
    display: inline-block;
}

.tcg-arc .tcg-arc-entry__meta {
    display: flex;
    gap: 0 18px;
    margin: 30px 0 0;
    color: var(--tcg-muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.tcg-arc .tcg-arc-entry__title {
    max-width: 1100px;
    margin: 14px 0 0;
    padding: 0;
    color: var(--tcg-ink);
    font-family: "Arial Narrow", "Helvetica Neue Condensed", Arial, sans-serif;
    font-size: clamp(36px, 4.6vw, 74px);
    font-weight: 700;
    line-height: .88;
    letter-spacing: -.045em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.tcg-arc-entry__text {
    max-width: 640px;
    margin-top: 22px;
    color: #3a3936;
    font-size: 15px;
    line-height: 1.6;
}

.tcg-arc .tcg-arc-entry__text p {
    margin: 0 0 12px;
}

.tcg-arc-player {
    position: relative;
    aspect-ratio: var(--r, 1.7778);
    max-height: 84vh;
    overflow: hidden;
    border-radius: 8px;
    background: #0d0d0d;
}

.tcg-arc .tcg-arc-player video,
.tcg-arc .tcg-arc-player iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
    object-fit: contain;
    background: #0d0d0d;
}

.tcg-arc-player + .tcg-arc-gallery {
    margin-top: 6px;
}

/* photographs in rows of equal height, in the order they were added */
.tcg-arc-gallery {
    --tcg-row: 380px;

    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
}

.tcg-arc-gallery::after {
    content: "";
    flex-grow: 100000;
}

.tcg-arc .tcg-arc-gallery__item {
    position: relative;
    display: block;
    flex-grow: calc(var(--r) * 100);
    flex-basis: calc(var(--r) * var(--tcg-row));
    aspect-ratio: var(--r);
    overflow: hidden;
    border-radius: 4px;
    background: var(--tcg-tile);
    cursor: zoom-in;
}

.tcg-arc .tcg-arc-gallery__item img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    transition: transform 1s cubic-bezier(.16, .8, .24, 1);
}

.tcg-arc-gallery__item:hover img {
    transform: scale(1.025);
}

.tcg-arc-more {
    margin-top: clamp(70px, 8vw, 120px);
    padding: 0 2px;
}


/* ---------------------------------------------------------
   PHOTO VIEWER
--------------------------------------------------------- */

.tcg-arc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000002;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 11, 11, .97);
    color: #f1eee8;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility 0s linear .28s;
}

.tcg-arc-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.tcg-arc-lightbox__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 64px clamp(14px, 6vw, 96px);
}

.tcg-arc-lightbox .tcg-arc-lightbox__stage img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    border-radius: 2px;
    object-fit: contain;
    cursor: zoom-out;
    user-select: none;
    -webkit-user-drag: none;
}

.tcg-arc-lightbox button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #f1eee8;
    font-family: inherit;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
    transition: background .18s ease, opacity .18s ease;
}

.tcg-arc-lightbox button:hover,
.tcg-arc-lightbox button:focus-visible {
    background: rgba(241, 238, 232, .12);
    color: #f1eee8;
    outline: none;
}

.tcg-arc-lightbox .tcg-arc-lightbox__close {
    top: 10px;
    right: 12px;
    font-size: 30px;
}

.tcg-arc-lightbox .tcg-arc-lightbox__prev {
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
}

.tcg-arc-lightbox .tcg-arc-lightbox__next {
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
}

.tcg-arc-lightbox__count {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .2em;
}

.tcg-arc-lightbox.is-single .tcg-arc-lightbox__prev,
.tcg-arc-lightbox.is-single .tcg-arc-lightbox__next {
    display: none;
}

html.tcg-arc-lock,
html.tcg-arc-lock body {
    overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {

    .tcg-arc .tcg-arc-card__image,
    .tcg-arc .tcg-arc-card__clip,
    .tcg-arc .tcg-arc-gallery__item img,
    .tcg-arc-lightbox {
        transition: none;
    }
}


/* ---------------------------------------------------------
   TABLET / MOBILE
--------------------------------------------------------- */

@media (max-width: 1024px) {

    .tcg-arc-hero {
        height: 62vh;
        min-height: 400px;
    }

    .tcg-arc-hero__content {
        bottom: 64px;
        left: calc(var(--tcg-gutter) + 6px);
    }

    .tcg-arc-panel {
        margin-right: 6px;
        margin-left: 6px;
        padding-top: 24px;
        padding-bottom: 64px;
        border-radius: 18px 18px 0 0;
    }

    .tcg-arc-tabs {
        margin-bottom: 30px;
    }

    .tcg-arc-section + .tcg-arc-section {
        margin-top: 60px;
    }

    .tcg-arc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 8px;
    }

    .tcg-arc-grid--videos {
        grid-template-columns: minmax(0, 1fr);
        gap: 34px;
    }

    .tcg-arc-end {
        margin-top: 60px;
    }

    .tcg-arc--entry {
        padding-top: 76px;
    }

    .tcg-arc-entry__head {
        padding: 22px 2px 26px;
    }

    .tcg-arc .tcg-arc-entry__meta {
        margin-top: 24px;
    }

    .tcg-arc-gallery {
        --tcg-row: 190px;

        gap: 4px;
    }

    .tcg-arc-lightbox__stage {
        padding: 60px 0;
    }

    .tcg-arc-lightbox .tcg-arc-lightbox__prev,
    .tcg-arc-lightbox .tcg-arc-lightbox__next {
        top: auto;
        bottom: 6px;
        transform: none;
    }
}


/* ---------------------------------------------------------
   TOUCH — phones and tablets
   Text links keep the size they are drawn at and get an
   area a fingertip can hit (a transparent ::after reaching
   past the text); the small controls grow to 40px.
--------------------------------------------------------- */

@media (max-width: 1024px) {

    .tcg-arc .tcg-arc-section__head a {
        position: relative;
    }

    .tcg-arc .tcg-arc-section__head a::after {
        content: "";
        position: absolute;
        inset: -14px -8px;
    }

    .tcg-arc-card__meta,
    .tcg-arc-end {
        font-size: 10px;
    }
}
