/* Category listing page. Requires tokens.css to be linked first. */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top, #1A1D22 0%, #08090B 48%),
        var(--bg);
    color: white;
    font-family: var(--font-body);
}

.container {
    max-width: 1180px;
    margin: auto;
    padding: 40px 28px 72px;
}

body.has-site-header .container {
    padding-top: 28px;
}

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

h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(48px, 6.4vw, 82px);
    letter-spacing: -.5px;
    line-height: 1.08;
    margin: 32px 0 12px;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 38px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #1A1C20, #111316);
    border: 1px solid var(--border);
    box-shadow:
        var(--shadow-2),
        inset 0 1px 0 rgba(255, 255, 255, .04);
    transition:
        transform var(--motion-base) var(--ease-out),
        border-color var(--motion-base) var(--ease-out),
        box-shadow var(--motion-base) var(--ease-out);
}

.card:hover {
    transform: translateY(-8px);
    border-color: var(--gold-border);
    box-shadow:
        var(--shadow-3),
        inset 0 0 0 1px rgba(184, 148, 106, .16),
        inset 0 1px 0 rgba(255, 255, 255, .06);
}

.card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card.catalog-card .card-image {
    height: auto;
    aspect-ratio: 3 / 4;
}

.card-image:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.08));
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease-out);
}

.card:hover img {
    transform: scale(1.06);
}

.card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 24px;
}

/* Pin CTA row to card bottom */
.card-content > .card-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.card-actions .btn {
    margin-top: 0;
}

.location {
    color: #8D929A;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 10px;
}

h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 25px;
    line-height: 1.1;
    letter-spacing: 0;
    margin: 0 0 12px;
}

.price {
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
}

p {
    color: var(--muted);
    line-height: 1.7;
}

.card-image.media-shell img {
    opacity: 0;
}

.card-image.media-shell.is-loaded img {
    opacity: 1;
}

.type-badge {
    display: inline-block;
    /* Card content is a flex column: keep the pill hugging its text */
    align-self: flex-start;
    width: fit-content;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    background: rgba(184, 148, 106, .12);
    border: 1px solid rgba(184, 148, 106, .28);
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.empty-state .btn {
    margin-top: 0;
}

.empty-state-actions {
    gap: 12px;
    margin-top: 20px;
}

#categoryCatalog,
#categoryTeam,
#categoryChatSection {
    scroll-margin-top: 96px;
}

.category-catalog-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 8px 0 28px;
}

.category-catalog-head h1 {
    margin: 0 0 8px;
    font-size: clamp(36px, 5vw, 58px);
}

.category-catalog-head .subtitle {
    margin: 0;
}

[data-category-page] .container {
    padding-top: var(--space-6);
}

[data-category-page] .category-catalog-head {
    align-items: flex-end;
    gap: var(--space-5);
    margin: 0 0 var(--space-7);
}

[data-category-page] .category-catalog-head h1 {
    margin: 0 0 var(--space-3);
    font-size: clamp(36px, 4.5vw, 52px);
    text-wrap: balance;
}

[data-category-page] .category-carousel-section .section-header h2 {
    font-size: clamp(24px, 3vw, 32px);
}

@media (min-width: 801px) {
    [data-category-page] .container {
        padding-top: var(--space-7);
    }
}

/* ---------------------------------------------------------------------
 * Category story: one still image + three copy columns by default
 * (no-js, reduced motion, no video). JS adds .is-loop-film for a muted
 * looping overlay with one beat of copy at a time.
 * ------------------------------------------------------------------- */
.category-story {
    --story-header-offset: 82px;
    position: relative;
    background: #050608;
}

.category-story__stage {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-height: min(72dvh, 640px);
    overflow: hidden;
}

.category-story__video {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.category-story__media {
    margin: 0;
    position: absolute;
    inset: 0;
    z-index: 0;
}

.category-story__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(.88) contrast(1.05);
}

.category-story__shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse 70% 55% at 50% 50%, rgba(5, 6, 8, .28) 0%, rgba(5, 6, 8, .72) 100%),
        linear-gradient(180deg, rgba(5, 6, 8, .35) 0%, rgba(5, 6, 8, .2) 40%, rgba(5, 6, 8, .35) 100%);
    pointer-events: none;
}

.category-story__beat {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-story__copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: none;
    padding: var(--space-7) var(--space-5) var(--space-6);
    text-align: center;
}

.category-story__kicker {
    margin: 0 0 var(--space-3);
    color: var(--gold-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.4px;
    text-transform: uppercase;
}

.category-story__title {
    margin: 0 0 var(--space-3);
    max-width: 12ch;
    font-family: var(--font-display);
    font-size: clamp(22px, 2.8vw, 40px);
    font-weight: 500;
    letter-spacing: -.4px;
    line-height: 1.05;
    color: #fff;
    text-wrap: balance;
}

.category-story__copy p:last-child {
    margin: 0;
    max-width: 28em;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(13px, 1.2vw, 16px);
    line-height: 1.45;
    text-wrap: pretty;
}

.category-story__chrome {
    display: flex;
    justify-content: flex-end;
    position: absolute;
    top: auto;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 3;
    padding: 0;
}

.category-story__skip {
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    border: 0;
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    background: none;
}

.category-story__skip:hover,
.category-story__skip:focus-visible {
    color: var(--gold-light);
}

.category-story__dots {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-story__dots li {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .28);
    transition: background .3s ease, transform .3s ease;
}

.category-story__dots li.is-active {
    background: var(--gold-light);
    transform: scale(1.35);
}

/* Film overlay: hide still, show video, one beat of copy at a time. */
.category-story.is-loop-film .category-story__stage {
    display: block;
    height: min(70dvh, 560px);
    min-height: 0;
    overflow: hidden;
}

.category-story.is-loop-film .category-story__video {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-story.is-loop-film .category-story__media {
    display: none;
}

.category-story.is-loop-film .category-story__beat {
    position: absolute;
    inset: 0;
    min-height: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.category-story.is-loop-film .category-story__beat.is-active {
    z-index: 2;
    pointer-events: auto;
}

.category-story.is-loop-film .category-story__beat:not(.is-active) {
    opacity: 0;
    visibility: hidden;
}

.category-story.is-loop-film .category-story__copy {
    min-height: 100%;
    padding: 40px 20px 48px;
}

.category-story.is-loop-film .category-story__title {
    max-width: 16ch;
    font-size: clamp(42px, 7.2vw, 84px);
    margin: 0 0 20px;
    letter-spacing: -.6px;
    line-height: 1.08;
}

.category-story.is-loop-film .category-story__copy p:last-child {
    max-width: 34em;
    font-size: clamp(16px, 1.7vw, 20px);
    line-height: 1.5;
}

.category-story.is-loop-film .category-story__kicker {
    margin: 0 0 18px;
    font-size: 11px;
    letter-spacing: 0.16em;
}

.category-story.is-loop-film .category-story__dots {
    display: flex;
    position: absolute;
    top: 50%;
    right: 16px;
    z-index: 2;
    transform: translateY(-50%);
}

.category-story.is-loop-film .category-story__chrome {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    top: auto;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 2;
    padding: 0;
}

@media (min-width: 801px) {
    .category-story.is-loop-film .category-story__stage {
        height: calc(100dvh - var(--story-header-offset));
    }

    .category-story.is-loop-film .category-story__copy {
        padding: 72px 48px;
    }
}

@media (max-width: 1000px) {
    .category-story {
        --story-header-offset: 72px;
    }
}

@media (max-width: 800px) {
    .category-story__stage {
        min-height: min(64dvh, 520px);
    }

    .category-story__copy {
        padding: 56px 10px 48px;
    }

    .category-story__kicker {
        margin: 0 0 8px;
        font-size: 9px;
        letter-spacing: 1.6px;
    }

    .category-story__title {
        max-width: 10ch;
        font-size: clamp(16px, 4.2vw, 24px);
        margin: 0 0 8px;
    }

    .category-story__copy p:last-child {
        font-size: clamp(11px, 2.8vw, 13px);
        line-height: 1.4;
    }

    .category-story.is-loop-film .category-story__copy {
        padding: 40px 20px 48px;
    }

    .category-story.is-loop-film .category-story__title {
        max-width: 12ch;
        font-size: clamp(36px, 11vw, 56px);
        margin: 0 0 20px;
    }

    .category-story.is-loop-film .category-story__copy p:last-child {
        font-size: clamp(16px, 1.7vw, 20px);
        line-height: 1.5;
    }
}

@media (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr;
    }

    html:has([data-category-page]) {
        scroll-padding-top: 72px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:has([data-category-page]) {
        scroll-snap-type: none;
        scroll-padding-top: 0;
    }
}
