/* ==========================================================================
   Lozy main menu — motion & effects layer
   Loaded AFTER header-menu.css. Adds the editorial motion language:
   a wipe-open panel, cascading link rows, pointer glow, image cards with a
   slow Ken Burns drift, a marquee ticker and a magnetic CTA.

   Everything degrades to the plain menu if this file is missing, and every
   animation is switched off under prefers-reduced-motion.
   Markup : resources/views/partials/header/nav-main.blade.php
   Script : assets/js/header-menu.js
   ========================================================================== */

:root {
    --lz-ease: cubic-bezier(.16, 1, .3, 1);
    --lz-ease-soft: cubic-bezier(.4, 0, .2, 1);
    --lz-red: var(--primary, #D71920);
    --lz-ink: #111418;
}

/* the utility strip must stay crisp above the scrim (the header already is) */
.lz-topbar {
    position: relative;
    z-index: calc(var(--z-sticky-header, 999) + 1);
}

/* ---------- page scrim behind an open panel ---------- */
.lz-scrim {
    position: fixed;
    inset: 0;
    background: rgba(12, 14, 17, .38);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .32s var(--lz-ease-soft);
    z-index: 40;
}

.lz-scrim.is-on {
    opacity: 1;
}

/* ---------- nav links: wipe underline + dot ---------- */
.lz-navlink {
    position: relative;
    overflow: hidden;
}

.lz-navlink>span {
    position: relative;
    z-index: 1;
    transition: transform .42s var(--lz-ease);
}

.lz-navlink::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 7px;
    height: 1.5px;
    background: var(--lz-red);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .42s var(--lz-ease);
}

.lz-navlink:hover>span,
.lz-item.is-open>.lz-navlink>span {
    transform: translateY(-1px);
}

.lz-navlink:hover::after,
.lz-item.is-open>.lz-navlink::after {
    transform: scaleX(1);
}

/* the little red dot that grows in on hover */
.lz-navlink .lz-dot {
    position: absolute;
    top: 50%;
    left: 2px;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: var(--lz-red);
    transform: scale(0);
    transition: transform .42s var(--lz-ease);
}

.lz-navlink:hover .lz-dot,
.lz-item.is-open .lz-navlink .lz-dot {
    transform: scale(1);
}

/* ---------- the panel: wipe open instead of a fade ---------- */
.lz-panel {
    clip-path: inset(0 0 100% 0);
    opacity: 1;
    transform: none;
    transition: clip-path .52s var(--lz-ease), visibility .52s;
    will-change: clip-path;
}

.lz-panel.is-open {
    clip-path: inset(0 0 0 0);
}

/* rows and headings cascade in */
.lz-panel .lz-gh,
.lz-panel .lz-row,
.lz-panel .lz-promo,
.lz-panel .lz-panel-foot {
    opacity: 0;
    transform: translateY(14px);
}

.lz-panel.is-open .lz-gh {
    animation: lz-rise .5s var(--lz-ease) forwards;
    animation-delay: calc(var(--i, 0) * 30ms);
}

.lz-panel.is-open .lz-row {
    animation: lz-rise .55s var(--lz-ease) forwards;
    animation-delay: calc(60ms + var(--i, 0) * 38ms);
}

.lz-panel.is-open .lz-promo {
    animation: lz-rise-scale .68s var(--lz-ease) forwards;
    animation-delay: 150ms;
}

.lz-panel.is-open .lz-panel-foot {
    animation: lz-rise .5s var(--lz-ease) forwards;
    animation-delay: 260ms;
}

@keyframes lz-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lz-rise-scale {
    from {
        opacity: 0;
        transform: translateY(20px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- link rows: sweep + arrow + label shift ---------- */
.lz-row {
    position: relative;
    overflow: hidden;
    transition: background .3s var(--lz-ease-soft), padding-left .3s var(--lz-ease);
}

.lz-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--lz-red);
    transform: scaleY(0);
    transform-origin: top center;
    transition: transform .34s var(--lz-ease);
}

.lz-row:hover {
    padding-left: 16px;
}

.lz-row:hover::before {
    transform: scaleY(1);
}

.lz-row .lz-rl {
    transition: color .28s var(--lz-ease-soft), letter-spacing .34s var(--lz-ease);
}

.lz-row:hover .lz-rl {
    letter-spacing: .002em;
}

.lz-row-arrow {
    transition: opacity .28s var(--lz-ease-soft), transform .34s var(--lz-ease);
}

.lz-row:hover .lz-row-arrow {
    transform: translateX(3px);
}

/* ---------- promo card: image, drift, shine ---------- */
.lz-promo {
    overflow: hidden;
    position: relative;
    transition: transform .5s var(--lz-ease), box-shadow .5s var(--lz-ease);
}

.lz-promo:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 40px -26px rgba(17, 20, 24, .45);
}

.lz-promo-media {
    display: block;
    position: relative;
    margin: -18px -18px 16px;
    overflow: hidden;
    background: var(--lz-ink);
}

.lz-promo-media img {
    display: block;
    width: 100%;
    height: 168px;
    object-fit: cover;
    transform: scale(1.04);
    animation: lz-kenburns 22s ease-in-out infinite alternate;
}

.lz-promo-media.is-alt img {
    animation-delay: -11s;
}

@keyframes lz-kenburns {
    from {
        transform: scale(1.02) translate3d(0, 0, 0);
    }

    to {
        transform: scale(1.14) translate3d(-1.5%, -2%, 0);
    }
}

/* the light sweep that crosses the image on hover */
.lz-promo-media::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 55%;
    left: -70%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .34), transparent);
    transform: skewX(-18deg);
    transition: left .8s var(--lz-ease);
}

.lz-promo:hover .lz-promo-media::after {
    left: 130%;
}

/* a soft ink gradient so the caption always reads over the photo */
.lz-promo-media::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 62%;
    background: linear-gradient(transparent, rgba(10, 12, 15, .55));
    z-index: 1;
}

/* ---------- CTA: shine + press ---------- */
.lz-cta {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    transition: background .3s var(--lz-ease-soft), transform .32s var(--lz-ease), box-shadow .32s var(--lz-ease);
}

.lz-cta::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45%;
    left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
    transform: skewX(-16deg);
}

.lz-cta:hover::before {
    animation: lz-shine .9s var(--lz-ease) forwards;
}

@keyframes lz-shine {
    to {
        left: 125%;
    }
}

.lz-cta:hover {
    box-shadow: 0 14px 28px -14px rgba(237, 28, 36, .55);
}

/* ---------- utility strip: marquee ticker ---------- */
.lz-topbar-links {
    flex: 0 0 auto;
    white-space: nowrap;
}

.lz-topbar-marquee {
    display: none;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    flex: 1 1 auto;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.lz-topbar-marquee>span {
    display: inline-block;
    padding-right: 40px;
    animation: lz-marquee 34s linear infinite;
}

.lz-topbar-marquee:hover>span {
    animation-play-state: paused;
}

@keyframes lz-marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ---------- pointer glow inside an open panel ---------- */
.lz-glow {
    position: absolute;
    width: 420px;
    height: 420px;
    left: 0;
    top: 0;
    margin: -210px 0 0 -210px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(237, 28, 36, .10), rgba(237, 28, 36, 0) 62%);
    opacity: 0;
    transition: opacity .4s var(--lz-ease-soft);
    z-index: 0;
}

.lz-panel.is-open .lz-glow {
    opacity: 1;
}

/* second image cross-fades in over the first on hover (like an animated loop) */
.lz-promo-media .lz-media-alt {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .7s var(--lz-ease);
    z-index: 0;
}

.lz-promo:hover .lz-promo-media .lz-media-alt {
    opacity: 1;
}

/* ---------- utility strip marquee: only where there is room ---------- */
@media (min-width: 1025px) {
    .lz-topbar-claim {
        display: none;
    }

    .lz-topbar-marquee {
        display: block;
    }
}

/* ---------- active section marker ---------- */
.lz-item.is-open>.lz-navlink {
    background: transparent;
}

.lz-item.is-open>.lz-navlink .lz-chev {
    transform: rotate(180deg) translateY(1px);
}

/* ---------- mobile menu: cascade ---------- */
.ham-pop .nav-list>li {
    animation: lz-rise .5s var(--lz-ease) both;
    animation-delay: calc(var(--i, 0) * 45ms);
}

.ham-pop .nav-sublist li {
    animation: lz-rise .42s var(--lz-ease) both;
    animation-delay: calc(var(--i, 0) * 35ms);
}

.ham-pop .nav-sublist {
    overflow: hidden;
}

/* image strip at the top of a mobile accordion section */
.nav-sub-media {
    margin: 10px 0 12px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--lz-ink);
}

.nav-sub-media img {
    display: block;
    width: 100%;
    height: 116px;
    object-fit: cover;
}

/* ---------- reduced motion: everything off ---------- */
@media (prefers-reduced-motion: reduce) {
    .lz-panel {
        clip-path: none;
        transition: none;
    }

    .lz-panel .lz-gh,
    .lz-panel .lz-row,
    .lz-panel .lz-promo,
    .lz-panel .lz-panel-foot {
        opacity: 1;
        transform: none;
        animation: none !important;
    }

    .lz-promo-media img,
    .lz-topbar-marquee>span,
    .ham-pop .nav-list>li,
    .ham-pop .nav-sublist li {
        animation: none !important;
    }

    .lz-navlink::after,
    .lz-navlink .lz-dot,
    .lz-row::before,
    .lz-cta::before {
        transition: none !important;
    }

    .lz-glow {
        display: none;
    }
}

/* ---------- small screens: fewer moving parts ---------- */
@media (max-width: 768px) {
    .lz-promo-media img {
        height: 140px;
    }

    .lz-row:hover {
        padding-left: 10px;
    }
}
