:root {
    --ghost-yellow: #efc311;
    --ghost-black: #000000;
    --ghost-white: #FFFFFF;
    --ghost-white-muted: rgba(255, 255, 255, 0.5);
    --ghost-white-dim: rgba(255, 255, 255, 0.25);
    --font-serif: 'Cormorant Garamond', 'Georgia', serif;
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--ghost-black);
    color: var(--ghost-white);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Navigation (subpages) ─── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
}

.nav .nav-left {
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.nav .nav-left a {
    color: var(--ghost-white-muted);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav .nav-left a:hover { color: var(--ghost-yellow); }

.nav .nav-right {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav .nav-right a {
    color: var(--ghost-white-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
}

.nav .nav-right a:hover { color: var(--ghost-white); }

/* ─── Social Icons (fixed) ─── */
.nav-social {
    position: fixed;
    top: 1.2rem;
    left: 2rem;
    z-index: 100;
    display: flex;
    gap: 1.2rem;
    align-items: center;
}

.nav-social a {
    color: var(--ghost-white-muted);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-social a:hover { color: var(--ghost-yellow); }

.nav-social svg {
    width: 18px;
    height: 18px;
}

/* ─── About link (fixed, top-right) ─── */
.nav-about {
    position: fixed;
    top: 1.2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-about a {
    color: var(--ghost-white-muted);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: color 0.3s ease;
}

.nav-about a:hover { color: var(--ghost-yellow); }

/* ─── Portfolio Nav (screen 2) ─── */
.nav-portfolio {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 0 2rem 2rem;
}

.nav-portfolio a {
    color: var(--ghost-yellow);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: opacity 0.3s ease;
}

.nav-portfolio a:hover { opacity: 0.7; }

/* ─── Two-Screen Layout ─── */
.screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen-brand {
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.brand-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.screen-brand .clients {
    width: 100%;
}

.home-gif-cta {
    position: absolute;
    top: 5rem;
    right: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 10;
}

.home-gif-cta .cta-gif {
    width: 192px;
    height: 192px;
    border-radius: 50%;
    overflow: hidden;
}

.home-gif-cta .cta-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-gif-cta .cta-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 500;
    font-style: italic;
    color: var(--ghost-white);
    text-decoration: none;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
    transition: color 0.3s ease;
}

.home-gif-cta .cta-label:hover {
    color: var(--ghost-yellow);
}

.screen-portfolio {
    justify-content: center;
}

/* ─── Scroll Indicator ─── */
.scroll-indicator {
    padding: 0.5rem 0;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--ghost-white-dim);
    cursor: pointer;
    transition: color 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

.scroll-indicator:hover {
    color: var(--ghost-white-muted);
}

.scroll-indicator span {
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-indicator svg {
    animation: bounceDown 2s ease-in-out infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ─── Home Layout ─── */
.home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    padding: 2rem 0 0;
    transition: opacity 0.5s ease;
}

.home.hidden {
    display: none;
}

/* ─── Flowing Ghost Logo ─── */
.logo-flow {
    overflow: visible;
    padding: 0;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    z-index: 50;
    pointer-events: none;
    background: none;
    transition: opacity 0.4s ease;
}

.logo-flow, .logo-flow * {
    background: transparent !important;
}

.logo-flow-track {
    display: flex;
    gap: 8rem;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.logo-flow-track img {
    height: clamp(100px, 16vw, 180px);
    width: auto;
    flex-shrink: 0;
}

@keyframes logoScroll {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* ─── Tagline ─── */
.tagline {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ghost-white);
    text-align: center;
    padding: 0 2rem;
    opacity: 0;
    animation: fadeIn 1s ease 0.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ─── Services Nav ─── */
.services {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 2rem 2rem 0;
    opacity: 0;
    animation: fadeIn 1s ease 0.8s forwards;
}

.services a {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ghost-yellow);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.services a:hover {
    opacity: 0.7;
}

/* ─── Service Page ─── */
.service-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 7rem 2rem 5rem;
    min-height: 100vh;
}

.service-header {
    margin-left: calc(24px + 1rem);
    margin-right: calc(44px + 1rem);
    max-width: none;
}

.service-header.has-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}

.service-header-left {
    max-width: 700px;
}

.service-header-cta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    margin-top: calc(0.5rem + 20px);
    position: relative;
}

.service-header-cta .cta-gif {
    width: 192px;
    height: 192px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.service-header-cta .cta-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-header-cta .cta-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 500;
    font-style: italic;
    color: var(--ghost-white);
    text-decoration: none;
    text-align: center;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 0, 0, 0.5);
    z-index: 2;
    transition: color 0.3s ease;
    pointer-events: auto;
    white-space: nowrap;
}

.service-header-cta .cta-label:hover {
    color: var(--ghost-yellow);
}

.service-cta,
.service-back {
    margin-left: auto;
    margin-right: auto;
    max-width: 900px;
}

.service-intro {
    margin-left: calc(44px + 1rem - 1.5rem - 3px);
    max-width: 900px;
}

.service-body {
    margin-left: calc(44px + 1rem - 10px);
    margin-top: 5rem;
    margin-bottom: 5rem;
    max-width: none;
    padding-right: calc(44px + 1rem);
}

.service-header {
    margin-bottom: 3rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.service-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.service-glance {
    margin: 0.75rem 0 2.5rem;
}

.glance-lead {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ghost-white);
    margin-bottom: 0.75rem;
}

.glance-item {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 2.2vw, 1.5rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ghost-yellow);
    line-height: 1.4;
}

.service-intro {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.5;
    color: var(--ghost-white);
    border-left: 3px solid var(--ghost-yellow);
    padding-left: 1.5rem;
}

.service-body {
    margin-bottom: 5rem;
}

.service-section {
    margin-bottom: 2.5rem;
}

.service-section h2 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.03em;
    color: var(--ghost-yellow);
    margin-bottom: 1rem;
}

.service-section p {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

.service-section p strong {
    font-weight: 600;
    color: var(--ghost-white);
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.6;
    color: var(--ghost-white);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: translateX(-20px);
}

.service-list li.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-list li.no-js {
    opacity: 1;
    transform: none;
}

.service-list li:last-child {
    border-bottom: none;
}

.service-list li::before {
    content: '→ ';
    color: var(--ghost-yellow);
    margin-right: 0.5rem;
}

.service-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.service-cta .cta-gif {
    flex: 0 0 auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
}

.service-cta .cta-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-cta .cta-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.service-cta .cta-text p {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 500;
    font-style: italic;
    color: var(--ghost-white);
    margin: 0;
}

.service-cta .cta-text a {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ghost-black);
    background: var(--ghost-yellow);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.service-cta .cta-text a:hover {
    opacity: 0.85;
}

.service-back {
    text-align: center;
}

.service-back a {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ghost-white-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.service-back a:hover {
    color: var(--ghost-white);
}

/* ─── Carousel ─── */
.carousel {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem -2rem 1.5rem;
    width: calc(100% + 4rem);
}

.carousel-mid {
    flex: 1;
    min-width: 0;
}

.carousel-arrow {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: var(--ghost-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
}

.carousel-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 4px;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s var(--ease-out);
}

.carousel-track img {
    width: 100%;
    flex-shrink: 0;
    display: block;
}

.carousel-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-thumbs::-webkit-scrollbar {
    display: none;
}

.carousel-thumb {
    width: 72px;
    height: 45px;
    object-fit: cover;
    border-radius: 2px;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
}

.carousel-thumb:hover {
    opacity: 0.7;
}

.carousel-thumb.active {
    opacity: 1;
    border-color: var(--ghost-yellow);
}

@media (max-width: 768px) {
    .carousel {
        gap: 0.5rem;
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        width: calc(100% + 3rem);
    }

    .carousel-arrow {
        width: 28px;
        height: 28px;
    }

    .carousel-thumb {
        width: 52px;
        height: 33px;
    }
}

/* ─── Design Showcase (staggered videos) ─── */
.design-showcase {
    margin: 2rem 0 3rem;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 5vw;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.showcase-item {
    max-width: 55%;
}

.showcase-item.left {
    align-self: flex-start;
}

.showcase-item.right {
    align-self: flex-end;
}

.showcase-item video,
.showcase-item img {
    width: 100%;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .design-showcase {
        gap: 2rem;
        padding: 0 1.5rem;
    }

    .showcase-item {
        max-width: 85%;
    }
}

/* ─── Split Scroll ─── */
.split-scroll {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 2rem 0 3rem;
    border-bottom: none;
    outline: none;
    line-height: 0;
}

.split-row {
    display: flex;
    gap: 6px;
    will-change: transform;
    line-height: 0;
    font-size: 0;
}

.split-row img {
    height: 280px;
    width: auto;
    flex-shrink: 0;
    display: block;
}

@media (max-width: 768px) {
    .split-row img {
        height: 180px;
    }
}

/* ─── Marquee Gallery ─── */
.marquee-section {
    margin: 5rem 0;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.marquee-label {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ghost-yellow);
    margin-bottom: 1.6rem;
    text-align: center;
}

.marquee {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.marquee-row {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    width: max-content;
    will-change: transform;
}

.marquee-row.r1 { animation: mq-left 35s linear infinite; }
.marquee-row.r2 { animation: mq-right 45s linear infinite; }
.marquee-row.r3 { animation: mq-left 28s linear infinite; }

@keyframes mq-left {
    to { transform: translateX(-50%); }
}
@keyframes mq-right {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.marquee-thumb {
    flex: 0 0 auto;
    width: 200px;
    height: 130px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
    .marquee-thumb {
        width: 140px;
        height: 90px;
    }

    .marquee-label {
        padding-left: 1.5rem;
    }
}

/* ─── Category Grid ─── */
.cat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 2rem;
    margin-top: 8rem;
    transition: all 0.4s var(--ease-out);
}


.cat-card {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: all 0.5s var(--ease-out);
    aspect-ratio: 1 / 1;
}

.cat-card img,
.cat-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.5s var(--ease-out);
}

.cat-card:hover video {
    transform: scale(1.06);
}

.cat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.cat-card-title {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-serif);
    font-size: clamp(1rem, 1.8vw, 1.4rem);
    font-weight: 500;
    font-style: italic;
    color: white;
    text-align: center;
    padding: 1rem;
    pointer-events: none;
}

/* ─── Home CTA ─── */
.home-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2.5rem 3rem;
    margin: 8rem 2rem 3rem;
    max-width: 900px;
    align-self: center;
    width: calc(100% - 4rem);
    text-align: center;
}

.home-cta .cta-gif {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
}

.home-cta .cta-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-cta .cta-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.home-cta .cta-text p {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    font-weight: 500;
    font-style: italic;
    color: var(--ghost-white);
    margin: 0;
}

.home-cta .cta-text a {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ghost-black);
    background: var(--ghost-yellow);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.home-cta .cta-text a:hover {
    opacity: 0.85;
}

/* ─── Home Footer ─── */
.home-footer {
    text-align: center;
    padding: 2.5rem 2rem 3rem;
}

.home-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.home-footer-links a {
    color: var(--ghost-white-muted);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    transition: color 0.3s ease;
}

.home-footer-links a:hover {
    color: var(--ghost-white);
}

.home-footer-tagline {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 1.2rem;
}

.home-footer-copy {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
}

/* ─── Client Logos Ticker ─── */
.clients {
    padding: 1.5rem 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.clients-track {
    display: flex;
    gap: 4rem;
    align-items: center;
    animation: tickerScroll 25s linear infinite;
    width: max-content;
}

.clients-track img {
    height: 13px;
    width: auto;
    opacity: 0.35;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.clients-track img:hover { opacity: 0.7; }

.clients-track img.client-logo-square {
    height: 28px;
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── Category Page ─── */
.cat-page {
    display: none;
    min-height: 100vh;
    padding: 5rem 2.5rem 3rem;
    flex-direction: column;
}

.cat-page.open {
    display: flex;
    animation: fadeUp 0.5s var(--ease-out);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cat-page-back {
    background: none;
    border: none;
    color: var(--ghost-white-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    align-self: flex-start;
    transition: color 0.3s ease;
    margin-bottom: 1rem;
}

.cat-page-back:hover { color: var(--ghost-yellow); }

.cat-page-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    color: var(--ghost-yellow);
    margin-bottom: 2rem;
}

.cat-page-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    flex: 1;
}

.cat-page-grid .ref-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    opacity: 0;
    transform: translateY(20px);
    background: #000;
}

.cat-page-grid .ref-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.cat-page-grid .ref-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

.cat-page-grid .ref-card:hover img {
    transform: scale(1.05);
}

/* ─── Lifestyle Layout (seed: 655167) ─── */
.cat-page-grid[data-cat="lifestyle"] {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 220%;
}

.cat-page-grid[data-cat="lifestyle"] .ref-card {
    position: absolute;
    aspect-ratio: auto;
    opacity: 0;
    transform: none;
}

.cat-page-grid[data-cat="lifestyle"] .ref-card.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out);
}

.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(1) {
    left: 3.00%; top: 61.60%; width: 40.34%; height: 8.39%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(2) {
    left: 51.68%; top: 68.72%; width: 45.75%; height: 9.02%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(3) {
    left: 14.35%; top: 88.09%; width: 13.03%; height: 2.90%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(4) {
    left: 19.69%; top: 30.92%; width: 64.57%; height: 12.75%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(5) {
    left: 4.32%; top: 5.66%; width: 42.02%; height: 8.42%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(6) {
    left: 52.34%; top: 0.63%; width: 41.00%; height: 7.52%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(7) {
    left: 63.18%; top: 84.39%; width: 18.08%; height: 7.12%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(8) {
    left: 7.61%; top: 19.83%; width: 35.07%; height: 7.42%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(9) {
    left: 59.30%; top: 56.74%; width: 34.99%; height: 8.22%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(10) {
    left: 5.49%; top: 73.58%; width: 36.46%; height: 9.65%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(11) {
    left: 59.66%; top: 47.55%; width: 34.55%; height: 8.22%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(12) {
    left: 50.95%; top: 14.91%; width: 44.66%; height: 9.68%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(13) {
    left: 53.07%; top: 81.23%; width: 43.19%; height: 10.75%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(14) {
    left: 3.15%; top: 86.96%; width: 40.70%; height: 7.99%;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(15) {
    left: 3.44%; top: 47.32%; width: 46.56%; height: 9.22%;
}

.cat-page-grid[data-cat="lifestyle"] .ref-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(11) img,
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(11) video { object-fit: contain; }
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(10) img,
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(10) video { object-fit: contain; }
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(2) img,
.cat-page-grid[data-cat="lifestyle"] .ref-card:nth-child(2) video { object-fit: contain; }

/* ─── Auto Layout ─── */
.cat-page-grid[data-cat="auto"] {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 220%;
}

.cat-page-grid[data-cat="auto"] .ref-card {
    position: absolute;
    aspect-ratio: auto;
    opacity: 0;
    transform: none;
}

.cat-page-grid[data-cat="auto"] .ref-card.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out);
}

.cat-page-grid[data-cat="auto"] .ref-card:nth-child(1) {
    left: 3.00%; top: 61.60%; width: 40.34%; height: 8.39%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(2) {
    left: 51.68%; top: 68.72%; width: 45.75%; height: 9.02%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(3) {
    left: 14.35%; top: 88.09%; width: 13.03%; height: 2.90%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(4) {
    left: 19.69%; top: 30.92%; width: 64.57%; height: 12.75%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(5) {
    left: 4.32%; top: 5.66%; width: 42.02%; height: 8.42%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(6) {
    left: 52.34%; top: 0.63%; width: 41.00%; height: 7.52%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(7) {
    left: 63.18%; top: 84.39%; width: 18.08%; height: 7.12%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(8) {
    left: 7.61%; top: 19.83%; width: 35.07%; height: 7.42%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(9) {
    left: 59.30%; top: 56.74%; width: 34.99%; height: 8.22%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(10) {
    left: 5.49%; top: 73.58%; width: 36.46%; height: 9.65%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(11) {
    left: 59.66%; top: 47.55%; width: 34.55%; height: 8.22%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(12) {
    left: 50.95%; top: 14.91%; width: 44.66%; height: 9.68%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(13) {
    left: 53.07%; top: 81.23%; width: 43.19%; height: 10.75%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(14) {
    left: 3.15%; top: 86.96%; width: 40.70%; height: 7.99%;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(15) {
    left: 3.44%; top: 47.32%; width: 46.56%; height: 9.22%;
}

.cat-page-grid[data-cat="auto"] .ref-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(13) img,
.cat-page-grid[data-cat="auto"] .ref-card:nth-child(13) video { object-fit: contain; }

/* ─── Food & Drink Layout ─── */
.cat-page-grid[data-cat="fooddrink"] {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 220%;
}
.cat-page-grid[data-cat="fooddrink"] .ref-card {
    position: absolute;
    aspect-ratio: auto;
    opacity: 0;
    transform: none;
}
.cat-page-grid[data-cat="fooddrink"] .ref-card.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out);
}
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(1)  { left: 5.50%; top: 59.95%; width: 30.00%; height: 10.25%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(2)  { left: 51.68%; top: 68.72%; width: 40.00%; height: 10.21%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(3)  { left: 14.35%; top: 88.09%; width: 13.03%; height: 2.90%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(4)  { left: 19.69%; top: 30.92%; width: 64.57%; height: 12.75%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(5)  { left: 4.32%; top: 5.66%; width: 42.02%; height: 8.42%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(6)  { left: 52.34%; top: 0.63%; width: 41.00%; height: 7.52%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(7)  { left: 63.18%; top: 84.39%; width: 18.08%; height: 7.12%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(8)  { left: 7.61%; top: 19.83%; width: 35.07%; height: 7.42%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(9)  { left: 59.30%; top: 56.74%; width: 34.99%; height: 8.22%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(10) { left: 5.49%; top: 73.58%; width: 36.46%; height: 7.14%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(11) { left: 59.66%; top: 47.55%; width: 34.55%; height: 8.22%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(12) { left: 50.95%; top: 14.91%; width: 43.19%; height: 8.61%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(13) { left: 53.07%; top: 82.00%; width: 44.66%; height: 9.68%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(14) { left: 3.15%; top: 86.96%; width: 40.70%; height: 10.40%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card:nth-child(15) { left: 3.44%; top: 47.32%; width: 46.56%; height: 9.22%; }
.cat-page-grid[data-cat="fooddrink"] .ref-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Sports Layout ─── */
.cat-page-grid[data-cat="sports"] {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 220%;
}
.cat-page-grid[data-cat="sports"] .ref-card {
    position: absolute;
    aspect-ratio: auto;
    opacity: 0;
    transform: none;
}
.cat-page-grid[data-cat="sports"] .ref-card.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out);
}
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(1)  { left: 3.00%; top: 61.60%; width: 40.34%; height: 8.39%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(2)  { left: 51.68%; top: 68.72%; width: 45.75%; height: 9.02%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(3)  { left: 14.35%; top: 88.09%; width: 13.03%; height: 2.90%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(4)  { left: 19.69%; top: 30.92%; width: 64.57%; height: 12.75%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(5)  { left: 4.32%; top: 5.66%; width: 42.02%; height: 8.42%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(6)  { left: 52.34%; top: 0.63%; width: 41.00%; height: 7.52%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(7)  { left: 63.18%; top: 84.39%; width: 18.08%; height: 7.12%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(8)  { left: 7.61%; top: 19.83%; width: 35.07%; height: 7.42%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(9)  { left: 59.30%; top: 56.74%; width: 34.99%; height: 8.22%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(10) { left: 5.49%; top: 73.58%; width: 36.46%; height: 9.65%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(11) { left: 59.66%; top: 47.55%; width: 34.55%; height: 8.22%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(12) { left: 50.95%; top: 14.91%; width: 44.66%; height: 9.68%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(13) { left: 53.07%; top: 81.23%; width: 43.19%; height: 10.75%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(14) { left: 3.15%; top: 86.96%; width: 40.70%; height: 7.99%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(15) { left: 3.44%; top: 47.32%; width: 46.56%; height: 9.22%; }
.cat-page-grid[data-cat="sports"] .ref-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Card 6 only: WWE Raw thumb — letterbox so top/bottom isn't cropped */
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(6) video {
    object-fit: contain;
}
/* Cards 1 (Macpac) and 15 (Bridgestone) — letterbox so screenshot frames aren't cropped */
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(1) img,
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(15) img {
    object-fit: contain;
}

/* Drop cards 10, 13, 14 from Sports gallery, plus 3 and 7 (orphans at the new bottom) */
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(3),
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(7),
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(10),
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(13),
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(14) { display: none !important; }

/* Shrink grid so the lowest visible card (2, paired with 1 above-left) sits ~100px from the bottom.
   Top%/height% rescaled by 220/179 ≈ 1.2291 so visible cards stay in the same visual positions. */
.cat-page-grid[data-cat="sports"] { padding-bottom: 179%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(1)  { top: 75.71%; height: 10.31%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(2)  { top: 84.46%; height: 11.09%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(4)  { top: 38.00%; height: 15.67%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(5)  { top: 6.96%; height: 10.35%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(6)  { top: 0.77%; height: 9.24%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(8)  { top: 24.37%; height: 9.12%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(9)  { top: 69.74%; height: 10.10%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(11) { top: 58.44%; height: 10.10%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(12) { top: 18.33%; height: 11.90%; }
.cat-page-grid[data-cat="sports"] .ref-card:nth-child(15) { top: 58.16%; height: 11.33%; }

/* ─── Tech Layout ─── */
.cat-page-grid[data-cat="tech"] {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 220%;
}
.cat-page-grid[data-cat="tech"] .ref-card {
    position: absolute;
    aspect-ratio: auto;
    opacity: 0;
    transform: none;
}
.cat-page-grid[data-cat="tech"] .ref-card.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out);
}
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(1)  { left: 3.00%; top: 61.60%; width: 40.34%; height: 8.39%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(2)  { left: 51.68%; top: 68.72%; width: 45.75%; height: 9.02%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(3)  { left: 14.35%; top: 88.09%; width: 13.03%; height: 2.90%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(4)  { left: 19.69%; top: 30.92%; width: 64.57%; height: 12.75%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(5)  { left: 4.32%; top: 5.66%; width: 42.02%; height: 8.42%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(6)  { left: 52.34%; top: 0.63%; width: 41.00%; height: 7.52%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(7)  { left: 63.18%; top: 84.39%; width: 18.08%; height: 7.12%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(8)  { left: 7.61%; top: 19.83%; width: 35.07%; height: 7.42%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(9)  { left: 59.30%; top: 56.74%; width: 34.99%; height: 8.22%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(10) { left: 5.49%; top: 73.58%; width: 36.46%; height: 9.65%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(11) { left: 59.66%; top: 47.55%; width: 34.55%; height: 8.22%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(12) { left: 50.95%; top: 14.91%; width: 44.66%; height: 9.68%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(13) { left: 53.07%; top: 81.23%; width: 43.19%; height: 10.75%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(14) { left: 3.15%; top: 86.96%; width: 40.70%; height: 7.99%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(15) { left: 3.44%; top: 47.32%; width: 46.56%; height: 9.22%; }
.cat-page-grid[data-cat="tech"] .ref-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Drop cards 2, 10, 13, 14 from Tech gallery, plus 3 and 7 (orphans at the new bottom) */
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(2),
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(3),
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(7),
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(10),
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(13),
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(14) { display: none !important; }

/* Shrink grid so the lowest visible cards (1 + 9) sit ~100px from the bottom.
   Top%/height% rescaled by 220/162 ≈ 1.3580 so visible cards stay in the same visual positions. */
.cat-page-grid[data-cat="tech"] { padding-bottom: 162%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(1)  { top: 83.65%; height: 11.39%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(4)  { top: 41.99%; height: 17.32%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(5)  { top: 7.69%; height: 11.44%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(6)  { top: 0.86%; height: 10.21%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(8)  { top: 26.93%; height: 10.08%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(9)  { top: 77.05%; height: 11.16%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(11) { top: 64.57%; height: 11.16%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(12) { top: 20.25%; height: 13.14%; }
.cat-page-grid[data-cat="tech"] .ref-card:nth-child(15) { top: 64.26%; height: 12.52%; }

/* ─── Series & Film Layout ─── */
.cat-page-grid[data-cat="series-film"] {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 220%;
}
.cat-page-grid[data-cat="series-film"] .ref-card {
    position: absolute;
    aspect-ratio: auto;
    opacity: 0;
    transform: none;
}
.cat-page-grid[data-cat="series-film"] .ref-card.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out);
}
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(1)  { left: 3.00%; top: 61.60%; width: 40.34%; height: 8.39%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(2)  { left: 51.68%; top: 68.72%; width: 45.75%; height: 9.02%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(3)  { left: 14.35%; top: 88.09%; width: 13.03%; height: 2.90%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(4)  { left: 19.69%; top: 30.92%; width: 64.57%; height: 12.75%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(5)  { left: 4.32%; top: 5.66%; width: 42.02%; height: 8.42%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(6)  { left: 52.34%; top: 0.63%; width: 41.00%; height: 7.52%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(7)  { left: 63.18%; top: 84.39%; width: 18.08%; height: 7.12%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(8)  { left: 7.61%; top: 19.83%; width: 35.07%; height: 7.42%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(9)  { left: 59.30%; top: 56.74%; width: 34.99%; height: 8.22%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(10) { left: 5.49%; top: 73.58%; width: 36.46%; height: 9.65%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(11) { left: 59.66%; top: 47.55%; width: 34.55%; height: 8.22%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(12) { left: 50.95%; top: 14.91%; width: 44.66%; height: 9.68%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(13) { left: 53.07%; top: 81.23%; width: 43.19%; height: 10.75%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(14) { left: 3.15%; top: 86.96%; width: 40.70%; height: 7.99%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(15) { left: 3.44%; top: 47.32%; width: 46.56%; height: 9.22%; }
.cat-page-grid[data-cat="series-film"] .ref-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Beauty Layout ─── */
.cat-page-grid[data-cat="beauty"] {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 220%;
}
.cat-page-grid[data-cat="beauty"] .ref-card {
    position: absolute;
    aspect-ratio: auto;
    opacity: 0;
    transform: none;
}
.cat-page-grid[data-cat="beauty"] .ref-card.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out);
}
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(1)  { left: 3.00%; top: 61.60%; width: 40.34%; height: 8.39%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(2)  { left: 51.68%; top: 68.72%; width: 45.75%; height: 9.02%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(3)  { left: 14.35%; top: 88.09%; width: 13.03%; height: 2.90%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(4)  { left: 19.69%; top: 30.92%; width: 64.57%; height: 12.75%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(5)  { left: 4.32%; top: 5.66%; width: 42.02%; height: 8.42%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(6)  { left: 52.34%; top: 0.63%; width: 41.00%; height: 7.52%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(7)  { left: 63.18%; top: 84.39%; width: 18.08%; height: 7.12%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(8)  { left: 7.61%; top: 19.83%; width: 35.07%; height: 7.42%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(9)  { left: 59.30%; top: 56.74%; width: 34.99%; height: 8.22%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(10) { left: 5.49%; top: 73.58%; width: 36.46%; height: 9.65%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(11) { left: 59.66%; top: 47.55%; width: 34.55%; height: 8.22%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(12) { left: 50.95%; top: 14.91%; width: 44.66%; height: 9.68%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(13) { left: 53.07%; top: 81.23%; width: 43.19%; height: 10.75%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(14) { left: 3.15%; top: 86.96%; width: 40.70%; height: 7.99%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(15) { left: 3.44%; top: 47.32%; width: 46.56%; height: 9.22%; }
.cat-page-grid[data-cat="beauty"] .ref-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Cards 5 (Nivea Skin) and 15 (Eucerin Casting) — letterbox so 16:9 screenshot frames aren't cropped */
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(5) img,
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(15) img { object-fit: contain; }

/* Drop cards 1, 2, 9, 10, 11, 13, 14 from Beauty gallery, plus 3 and 7 (orphans at the new bottom) */
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(1),
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(2),
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(3),
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(7),
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(9),
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(10),
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(11),
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(13),
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(14) { display: none !important; }

/* Shrink grid so the lowest visible card (15) sits ~100px from the bottom.
   Top%/height% rescaled by 220/134 ≈ 1.6418 so visible cards stay in the same visual positions. */
.cat-page-grid[data-cat="beauty"] { padding-bottom: 134%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(4)  { top: 50.77%; height: 20.93%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(5)  { top: 9.29%; height: 13.82%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(6)  { top: 1.03%; height: 12.35%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(8)  { top: 32.56%; height: 12.18%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(12) { top: 24.48%; height: 15.89%; }
.cat-page-grid[data-cat="beauty"] .ref-card:nth-child(15) { left: 26.72%; top: 77.69%; height: 15.14%; }

/* ─── Fashion Layout ─── */
.cat-page-grid[data-cat="fashion"] {
    display: block;
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 220%;
}
.cat-page-grid[data-cat="fashion"] .ref-card {
    position: absolute;
    aspect-ratio: auto;
    opacity: 0;
    transform: none;
}
.cat-page-grid[data-cat="fashion"] .ref-card.visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.5s var(--ease-out);
}
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(1)  { left: 3.00%; top: 61.60%; width: 40.34%; height: 8.39%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(2)  { left: 51.68%; top: 68.72%; width: 45.75%; height: 9.02%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(3)  { left: 14.35%; top: 88.09%; width: 13.03%; height: 2.90%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(4)  { left: 19.69%; top: 30.92%; width: 64.57%; height: 12.75%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(5)  { left: 4.32%; top: 5.66%; width: 42.02%; height: 8.42%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(6)  { left: 52.34%; top: 0.63%; width: 41.00%; height: 7.52%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(7)  { left: 63.18%; top: 84.39%; width: 18.08%; height: 7.12%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(8)  { left: 7.61%; top: 19.83%; width: 35.07%; height: 7.42%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(9)  { left: 59.30%; top: 56.74%; width: 34.99%; height: 8.22%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(10) { left: 5.49%; top: 73.58%; width: 36.46%; height: 9.65%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(11) { left: 59.66%; top: 47.55%; width: 34.55%; height: 8.22%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(12) { left: 50.95%; top: 14.91%; width: 44.66%; height: 9.68%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(13) { left: 53.07%; top: 81.23%; width: 43.19%; height: 10.75%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(14) { left: 3.15%; top: 86.96%; width: 40.70%; height: 7.99%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(15) { left: 3.44%; top: 47.32%; width: 46.56%; height: 9.22%; }
.cat-page-grid[data-cat="fashion"] .ref-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* Drop bottom-row cards from Fashion gallery */
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(1),
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(2),
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(3),
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(7),
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(9),
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(10),
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(13),
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(14) { display: none !important; }

/* Shrink fashion grid so cards 11/15 sit ~100px from the bottom.
   Top%/height% rescaled by 220/134 so visible cards stay in the same visual positions. */
.cat-page-grid[data-cat="fashion"] { padding-bottom: 134%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(4)  { top: 50.77%; height: 20.93%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(5)  { top: 9.29%;  height: 13.82%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(6)  { top: 1.03%;  height: 12.35%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(8)  { top: 32.56%; height: 12.18%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(11) { top: 78.07%; height: 13.49%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(12) { top: 24.48%; height: 15.89%; }
.cat-page-grid[data-cat="fashion"] .ref-card:nth-child(15) { top: 77.69%; height: 15.14%; }

/* ─── Depth Peel ─── */
.ref-card[data-spreads] {
    cursor: pointer;
}

/* Hover: lift + hint of stack */
.ref-card[data-spreads]::before,
.ref-card[data-spreads]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(200, 195, 185, 0.6);
    border: 1px solid rgba(0,0,0,0.06);
    z-index: -1;
    opacity: 0;
    transition: all 0.3s var(--ease-out);
}

.ref-card[data-spreads]:hover::before {
    opacity: 1;
    transform: translate(4px, 4px) rotate(1.5deg);
}
.ref-card[data-spreads]:hover::after {
    opacity: 1;
    transform: translate(8px, 8px) rotate(3deg);
}
/* Card 8 only (series-film): bump thumb size ~15% + nudge -35px / -20px */
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(8) {
    width: 40.33% !important;
    height: 8.53% !important;
}
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(8).visible {
    transform: translate(-35px, -20px) !important;
}
/* Card 8 only (series-film): suppress hover paper-stack overflow + zoom for Soldier thumb */
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(8):hover::before,
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(8):hover::after {
    opacity: 0;
}
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(8):hover img {
    transform: none;
}
/* Series & Film: hide bottom-leftover cards 2, 3, 7, 9, 10, 13, 14 — kept absolute positions for the rest */
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(2),
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(3),
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(7),
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(9),
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(10),
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(13),
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(14) {
    display: none;
}
/* Series & Film: shrink grid so card 1 bottom hits grid bottom; cards rescaled to keep same pixel position; +100px breathing room */
.cat-page-grid[data-cat="series-film"] {
    padding-bottom: 154%;
    margin-bottom: 100px;
}
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(1)  { left: 29.83%; top: 87.99%; height: 11.99% !important; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(4)  { top: 44.17%; height: 18.21%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(5)  { top: 8.09%;  height: 12.03%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(6)  { top: 0.90%;  height: 10.74%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(11) { top: 67.93%; height: 11.74%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(12) { top: 21.30%; height: 13.83%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(15) { top: 67.60%; height: 13.17%; }
.cat-page-grid[data-cat="series-film"] .ref-card:nth-child(8)  { top: 28.33% !important; height: 12.19% !important; }

/* Depth overlay */
.depth-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    cursor: pointer;
}

body.overlay-open .cat-page-grid,
body.overlay-open .cat-page-section,
body.overlay-open #catPageGrid {
    visibility: hidden;
}

.depth-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Depth stage — perspective container */
.depth-stage {
    position: fixed;
    inset: 0;
    z-index: 201;
    perspective: 1200px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.depth-stage.active {
    opacity: 1;
    pointer-events: auto;
}

/* Origin card floats to front */
.depth-origin {
    position: absolute;
    height: 220px;
    width: auto;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transform: translateZ(200px) scale(0.6);
    opacity: 0;
    transition: all 0.6s var(--ease-out);
}

.depth-origin.lifted {
    transform: translateZ(200px) scale(1);
    opacity: 1;
}

.depth-origin img,
.depth-origin video {
    height: 100%;
    width: auto;
    display: block;
}

/* Spread layers behind */
.depth-layer {
    position: absolute;
    overflow: hidden;
    opacity: 0;
    transform: translateZ(-100px) scale(0.8);
    transition: all 0.6s var(--ease-out);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.depth-layer.peeled {
    opacity: 1;
}

.depth-layer img,
.depth-layer video {
    height: 100%;
    width: auto;
    display: block;
}

/* Close hint */
.depth-close-hint {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 202;
    color: rgba(255, 255, 255, 0.35);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.4s ease 0.8s;
    pointer-events: none;
}

.depth-close-hint.active {
    opacity: 1;
}

/* ─── Stack Fan-Out ─── */
.fan-overlay {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    cursor: pointer;
}

.fan-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.fan-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fan-container.active {
    opacity: 1;
    pointer-events: auto;
}

.fan-spread {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.3);
    opacity: 0;
    transition: all 0.5s var(--ease-out);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.fan-spread img,
.fan-spread video {
    height: 100%;
    width: auto;
    display: block;
}

.fan-spread.dealt {
    opacity: 1;
}

.fan-close-hint {
    position: fixed;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 202;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.4s ease 0.6s;
    pointer-events: none;
}

.fan-close-hint.active {
    opacity: 1;
}

/* ─── Focus States ─── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--ghost-yellow);
    outline-offset: 4px;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .nav-social { left: 1.2rem; }
    .nav-about { right: 1.2rem; }
    .nav-about a { font-size: 0.65rem; }

    .nav-portfolio {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0 1.2rem 1.5rem;
    }

    .nav-portfolio a {
        font-size: 0.65rem;
    }

    .categories {
        padding: 2rem 1.2rem 1rem;
    }

    .cat-grid {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto auto auto !important;
        aspect-ratio: auto;
        gap: 3px;
        padding: 1rem 1.2rem;
    }

    .cat-card {
        aspect-ratio: 16 / 10;
    }

    .cat-grid[data-hover-row] { grid-template-rows: auto auto auto auto !important; }
    .cat-grid[data-hover-col] { grid-template-columns: 1fr 1fr !important; }

    .cat-grid[data-hover-row] .cat-card::after,
    .cat-grid[data-hover-col] .cat-card::after {
        background: rgba(0, 0, 0, 0.4);
    }

    .cat-card-title {
        font-size: 1rem;
    }

    .services {
        padding: 1.5rem 1.2rem 0;
    }

    .service-page {
        padding: 5rem 1.5rem 3rem;
        max-width: 100%;
    }

    .carousel {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
        width: calc(100% + 1rem);
    }

    .clients-track { gap: 3rem; }
    .clients-track img { height: 10px; }

    .cat-page { padding: 4.5rem 1rem 2rem; }

    .cat-page-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }
}

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

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .clients-track, .logo-flow-track { animation: none; }
}

/* ─── Info Page ─── */
.info-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 6rem 3rem 6rem;
    min-height: 100vh;
    align-content: center;
}

.info-left .page-header {
    padding: 0 0 2rem;
    text-align: left;
}

.info-left .page-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.05em;
}

.info-left .page-content {
    max-width: none;
    margin: 0;
    padding: 0;
}

.info-left .page-content p {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
    color: var(--ghost-white);
    margin-bottom: 1.2rem;
}

.info-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-cta { text-align: left; }

.info-cta-title {
    font-family: var(--font-serif);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 400;
    font-style: italic;
    color: var(--ghost-yellow);
    line-height: 1.5;
    margin-bottom: 2rem;
}

.info-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.info-contact-links a {
    color: var(--ghost-white-muted);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.info-contact-links a:hover { color: var(--ghost-white); }

/* ─── Testimonials Page ─── */
.page-header {
    padding: 6rem 2rem 3rem;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.05em;
}

.testimonials-grid {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem 6rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.testimonial { text-align: center; }

.testimonial blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    font-style: italic;
    line-height: 1.7;
    color: var(--ghost-white);
    margin-bottom: 1.2rem;
}

.testimonial-name {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    font-style: normal;
    color: var(--ghost-yellow);
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.testimonial-role {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ghost-white-muted);
}

.footer {
    padding: 2.5rem 2rem;
    text-align: center;
}

.footer-text {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--ghost-white-dim);
}

@media (max-width: 768px) {
    .info-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 5rem 1.5rem 4rem;
    }
}

/* Card-number labels — toggled on first thumbnail click in non-lifestyle categories */
.cat-page-grid.show-card-nums .ref-card::after {
    content: attr(data-card-num);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    pointer-events: none;
}
