/* ══════════════════════════════════════════
   9. HERO SECTION
   ══════════════════════════════════════════ */
.rx-hero {
    --rx-hero-card-width: 280px;
    --rx-hero-reel-speed: 25s;
    --rx-reel-card-aspect: 280 / 400;

    min-height: 100svh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    /* Pushes content down to safely clear header */
    padding-top: calc(var(--rx-header-safe-top, 80px) + 14vh);
    padding-bottom: var(--rx-section-space-y);
    background-color: var(--rx-dark);
    background-image:
        radial-gradient(circle at 20% 30%, var(--rx-accent-rgba-15, rgba(204, 204, 204, 0.15)) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, var(--rx-accent-2-rgba-10, rgba(153, 153, 153, 0.1)) 0%, transparent 40%);
    text-align: left;
}

@media (max-width: 767px) {
    .rx-hero.rx-hero--mobile {
        align-items: flex-start;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .rx-hero .rx-hero__layout {
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .rx-hero .rx-hero__marquee-viral,
    .rx-hero.rx-hero--mobile .rx-hero__marquee-viral {
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

@media (max-width: 767px) {
    .rx-header__inner {
        padding: 18px 16px;
    }

    .rx-header__right {
        gap: 16px;
    }

    .rx-offcanvas__left {
        padding: 28px 20px;
    }
}

.rx-hero__scroll-down {
    position: absolute;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--rx-white);
    font-size: var(--rx-type-caption-size);
    font-weight: var(--rx-type-caption-weight);
    letter-spacing: calc(var(--rx-type-caption-track) + 0.08em);
    text-transform: uppercase;
    animation: rxScrollBounce 2.4s ease-in-out infinite;
    z-index: 10;
}

@media (max-width: 767px) {

    .rx-hero .rx-hero__scroll-down,
    .rx-hero.rx-hero--mobile .rx-hero__scroll-down {
        display: none;
    }
}

.rx-hero__scroll-line {
    display: block;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--rx-muted), transparent);
}

.rx-hero__layout {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    position: relative;
    z-index: 15;
    flex-wrap: wrap;
}

.rx-hero__content {
    margin-top: clamp(3rem, 8vh, 5rem);
}

.rx-hero__body {
    min-height: 0;
}

@media (min-width: 768px) {
    .rx-hero {
        min-height: 100svh;
        height: auto;
        max-height: none;
        padding-top: calc(var(--rx-header-safe-top, 100px) + 16vh);
        padding-bottom: 0;
    }

    .rx-hero__scroll-down {
        bottom: clamp(4.75rem, 8vh, 6.25rem);
    }

    .rx-hero > .rx-container {
        display: flex;
        flex-direction: column;
        align-self: stretch;
        min-height: calc(100svh - (var(--rx-pp-safe-top, 100px) + 1.25rem));
    }

    .rx-hero__layout {
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
        flex: 1 1 auto;
        min-height: 100%;
        width: 100%;
    }

    .rx-hero__content {
        margin-top: clamp(4rem, 12vh, 8rem);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        min-height: 0;
        flex: 0 0 55%;
        max-width: 48rem;
        min-width: min-content;
        position: relative;
        z-index: 10;
        text-align: left;
        padding-right: clamp(1.5rem, 2.8vw, 2.5rem);
    }

    .rx-hero__title {
        font-size: clamp(3.5rem, 5.8vw, 4.85rem);
        margin-bottom: clamp(0.75rem, 1.8vh, 1.25rem);
    }

    .rx-hero__body {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    .rx-hero__sub {
        max-width: 38rem;
        margin-bottom: clamp(1rem, 2.2vh, 1.45rem);
    }

    .rx-hero__ctas {
        gap: clamp(0.75rem, 1vw, 1rem);
        margin-top: 0;
        margin-bottom: 0;
    }

}

/* VIRAL MARQUEE SYSTEM */
.rx-hero__marquee-viral {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: auto;
    max-width: 45dvw;
    height: auto;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent 0%, transparent calc(var(--rx-header-safe-top, 80px)), black calc(var(--rx-header-safe-top, 80px) + 12vh), black 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent calc(var(--rx-header-safe-top, 80px)), black calc(var(--rx-header-safe-top, 80px) + 12vh), black 100%);
    transition:
        transform 0.6s var(--rx-ease-out),
        max-width 0.6s var(--rx-ease-out),
        opacity 0.6s var(--rx-ease-out);
}

@media (max-width: 767px) {
    .rx-hero__marquee-viral {
        position: relative;
        top: auto;
        bottom: auto;
        right: auto;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 0;
        flex: 1 1 auto;
        align-self: stretch;
        margin-top: clamp(0.4rem, 1dvh, 0.65rem);
        margin-bottom: 0;
        opacity: 1;
        mask-image: linear-gradient(to bottom, transparent, black 5%, black 100%);
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 5%, black 100%);
    }

    .rx-hero .rx-hero__marquee-inner,
    .rx-hero.rx-hero--mobile .rx-hero__marquee-inner {
        justify-content: center;
        padding: 0;
    }
}

.rx-hero__title {
    font-family: var(--rx-font-heading);
    font-size: var(--rx-type-display-hero-size);
    font-weight: 700;
    margin-bottom: 28px;
    letter-spacing: var(--rx-type-display-hero-track);
    text-transform: none;
    line-height: var(--rx-type-display-hero-line);
    color: var(--rx-type-heading-color);
}

@media (max-width: 480px) {
    .rx-hero__title {
        margin-bottom: 20px;
    }
}

.rx-hero__sub {
    display: grid;
    gap: clamp(0.5rem, 1.5vh, 1rem);
    color: var(--rx-type-heading-color);
    max-width: 36rem;
    margin-bottom: clamp(24px, 4vh, 48px);
    font-size: var(--rx-type-body-size);
    line-height: var(--rx-type-body-line);
    padding-left: clamp(0.9rem, 1.3vw, 1.2rem);
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.rx-hero__sub-line {
    display: block;
    text-wrap: balance;
}

.rx-hero__sub-line--primary {
    color: rgba(244, 236, 226, 0.88);
    font-weight: 400;
    letter-spacing: 0;
}

.rx-hero__sub-line--secondary {
    color: rgba(255, 255, 255, 0.97);
    font-family: var(--rx-font-heading);
    font-size: clamp(1.2rem, 1.6vw, 1.5rem);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.rx-hero__ctas {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: clamp(1rem, 2vh, 1.5rem);
    margin-bottom: clamp(24px, 4vh, 60px);
    flex-wrap: wrap;
}

@media (max-width: 480px) {

    .rx-hero .rx-hero__ctas,
    .rx-hero.rx-hero--mobile .rx-hero__ctas {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 12px;
    }

    .rx-hero .rx-hero__ctas .rx-btn,
    .rx-hero.rx-hero--mobile .rx-hero__ctas .rx-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

.rx-hero__ctas .rx-btn {
    transition: transform 0.3s var(--rx-ease-out), box-shadow 0.3s var(--rx-ease-out);
}

.rx-hero__ctas .rx-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px var(--rx-accent-rgba-20, rgba(204, 204, 204, 0.2));
}

/* HORIZONTAL STATS MARQUEE */
.rx-hero__stats-marquee {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    margin-top: auto;
    margin-bottom: 0;
    padding: 0.7rem 0 0;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .rx-hero__stats-marquee {
        margin-top: auto;
        padding-top: clamp(0.9rem, 1.75vh, 1.25rem);
        padding-bottom: 0;
        mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
    }
}

.rx-hero__stats-track {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 3.5vw, 3.75rem);
    width: max-content;
    animation: rxStatsMarquee 30s linear infinite;
}

.rx-hero__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    min-width: 140px;
    opacity: 1;
    transform: translateY(0);
    transition: none;
}

@keyframes rxStatsMarquee {
    0% {
        transform: translateX(0);
    }

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

.rx-hero__stat strong {
    font-size: clamp(18px, 3vw, 24px);
    font-family: var(--rx-font-heading);
    color: var(--rx-white);
    font-weight: 700;
}

.rx-hero__stat span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--rx-muted);
    line-height: 1.35;
    white-space: nowrap;
}

/* MARQUEE STYLES */
.rx-hero__marquee-inner {
    display: flex;
    justify-content: flex-end;
    gap: clamp(0.625rem, 1.8vw, 1.875rem);
    height: 100%;
    padding: clamp(0.5rem, 1.5vw, 1.25rem);
}

.rx-hero__marquee-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: var(--rx-hero-card-width, 282px);
    flex-shrink: 0;
    pointer-events: auto;
}

.rx-hero__marquee-track {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    flex-shrink: 0;
    padding-bottom: 0px;
    will-change: transform;
}

.rx-hero__marquee-col:empty {
    display: none;
}

.rx-hero__marquee-col--up .rx-hero__marquee-track {
    animation: rxMarqueeUp var(--rx-hero-reel-speed, 22s) linear infinite;
}

.rx-hero__marquee-col--down {
    margin-top: -160px;
}

.rx-hero__marquee-col--down .rx-hero__marquee-track {
    animation: rxMarqueeDown var(--rx-hero-reel-speed, 22s) linear infinite;
}

/* Viral Reel Card Fidelity */
.rx-hero__marquee-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: var(--rx-reel-card-aspect, 9/16);
    background: var(--rx-dark-2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s var(--rx-ease-out), border-color 0.4s ease;
    flex-shrink: 0;
    contain: paint;
}

.rx-hero__marquee-img,
.rx-hero__marquee-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--rx-ease-out);
}

.rx-hero__marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.4s ease;
}

.rx-hero__marquee-item:hover {
    border-color: var(--rx-accent);
}

.rx-hero__marquee-item:hover img {
    opacity: 1;
}

.rx-hero__marquee-item--empty {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.06);
}

.rx-hero__marquee-item--empty:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255, 255, 255, 0.06);
}

/* Social Icon (Reelongo Style) */
.rx-hero__marquee-social-icon {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    width: 2.25rem;
    height: 2.25rem;
    color: white;
    z-index: 5;
    opacity: 0.8;
}

.rx-hero__marquee-social-icon svg {
    width: 100%;
    height: 100%;
}

@media (min-width: 768px) {
    .rx-hero__marquee-viral {
        top: 0;
        bottom: 0;
        mask-image: linear-gradient(to bottom, transparent 0%, transparent calc(var(--rx-header-safe-top, 100px) - 2rem), black calc(var(--rx-header-safe-top, 100px) + 2rem), black 100%);
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent calc(var(--rx-header-safe-top, 100px) - 2rem), black calc(var(--rx-header-safe-top, 100px) + 2rem), black 100%);
    }

    .rx-hero__marquee-inner {
        align-items: stretch;
        padding: 0 0 0 clamp(0.5rem, 1.1vw, 0.95rem);
    }

    .rx-hero__marquee-track {
        padding-bottom: 0;
    }
}

@media (min-width: 768px) and (max-width: 1600px) {
    .rx-hero__title {
        font-size: clamp(2.85rem, 4.7vw, 4.15rem);
        line-height: 1.01;
    }

    .rx-hero__marquee-viral {
        top: 0;
    }

    .rx-hero__marquee-inner {
        transform: translateY(clamp(0.55rem, 0.95vw, 0.95rem));
    }
}

/* Mobile Adjustments (Viral Mode) */

/* MARQUEE KEYFRAMES */
@keyframes rxMarqueeUp {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-100%);
    }
}

@keyframes rxMarqueeDown {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(0);
    }
}

/* Hero Background Grid Animation */
@keyframes rxGridPan {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 40px 40px;
    }
}

@media (min-width: 48rem) and (prefers-reduced-motion: no-preference) {
    .rx-hero {
        animation: rxGridPan 10s linear infinite;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rx-hero__stats-track,
    .rx-hero__marquee-track {
        animation: none !important;
    }
}

@media (max-width: 47.9375rem) {
    .rx-hero {
        animation: none;
    }

    .rx-hero__marquee-item {
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
    }
}

/* -------------------------------------------------------
   Inner Page Banners
   ------------------------------------------------------- */
.rx-page-hero {
    padding-top: calc(var(--rx-header-safe-top) + clamp(1rem, 2vw, 1.75rem));
    padding-bottom: clamp(1.5rem, 2.8vw, 2.4rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rx-page-hero .rx-container {
    display: grid;
    gap: 0.9rem;
}

.rx-page-hero__title {
    margin: 0;
    max-width: 18ch;
    font-size: var(--rx-type-display-page-size);
    line-height: var(--rx-type-display-page-line);
    letter-spacing: var(--rx-type-display-page-track);
}

@media (max-width: 767px) {
    .rx-page-hero {
        padding-top: calc(var(--rx-header-safe-top) - 0.75rem);
    }

    .rx-page-hero__title {
        max-width: 100%;
    }
}

/* ==========================================
   HERO RESPONSIVE STYLES
   ========================================== */

@media (max-width: 992px) {
    .rx-hero__body {
        flex-direction: column;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .rx-hero__title {
        font-size: var(--rx-type-display-hero-size);
    }
}

@media (max-width: 47.9375rem) {

    body .rx-hero,
    body .rx-hero.rx-hero--mobile {
        min-height: 100svh;
        height: 100svh;
        justify-content: flex-start;
        padding-top: calc(var(--rx-header-safe-top) + clamp(0.15rem, 0.7dvh, 0.35rem));
        padding-bottom: 0;
    }

    .rx-hero .rx-container {
        display: grid;
        flex: 1 1 auto;
        width: 100%;
        min-height: 0;
    }

    .rx-hero__layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        width: 100%;
        min-height: 100%;
        gap: clamp(0.55rem, 1.3dvh, 0.8rem);
        align-content: stretch;
    }

    .rx-hero__content {
        margin-top: 0;
        max-width: min(100%, 28.5rem);
        flex: 0 0 auto;
    }

    .rx-hero__title {
        margin-bottom: clamp(0.35rem, 0.9dvh, 0.6rem);
        font-size: clamp(1.9rem, 8.3vw, 2.95rem);
        line-height: 1.02;
    }

    .rx-hero__sub {
        margin-bottom: clamp(0.6rem, 1.5dvh, 0.9rem);
        max-width: 100%;
        gap: 0.55rem;
        padding-left: 0.75rem;
        border-left-width: 2px;
    }

    .rx-hero__sub-line--primary {
        font-size: clamp(0.875rem, 3.7vw, 1rem);
        line-height: 1.55;
        color: rgba(244, 236, 226, 0.83);
        font-weight: 400;
        letter-spacing: 0.01em;
    }

    .rx-hero__sub-line--secondary {
        font-size: clamp(0.9rem, 3.8vw, 1.05rem);
        line-height: 1.45;
        font-weight: 600;
        font-family: var(--rx-font-body);
        color: rgba(255, 255, 255, 0.96);
        letter-spacing: 0;
        margin-top: 0.1rem;
    }

    .rx-hero__ctas {
        flex-direction: column;
        width: 100%;
        gap: 1.25rem;
        margin-top: clamp(1.5rem, 3vh, 2rem);
        margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
    }

    .rx-hero__ctas .rx-btn {
        width: 100%;
        justify-content: center;
        min-height: 3.25rem;
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }

    .rx-hero__stats-marquee {
        padding-top: 0.4rem;
    }

    .rx-hero__stats-track {
        gap: 3rem;
    }

    .rx-hero__marquee-viral {
        flex: 1 1 auto;
        align-self: stretch;
        width: 100%;
        min-height: 0;
        max-height: none;
        margin-top: clamp(0.4rem, 1dvh, 0.65rem);
        margin-bottom: 0;
    }

    .rx-hero__marquee-inner {
        justify-content: center;
        gap: 15px;
        padding: 0;
    }

    .rx-hero__marquee-col {
        width: calc(50% - 7.5px);
        max-width: none;
        gap: 15px;
    }

    .rx-hero__marquee-track {
        gap: 15px;
        padding-bottom: 0;
    }

    .rx-hero__marquee-col--down {
        margin-top: -4.5rem;
    }

    .rx-hero__stat strong {
        font-size: clamp(1rem, 4.1vw, 1.2rem);
    }

    .rx-hero__stat span {
        font-size: 0.56rem;
        line-height: 1.25;
    }
}

/* Reveal clip for text lines */
.rx-hero__title-line {
    display: block;
    overflow: hidden;
    vertical-align: top;
}
