/* ================================================================
   BRANDS PAGE — /brands/
   Hero pins in place (position:fixed, behind everything) while the
   page scrolls — same curtain technique as the About page's hero
   (about.css): .brands-hero__spacer reserves its height in normal
   flow so .brand-showcase (the next section, opaque + z-index:1)
   scrolls up and over it, instead of the hero scrolling away with the
   rest of the page. Below the hero, a scroll-pinned filmstrip steps
   through the 9 brands one at a time — see the "Showcase" section.
   ================================================================ */

.brands-page {
    padding-top: 0;
}

.brands-hero {
    --header-h: calc(var(--utility-bar-h) + var(--mobile-brand-bar-h));
    position: fixed;
    inset: 0;
    z-index: 0;
    padding-top: var(--header-h);
    background: var(--color-navy-dark);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.brands-hero__spacer {
    height: 100vh;
    height: 100dvh;
}

.brands-page__content {
    position: relative;
    z-index: 1;
    background: var(--color-bg);
}

/* Same reason as about.css's .site-footer override — the footer is a
   sibling of <main>, not a child of .brands-page__content, but it
   still needs to be pulled above the fixed hero's stacking level.
   margin-top:0 too — that gap (main.css) belongs to neither element,
   so it isn't covered by either one's opaque background, and the
   pinned hero was showing through that strip. */
body.toman-brands-page .site-footer {
    position: relative;
    z-index: 2;
    margin-top: 0;
}

@media (min-width: 768px) {
    .brands-hero {
        --header-h: calc(var(--utility-bar-h) + var(--nav-h) + var(--sp-4) * 2);
    }
}

/* Real showroom photo — scaled up for overscan so the scroll-linked
   parallax shift (brands-page.js) never exposes an edge, same
   technique as .visit-card__bg / .about-hero__bg. */
.brands-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 40%;
    transform: scale(1.2);
    will-change: transform;
}

.brands-hero__scrim {
    /* Flat tint only, same rule as every other photo overlay on this
       site — no gradient. */
    position: absolute;
    inset: 0;
    background: rgba(7, 25, 41, 0.68);
}

.brands-hero__content {
    position: relative;
    z-index: 1;
    padding: var(--sp-6);
}

.brands-hero__title {
    font-size: clamp(2.25rem, 6vw, 3.5rem);
    font-weight: var(--fw-black);
    letter-spacing: var(--ls-display);
    color: var(--color-white);
    line-height: var(--lh-tight);
}

.brands-hero__sub {
    margin-top: var(--sp-3);
    font-size: var(--text-base);
    color: rgba(255, 255, 255, 0.75);
}

.brands-hero__scroll-cue {
    position: absolute;
    z-index: 1;
    bottom: var(--sp-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.brands-hero__scroll-cue svg {
    width: 16px;
    height: 16px;
    animation: brands-scroll-bounce 1.8s ease-in-out infinite;
}

@keyframes brands-scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 0.55; }
    50% { transform: translateY(7px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .brands-hero__scroll-cue svg {
        animation: none;
    }
}

/* ── Showcase ─────────────────────────────────────────────────── */

/* Scroll-pinned "project showcase" pattern: the outer element reserves
   one viewport-height of scroll distance per brand (--bs-count, set
   inline from PHP), while .brand-showcase__pin stays fixed in place
   for that whole distance, then releases back into normal flow once
   the last brand has passed — the same 3-state flow/pinned/released
   idea as the shop page's filter sidebar, just driven by
   viewport-sized steps instead of content height.

   The reference doesn't crossfade between two static images — each
   brand is a slide in one continuous vertical filmstrip that scrubs
   past a fixed-size window in exact 1:1 lockstep with scroll position
   (brands-page.js), not a per-brand snap/crossfade. */
.brand-showcase {
    position: relative;
    height: calc(var(--bs-count, 9) * 100vh);
    background: var(--color-navy-dark);
}

.brand-showcase__pin {
    --header-h: calc(var(--utility-bar-h) + var(--mobile-brand-bar-h));
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-h);
    /* Leaves room for the floating mobile .tab-bar (main.css) so the
       side nav row doesn't render underneath it. */
    padding-bottom: calc(3.75rem + var(--sp-6) + env(safe-area-inset-bottom, 0px));
    z-index: 1;
}

@media (min-width: 768px) {
    .brand-showcase__pin {
        --header-h: calc(var(--utility-bar-h) + var(--nav-h) + var(--sp-4) * 2);
        padding-bottom: 0;
    }
}

.brand-showcase__pin.is-pinned {
    position: fixed;
    top: 0;
}

.brand-showcase__pin.is-released {
    position: absolute;
    top: auto;
    bottom: 0;
}

/* Background filmstrip — every brand's own photo, blurred and stacked
   full-viewport-height one after another, moved in exact 1:1 lockstep
   with the foreground track below (same transform, same progress
   value) so the backdrop scrubs together with it. */
.brand-showcase__bg-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.brand-showcase__bg-track {
    position: absolute;
    inset: 0 0 auto 0;
    width: 100%;
    will-change: transform;
}

.brand-showcase__bg-slide {
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center 30%;
    filter: blur(40px) brightness(0.5) saturate(1.1);
    transform: scale(1.15);
}

.brand-showcase__scrim {
    position: absolute;
    inset: 0;
    background: rgba(7, 25, 41, 0.45);
}

.brand-showcase__label {
    position: absolute;
    top: calc(var(--header-h) + var(--sp-6));
    z-index: 2;
    font-size: var(--text-xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.brand-showcase__label--left {
    left: var(--sp-6);
}

.brand-showcase__label--right {
    right: var(--sp-6);
}

.brand-showcase__stage {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The fixed "window" the filmstrip scrolls behind — sized to exactly
   one slide (same width + aspect-ratio on both), clipped so only the
   current slide is ever visible. */
.brand-showcase__viewport {
    position: relative;
    width: clamp(190px, 22vw, 280px);
    aspect-ratio: 9 / 16;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--color-navy-dark);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* One long vertical strip — every brand's slide stacked in normal
   flow, moved via translateY in exact 1:1 lockstep with scroll
   progress through the section (not a per-brand snap/crossfade). */
.brand-showcase__track {
    width: 100%;
    will-change: transform;
}

/* Not cropped — same object-fit:contain rule as the rest of this page,
   so the watch photo through the brand's own wordmark at the bottom
   always stays fully visible. */
.brand-showcase__slide {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    background: var(--color-navy-dark);
}

.brand-showcase__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Per-slide name/link footer — hidden in the pinned/JS-driven mode
   (the shared .brand-showcase__foot bar covers it), shown only by the
   reduced-motion static fallback below. */
.brand-showcase__slide-foot {
    display: none;
}

.brand-showcase__foot {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: var(--sp-6);
}

.brand-showcase__name {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: var(--fw-black);
    color: var(--color-white);
    letter-spacing: var(--ls-display);
}

.brand-showcase__cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: var(--sp-3) var(--sp-6);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--r-full);
    font-size: var(--text-xs);
    font-weight: var(--fw-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-white);
    transition: background var(--t-fast), border-color var(--t-fast);
}

.brand-showcase__cta:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--color-white);
}

/* Side nav — all 9 brands as direct tabs (no cap, jumps straight to
   any one) on the left, and the currently-active brand's own
   subcategories (capped with a "More" dropdown — Tissot alone has 38)
   on the right. Both sit below the stage stacked on mobile, move to
   vertically-centred rails on opposite sides once there's room. */
.brand-showcase__sidenav,
.brand-showcase__subnav {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    padding: 0 var(--sp-6) var(--sp-6);
}

.brand-showcase__subnav {
    display: none;
}

.brand-showcase__subnav.is-active {
    display: flex;
}

.brand-showcase__sidenav-item {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: var(--sp-2) var(--sp-4);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--r-full);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--text-xs);
    font-weight: var(--fw-medium);
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.brand-showcase__sidenav-item:hover,
.brand-showcase__sidenav-item.is-active {
    background: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-navy);
}

/* Brands list — plain text rather than pills, with a small line that
   grows in beside whichever one is the current slide. Subcategories
   (.brand-showcase__subnav) keep the pill look above, untouched. */
.brand-showcase__sidenav--brands .brand-showcase__sidenav-item {
    padding: var(--sp-1) 0;
    background: none;
    border: none;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: var(--text-sm);
}

.brand-showcase__sidenav--brands .brand-showcase__sidenav-item:hover {
    background: none;
    color: rgba(255, 255, 255, 0.85);
}

.brand-showcase__sidenav--brands .brand-showcase__sidenav-item.is-active {
    background: none;
    color: var(--color-white);
    font-weight: var(--fw-bold);
}

.brand-showcase__sidenav-line {
    display: inline-block;
    width: 0;
    height: 1.5px;
    background: var(--color-white);
    transition: width var(--t-fast);
}

.brand-showcase__sidenav-item.is-active .brand-showcase__sidenav-line {
    width: 18px;
}

.brand-showcase__sidenav-more {
    position: relative;
}

.brand-showcase__sidenav-more > summary {
    list-style: none;
}

.brand-showcase__sidenav-more > summary::-webkit-details-marker {
    display: none;
}

.brand-showcase__sidenav-more.is-active > summary {
    background: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-navy);
}

.brand-showcase__sidenav-chevron {
    width: 10px;
    height: 10px;
    transition: transform var(--t-fast);
}

.brand-showcase__sidenav-more[open] > summary .brand-showcase__sidenav-chevron {
    transform: rotate(180deg);
}

.brand-showcase__sidenav-menu {
    position: absolute;
    bottom: calc(100% + var(--sp-2));
    right: 0;
    z-index: var(--z-dropdown);
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 170px;
    padding: var(--sp-2);
    background: var(--color-surface);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
}

.brand-showcase__sidenav-menu .brand-showcase__sidenav-item {
    border-color: transparent;
    background: transparent;
    color: var(--color-navy);
    justify-content: flex-start;
    width: 100%;
}

.brand-showcase__sidenav-menu .brand-showcase__sidenav-item:hover,
.brand-showcase__sidenav-menu .brand-showcase__sidenav-item.is-active {
    background: var(--color-blue-subtle);
    color: var(--color-blue-dark);
}

@media (min-width: 768px) {
    .brand-showcase__foot {
        padding-inline: var(--sp-10);
    }

    .brand-showcase__sidenav {
        position: absolute;
        top: 50%;
        left: var(--sp-8);
        transform: translateY(-50%);
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: var(--sp-3);
        max-width: 160px;
    }

    .brand-showcase__subnav-wrap {
        position: absolute;
        top: 50%;
        right: var(--sp-8);
        transform: translateY(-50%);
        max-width: 200px;
    }

    .brand-showcase__subnav {
        flex-direction: column;
        align-items: flex-end;
        padding: 0;
        gap: var(--sp-3);
    }

    .brand-showcase__subnav .brand-showcase__sidenav-menu {
        bottom: auto;
        top: 0;
        right: calc(100% + var(--sp-2));
    }
}

/* Reduced-motion fallback (brands-page.js adds this class instead of
   running the scroll-pin logic at all) — everything just stacks in
   normal flow, one brand per row, each slide carrying its own
   name/link since the shared foot bar is hidden. */
.brand-showcase--static {
    height: auto;
}

.brand-showcase--static .brand-showcase__pin {
    position: static;
    height: auto;
    padding-top: 0;
    padding-bottom: 0;
}

.brand-showcase--static .brand-showcase__bg-viewport,
.brand-showcase--static .brand-showcase__scrim,
.brand-showcase--static .brand-showcase__label,
.brand-showcase--static .brand-showcase__sidenav,
.brand-showcase--static .brand-showcase__subnav-wrap,
.brand-showcase--static .brand-showcase__foot {
    display: none;
}

.brand-showcase--static .brand-showcase__stage {
    position: static;
    display: block;
    padding: clamp(var(--sp-8), 6vw, var(--sp-12)) var(--sp-6);
}

.brand-showcase--static .brand-showcase__viewport {
    width: 100%;
    height: auto;
    aspect-ratio: auto;
    overflow: visible;
    background: none;
    box-shadow: none;
}

.brand-showcase--static .brand-showcase__track {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-8);
    transform: none !important;
}

.brand-showcase--static .brand-showcase__slide {
    width: min(100%, 280px);
}

.brand-showcase--static .brand-showcase__slide-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    background: var(--color-navy);
    color: var(--color-white);
    border-radius: var(--r-md);
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
}

/* ── Shop-all CTA ─────────────────────────────────────────────── */

.brands-shop-all {
    display: flex;
    justify-content: center;
    padding-block: clamp(var(--sp-10), 8vw, var(--sp-16));
}
