/* ============================================================
   HERO HEADLINE: "Reels. Reach. Revenue."
   Words rise in one by one, the red full stops pop in, then a
   red paint wipe and hand-drawn underline take turns on each
   word (driven by js/hero-rrr.js).
============================================================ */

.hero-rrr {
    --rrr-base: #ffffff;
    --rrr-paint: linear-gradient(100deg, #ff4d63 0%, #c51538 55%, #ff7a59 100%);

    letter-spacing: 0;
}

body.light .hero-rrr {
    --rrr-base: #171313;
}

.rrr-word {
    position: relative;
    display: inline-block;
    margin: 0 .12em;
}

/* Mask that hides each word until it rises into view */
.rrr-mask {
    display: inline-block;
    overflow: hidden;
    padding: .04em .04em .1em;
    vertical-align: bottom;
}

.rrr-inner {
    display: inline-block;

    color: transparent;
    -webkit-text-fill-color: transparent;

    background-image:
        var(--rrr-paint),
        linear-gradient(var(--rrr-base), var(--rrr-base));
    background-size: 0% 100%, 100% 100%;
    background-position: left center, left center;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;

    transform: translateY(110%) rotate(6deg);
    transform-origin: left bottom;

    animation: rrr-rise .95s cubic-bezier(.2, .85, .2, 1) forwards;
    animation-delay: calc(.2s + var(--i) * .22s);

    transition: background-size .9s cubic-bezier(.65, 0, .35, 1);
}

.rrr-dot {
    display: inline-block;

    -webkit-text-fill-color: var(--red-light);
    color: var(--red-light);

    transform: scale(0);
    transform-origin: 50% 80%;

    animation: rrr-pop .5s cubic-bezier(.3, 1.8, .5, 1) forwards;
    animation-delay: calc(.85s + var(--i) * .22s);
}

/* Hand-drawn underline */
.rrr-swoosh {
    position: absolute;
    left: 4%;
    bottom: .02em;

    width: 88%;
    height: .2em;

    overflow: visible;
    pointer-events: none;
}

.rrr-swoosh path {
    fill: none;
    stroke: var(--red-light);
    stroke-width: 3.5;
    stroke-linecap: round;

    stroke-dasharray: 1;
    stroke-dashoffset: 1;
}

/* After the intro, drop the entrance animations so class changes
   below never replay them */
.hero-rrr.is-ready .rrr-inner,
.hero-rrr.is-ready .rrr-dot {
    animation: none;
    transform: none;
}

/* Active word: red paint wipes across, underline draws in, dot bounces */
.rrr-word.is-active .rrr-inner {
    background-size: 100% 100%, 100% 100%;
}

.rrr-word.is-active .rrr-swoosh path {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset .6s cubic-bezier(.65, 0, .35, 1) .35s;
}

.hero-rrr.is-ready .rrr-word.is-active .rrr-dot {
    animation: rrr-bounce .6s cubic-bezier(.3, 1.6, .5, 1);
}

/* Leaving word: paint and underline both exit to the right */
.rrr-word.is-leaving .rrr-inner {
    background-position: right center, left center;
}

.rrr-word.is-leaving .rrr-swoosh path {
    stroke-dashoffset: -1;
    transition: stroke-dashoffset .5s cubic-bezier(.65, 0, .35, 1);
}

@keyframes rrr-rise {
    to {
        transform: translateY(0) rotate(0);
    }
}

@keyframes rrr-pop {
    to {
        transform: scale(1);
    }
}

@keyframes rrr-bounce {
    0% {
        transform: scale(1) translateY(0);
    }

    40% {
        transform: scale(1.35) translateY(-.12em);
    }

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

/* Slow breathing glow behind the headline */
.hero-section .hero-background {
    animation: rrr-glow 7s ease-in-out infinite alternate;
}

@keyframes rrr-glow {
    from {
        transform: scale(1);
        opacity: .85;
    }

    to {
        transform: scale(1.12);
        opacity: 1;
    }
}


/* MOBILE: stack the three words, one per line */

@media (max-width: 576px) {

    .hero-title.hero-rrr {
        font-size: clamp(40px, 12.5vw, 54px);
        line-height: 1.02;
    }

    .rrr-word {
        display: block;
        width: max-content;
        margin: 0 auto;
    }

}


@media (prefers-reduced-motion: reduce) {

    .rrr-inner,
    .rrr-dot {
        animation: none;
        transform: none;
    }

    .rrr-inner,
    .rrr-swoosh path {
        transition: none;
    }

    .rrr-word.is-active .rrr-dot {
        animation: none;
    }

    .hero-section .hero-background {
        animation: none;
    }

}


/* ============================================================
   COMPACT FIRST SCREEN
   Shorter hero so the 625k+ / Followed by cards show without
   scrolling. Headline sits on one line from tablet up.
============================================================ */

.hero-section {
    min-height: 0;
}

.hero-container {
    padding: 60px 20px 48px;
}

@media (min-width: 577px) {

    .hero-title.hero-rrr {
        font-size: clamp(44px, 6vw, 96px);
        line-height: 1.1;
    }

}

.hero-section .hero-buttons {
    margin-top: 28px;
}

.hero-section .hero-social-links {
    margin-top: 20px;
}

.social-showcase-section {
    padding-top: 32px;
}

@media (max-width: 767px) {

    .hero-section {
        min-height: 0;
    }

    .hero-container {
        padding: 40px 15px 32px;
    }

    .hero-section .hero-buttons {
        margin-top: 24px;
        gap: 10px;
    }

    .hero-section .hero-social-links {
        margin-top: 20px;
    }

    .social-showcase-section {
        padding-top: 20px;
    }

}
