/* ========================================
   LED PRODUCT PAGES
   Loaded only on /products/*. Tokens come from style.css.
   ========================================
*/

/* --- scroll-reveal primitive ------------------------------------------
   Only hidden when scripting is available, so a JS failure can never leave
   the page blank. */
.has-js .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.75s var(--ease-out) var(--d, 0ms),
        transform 0.75s var(--ease-out) var(--d, 0ms);
}

.has-js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Directional variants: the gallery drifts in from the outer edge and the copy
   from the inner one, so each series block resolves inward. */
.has-js .reveal--from-start { transform: translateX(-42px); }
.has-js .reveal--from-end   { transform: translateX(42px); }
.has-js .reveal--zoom       { transform: scale(0.94); }

html[dir="rtl"] .has-js .reveal--from-start { transform: translateX(42px); }
html[dir="rtl"] .has-js .reveal--from-end   { transform: translateX(-42px); }

.has-js .reveal--from-start.is-visible,
.has-js .reveal--from-end.is-visible,
.has-js .reveal--zoom.is-visible {
    transform: none;
}

/* A rule that grows out from the start edge as the block arrives */
.has-js .grow-rule::after {
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.9s var(--ease-out) 0.1s;
}

html[dir="ltr"] .has-js .grow-rule::after {
    transform-origin: left center;
}

.has-js .grow-rule.is-visible::after {
    transform: scaleX(1);
}

/* Spec rows cascade instead of appearing as one solid slab */
.has-js .pseries-specs tr {
    opacity: 0;
    transform: translateY(10px);
}

.has-js .pseries-specs-wrap.is-visible tr {
    opacity: 1;
    transform: none;
    transition:
        opacity 0.5s var(--ease-out) calc(var(--i, 0) * 45ms),
        transform 0.5s var(--ease-out) calc(var(--i, 0) * 45ms);
}

@media (prefers-reduced-motion: reduce) {
    .has-js .reveal,
    .has-js .reveal--from-start,
    .has-js .reveal--from-end,
    .has-js .reveal--zoom {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .has-js .pseries-specs tr,
    .has-js .grow-rule::after {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ========================================
   CATEGORY HERO
   ========================================
*/
.pcat-hero {
    position: relative;
    min-height: 82vh;
    min-height: 82svh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: var(--olive-darkest);
    padding-top: calc(var(--header-height) + 30px);
    padding-bottom: 70px;
}

.pcat-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Slow drift; the parallax offset is applied from JS on top of this */
    animation: pcatDrift 18s ease-in-out infinite alternate;
}

@keyframes pcatDrift {
    from { transform: scale(1.05); }
    to   { transform: scale(1.13); }
}

.pcat-hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(32, 43, 27, 0.95) 0%, rgba(32, 43, 27, 0.55) 42%, rgba(32, 43, 27, 0.28) 100%),
        linear-gradient(to left, rgba(32, 43, 27, 0.78) 0%, transparent 70%);
}

html[dir="ltr"] .pcat-hero-scrim {
    background:
        linear-gradient(to top, rgba(32, 43, 27, 0.95) 0%, rgba(32, 43, 27, 0.55) 42%, rgba(32, 43, 27, 0.28) 100%),
        linear-gradient(to right, rgba(32, 43, 27, 0.78) 0%, transparent 70%);
}

.pcat-hero-pattern {
    --pat-color: #FFFFFF;
    --pat-opacity: 0.13;
    --pat-size: 175px;
}

html[dir="ltr"] .pcat-hero-pattern {
    -webkit-mask-image: var(--pattern-line), linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 78%);
    mask-image: var(--pattern-line), linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.35) 45%, transparent 78%);
}

/* Centred, poster-like composition — deliberately symmetrical so it reads
   differently from the homepage hero and pairs with the stats band below. */
.pcat-hero-inner {
    position: relative;
    z-index: 3;
    max-width: 880px;
    margin-inline: auto;
    text-align: center;
}

/* breadcrumbs */
.pcat-crumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 26px;
}

.pcat-crumbs a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-fast);
}

.pcat-crumbs a:hover {
    color: #fff;
}

.pcat-crumbs i {
    font-size: 0.62rem;
    opacity: 0.5;
}

html[dir="ltr"] .pcat-crumbs i {
    transform: rotate(180deg);
}

.pcat-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--sage-light);
    margin-bottom: 18px;
}

.pcat-eyebrow::before {
    content: '';
    width: 20px;
    height: 20px;
    background-color: var(--sage-light);
    -webkit-mask-image: var(--pattern-solid);
    mask-image: var(--pattern-solid);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

.pcat-title {
    font-size: clamp(2.4rem, 5.6vw, 4.4rem);
    line-height: 1.28;
    color: #fff;
    margin-bottom: 18px;
    text-wrap: balance;
}

.pcat-tagline {
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.9;
    margin: 0 auto 26px;
    max-width: 640px;
}

.pcat-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
}

.pcat-chip {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.pcat-hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.pcat-hero .btn-primary {
    background: #fff;
    color: var(--olive-deep);
    border-color: #fff;
}

.pcat-hero .btn-primary:hover {
    background: var(--sage-light);
    border-color: var(--sage-light);
    color: var(--olive-darkest);
}

.pcat-hero .btn-outline {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.pcat-hero .btn-outline:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.pcat-scrollcue {
    position: absolute;
    inset-inline-start: 50%;
    bottom: 22px;
    z-index: 3;
    width: 1px;
    height: 46px;
    background: rgba(255, 255, 255, 0.25);
    overflow: hidden;
}

.pcat-scrollcue span {
    position: absolute;
    inset-inline: 0;
    top: -46px;
    height: 46px;
    background: var(--sage-light);
    animation: pcatCue 2.2s ease-in-out infinite;
}

@keyframes pcatCue {
    0%   { transform: translateY(0); }
    100% { transform: translateY(92px); }
}

/* ========================================
   STATS BAND
   ========================================
*/
.pcat-stats-band {
    position: relative;
    background: var(--olive-deep);
    background-image: radial-gradient(120% 160% at 12% 0%, var(--olive-soft) 0%, var(--olive-deep) 60%);
    padding: 46px 0;
    overflow: hidden;
}

.pcat-stats-band .brand-pattern {
    --pat-color: var(--sage-light);
    --pat-opacity: 0.10;
    --pat-size: 170px;
}

.pcat-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.pcat-stat {
    text-align: center;
    position: relative;
}

.pcat-stat + .pcat-stat::before {
    content: '';
    position: absolute;
    inset-inline-start: -12px;
    top: 12%;
    height: 76%;
    width: 1px;
    background: rgba(255, 255, 255, 0.16);
}

.pcat-stat-value {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 6px;
}

.pcat-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.68);
}

/* ========================================
   BODY LAYOUT — sticky rail + content
   ========================================
*/
/* align-items must stay `stretch`: the rail column has to span the full row
   height, otherwise its sticky child has no travel and scrolls straight away. */
.pcat-body {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    gap: 64px;
    padding-top: 90px;
    padding-bottom: 90px;
    align-items: stretch;
}

/* Both tracks must be allowed to shrink below their content. Without this the
   horizontally-scrolling chip rail reports a huge min-content width and blows
   the grid — and therefore the page — wider than the viewport. */
.pcat-rail,
.pcat-content {
    min-width: 0;
}

.pcat-rail-inner {
    position: sticky;
    top: calc(var(--header-height) + 22px);
}

.pcat-rail-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 14px;
}

.pcat-rail-list {
    position: relative;
    list-style: none;
    margin-bottom: 38px;
    border-inline-start: 1px solid var(--border-color);
}

/* A single indicator that glides between entries rather than four borders
   blinking on and off. */
.pcat-rail-marker {
    position: absolute;
    inset-inline-start: -1px;
    top: 0;
    width: 2px;
    height: 0;
    background: var(--olive);
    border-radius: 2px;
    opacity: 0;
    transition:
        transform 0.45s var(--ease-out),
        height 0.45s var(--ease-out),
        opacity 0.3s ease;
    pointer-events: none;
}

.pcat-rail-marker.is-ready {
    opacity: 1;
}

.pcat-rail-list a {
    display: block;
    padding: 12px 18px;
    transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out);
}

.pcat-rail-list a strong {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.pcat-rail-list a em {
    display: block;
    font-style: normal;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.pcat-rail-list a:hover strong,
.pcat-rail-list a.is-active strong {
    color: var(--olive);
}

.pcat-rail-list a.is-active {
    background: rgba(var(--olive-rgb), 0.05);
}

.pcat-rail-cats {
    list-style: none;
}

.pcat-rail-cats a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--text-muted);
    font-size: 0.94rem;
    transition: var(--transition-fast);
}

.pcat-rail-cats a:hover {
    color: var(--olive);
    padding-inline-start: 6px;
}

.pcat-rail-cats i {
    width: 20px;
    color: var(--sage);
}

/* ========================================
   INTRO + HIGHLIGHTS
   ========================================
*/
.pcat-intro {
    margin-bottom: 70px;
}

/* Large intro copy takes the Light cut — at this size the Regular weight reads
   heavy, and it brings the fifth face of the family into use. */
.pcat-lede {
    font-size: clamp(1.1rem, 1.9vw, 1.35rem);
    font-weight: 300;
    line-height: 2.05;
    color: var(--text-secondary);
    margin-bottom: 34px;
}

.pcat-highlights {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 30px;
}

.pcat-highlights li {
    position: relative;
    padding-inline-start: 28px;
    color: var(--text-muted);
    line-height: 1.85;
}

.pcat-highlights li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0.6em;
    width: 13px;
    height: 13px;
    background-color: var(--sage);
    -webkit-mask-image: var(--pattern-solid);
    mask-image: var(--pattern-solid);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* ========================================
   PRODUCT FILM
   ========================================
*/
.pcat-film {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 80px;
    background: var(--olive-darkest);
    box-shadow: var(--shadow-lg);
}

.pcat-film-video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.pcat-film-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: var(--olive-deep);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.pcat-film-play::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.45);
    animation: pcatPulse 2.4s ease-out infinite;
}

@keyframes pcatPulse {
    0%   { transform: scale(1);   opacity: 0.9; }
    100% { transform: scale(1.35); opacity: 0; }
}

.pcat-film-play:hover {
    background: var(--sage-light);
    transform: scale(1.06);
}

.pcat-film.is-playing .pcat-film-play,
.pcat-film.is-playing .pcat-film-caption {
    opacity: 0;
    pointer-events: none;
}

.pcat-film-caption {
    position: absolute;
    inset-inline-start: 26px;
    bottom: 22px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
    transition: opacity 0.3s ease;
}

/* ========================================
   SERIES BLOCK
   ========================================
*/
.pseries {
    padding-top: 26px;
    margin-bottom: 84px;
    scroll-margin-top: calc(var(--header-height) + 30px);
}

/* The rule lives on ::after so it can be animated open (see .grow-rule) */
.pseries-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 22px;
    margin-bottom: 34px;
}

.pseries-head::after {
    content: '';
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(to left, var(--sage) 0%, var(--border-color) 55%, transparent 100%);
}

html[dir="ltr"] .pseries-head::after {
    background: linear-gradient(to right, var(--sage) 0%, var(--border-color) 55%, transparent 100%);
}

.pseries-index {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px var(--sage);
    flex-shrink: 0;
}

.pseries-headings {
    flex-grow: 1;
    min-width: 0;
}

.pseries-name {
    font-family: 'Jost', sans-serif;
    font-size: clamp(1.45rem, 2.6vw, 2rem);
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.25;
}

.pseries-sub {
    display: block;
    color: var(--text-muted);
    font-size: 0.98rem;
    margin-top: 4px;
}

.pseries-pitch {
    flex-shrink: 0;
    background: rgba(var(--olive-rgb), 0.09);
    color: var(--olive);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
}

.pseries-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

/* --- gallery --- */
.pseries-media {
    min-width: 0;
}

.pseries-gallery {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

.pseries-gallery .swiper-slide {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
}

.pseries-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Each incoming slide settles out of a slight push, so paging feels soft */
    transform: scale(1.05);
    transition: transform 1.4s var(--ease-out);
}

.pseries-gallery .swiper-slide-active img {
    transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .pseries-gallery img,
    .pseries-gallery .swiper-slide-active img {
        transform: none;
        transition: none;
    }
}

.pseries-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(32, 43, 27, 0.55);
    color: #fff;
    cursor: pointer;
    opacity: 0;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: var(--transition-fast);
}

.pseries-gallery:hover .pseries-nav,
.pseries-nav:focus-visible {
    opacity: 1;
}

.pseries-prev { inset-inline-start: 12px; }
.pseries-next { inset-inline-end: 12px; }

/* Same flip as the hero controls: the glyphs are authored for RTL */
html[dir="ltr"] .pseries-prev i,
html[dir="ltr"] .pseries-next i {
    transform: rotate(180deg);
}

.pseries-nav:hover {
    background: var(--sage-light);
    color: var(--olive-deep);
}

.pseries-gallery .swiper-pagination {
    bottom: 12px !important;
}

.pseries-gallery .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.pseries-gallery .swiper-pagination-bullet-active {
    background: var(--sage-light);
    opacity: 1;
    width: 22px;
    border-radius: 4px;
}

/* --- info --- */
.pseries-info {
    min-width: 0;
}

.pseries-blurb {
    color: var(--text-secondary);
    line-height: 2;
    margin-bottom: 24px;
}

.pseries-features {
    list-style: none;
    margin-bottom: 28px;
}

.pseries-features li {
    position: relative;
    padding-inline-start: 24px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.97rem;
    line-height: 1.8;
}

.pseries-features li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0.62em;
    width: 11px;
    height: 11px;
    background-color: var(--sage);
    -webkit-mask-image: var(--pattern-solid);
    mask-image: var(--pattern-solid);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* --- spec table in a disclosure, spanning the full content width --- */
.pseries-specs-wrap {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 34px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.pseries-specs-wrap summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    color: var(--text-primary);
    user-select: none;
}

.pseries-specs-wrap summary::-webkit-details-marker {
    display: none;
}

.pseries-specs-wrap summary i {
    transition: transform 0.3s var(--ease-out);
    color: var(--sage);
    font-size: 0.8rem;
}

.pseries-specs-wrap[open] summary i {
    transform: rotate(180deg);
}

.pseries-specs {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: var(--bg-main);
}

.pseries-specs tr {
    border-top: 1px solid var(--border-color);
}

.pseries-specs th {
    text-align: start;
    font-weight: 500;
    color: var(--text-muted);
    padding: 13px 22px;
    white-space: nowrap;
    width: 32%;
}

/* The cell itself is dir="ltr" so numbers read correctly, which flips what
   `start` means — pin the value to the side facing its label instead. */
.pseries-specs td {
    color: var(--text-primary);
    font-weight: 500;
    padding: 13px 22px;
    text-align: right;
}

html[dir="ltr"] .pseries-specs td {
    text-align: left;
}

.pseries-cta {
    align-self: flex-start;
}

/* ========================================
   APPLICATIONS
   ========================================
*/
.pcat-apps {
    padding-top: 10px;
}

.pcat-apps-title {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    margin-bottom: 26px;
}

.pcat-apps-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.pcat-apps-grid li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.pcat-apps-grid li:hover {
    border-color: rgba(var(--olive-rgb), 0.3);
    transform: translateY(-3px);
}

.pcat-apps-grid i {
    color: var(--olive);
    font-size: 0.85rem;
}

/* ========================================
   OTHER CATEGORIES
   ========================================
*/
.pcat-more {
    background: var(--bg-secondary);
    padding: 80px 0;
}

.pcat-more-title {
    font-size: clamp(1.5rem, 2.8vw, 2rem);
    margin-bottom: 34px;
    text-align: center;
}

.pcat-more-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.pcat-more-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    display: block;
    aspect-ratio: 16 / 10;
    box-shadow: var(--shadow-sm);
    transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.pcat-more-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

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

.pcat-more-card:hover img {
    transform: scale(1.07);
}

.pcat-more-body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(to top, rgba(32, 43, 27, 0.9) 0%, rgba(32, 43, 27, 0.25) 55%, transparent 100%);
}

.pcat-more-body i {
    font-size: 1.2rem;
    color: var(--sage-light);
    margin-bottom: 6px;
}

.pcat-more-body strong {
    font-size: 1.2rem;
    font-weight: 600;
}

.pcat-more-body em {
    font-style: normal;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
}

/* ========================================
   CATALOGUE INDEX PAGE
   ========================================
*/
.pindex-hero {
    position: relative;
    background: var(--bg-secondary);
    padding: calc(var(--header-height) + 70px) 0 60px;
    overflow: hidden;
}

.pindex-hero .brand-pattern {
    --pat-color: var(--sage);
    --pat-opacity: 0.16;
    --pat-size: 210px;
}

.pindex-hero .container {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.pindex-hero .pcat-crumbs {
    color: var(--text-muted);
}

.pindex-hero .pcat-crumbs a {
    color: var(--text-secondary);
}

.pindex-hero .pcat-crumbs a:hover {
    color: var(--olive);
}

.pindex-hero .pcat-eyebrow {
    color: var(--olive);
}

.pindex-hero .pcat-eyebrow::before {
    background-color: var(--olive);
}

.pindex-title {
    font-size: clamp(2.1rem, 4.6vw, 3.6rem);
    line-height: 1.3;
    margin-bottom: 20px;
}

.pindex-lede {
    font-size: clamp(1.02rem, 1.7vw, 1.25rem);
    font-weight: 300;
    line-height: 2;
    color: var(--text-muted);
}

.pindex-list {
    padding: 80px 20px;
    display: grid;
    gap: 34px;
}

.pindex-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s var(--ease-out);
}

/* Alternate the image side so the list reads as a rhythm, not a stack */
.pindex-card:nth-child(even) .pindex-card-media {
    order: 2;
}

.pindex-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(var(--olive-rgb), 0.28);
}

.pindex-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--olive-darkest);
}

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

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

.pindex-card-pitch {
    position: absolute;
    inset-block-end: 16px;
    inset-inline-start: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--olive-deep);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Centred rather than spread: the media column is taller than this copy, and
   pushing the CTA to the bottom leaves an awkward hole in the middle. */
.pindex-card-body {
    padding: 40px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pindex-card-eyebrow {
    font-family: 'Jost', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--sage);
    margin-bottom: 10px;
}

.pindex-card-body h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    margin-bottom: 12px;
}

.pindex-card-body p {
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 20px;
}

.pindex-card-series {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.pindex-card-series li {
    font-family: 'Jost', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 7px;
    padding: 6px 13px;
}

.pindex-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--olive);
    transition: gap 0.3s var(--ease-out);
}

.pindex-card:hover .pindex-card-cta {
    gap: 17px;
}

/* ========================================
   RESPONSIVE
   ========================================
*/
@media (max-width: 1100px) {
    .pcat-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
        padding-top: 60px;
    }

    /* The rail becomes a horizontal, scrollable chip row under the header.
       In one column the rail is its own short grid row, so the sticky element
       has to be the grid item itself — it then travels the whole grid. */
    .pcat-rail {
        position: sticky;
        top: calc(var(--header-height) - 8px);
        z-index: 40;
        align-self: start;
    }

    .pcat-rail-inner {
        position: static;
        background: var(--bg-main);
        padding: 12px 20px;
        margin: 0 -20px;
        box-shadow: 0 8px 20px rgba(32, 43, 27, 0.06);
    }

    .pcat-rail-label,
    .pcat-rail-cats,
    .pcat-rail-marker {
        display: none;
    }

    .pcat-rail-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        border: none;
        margin: 0;
        scrollbar-width: none;
    }

    .pcat-rail-list::-webkit-scrollbar {
        display: none;
    }

    .pcat-rail-list li {
        flex-shrink: 0;
    }

    .pcat-rail-list a {
        border: 1px solid var(--border-color);
        border-radius: 50px;
        padding: 9px 18px;
        margin: 0;
    }

    .pcat-rail-list a em {
        display: none;
    }

    .pcat-rail-list a.is-active {
        background: var(--olive);
        border-color: var(--olive);
    }

    .pcat-rail-list a.is-active strong {
        color: #fff;
    }

    .pseries-media {
        position: static;
    }

    .pseries-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .pindex-card {
        grid-template-columns: 1fr;
    }

    .pindex-card:nth-child(even) .pindex-card-media {
        order: 0;
    }
}

@media (max-width: 768px) {
    .pcat-hero {
        min-height: 74vh;
        padding-bottom: 50px;
    }

    .pcat-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 26px 12px;
    }

    .pcat-stat + .pcat-stat::before {
        display: none;
    }

    .pcat-highlights {
        grid-template-columns: 1fr;
    }

    .pseries-head {
        flex-wrap: wrap;
        gap: 12px;
    }

    .pseries-pitch {
        order: 3;
        width: 100%;
        text-align: center;
    }

    .pindex-card-body {
        padding: 28px 24px;
    }

    .pcat-film-play {
        width: 64px;
        height: 64px;
        font-size: 1.2rem;
    }

    .pcat-scrollcue {
        display: none;
    }
}
