/* ============================================
   HERO.CSS — Ooi Solutions (v4)
   Mascot scroll sequence, bg text,
   sticky wrapper, scroll indicator
   Mobile: bigger images, 20px left/right margins
   Desktop: unchanged from original
   ============================================ */

/* ── STICKY WRAPPER ── */
.sticky-wrap, .sticky-hero {
    max-width: 100%;
    overflow-x: clip;
    margin: 0;
    padding: 0;
}

/* ── MAIN HERO SECTION ── */
.hero-bikebear-style {
    position: relative;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    background-color: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* ── BACKGROUND TEXT ── */
.hero-bg-text-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.hero-bg-text {
    font-family: var(--font-primary);
    font-size: clamp(4.5rem, 16vw, 16rem);
    font-weight: var(--font-weight-black);
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin: 0;
    white-space: nowrap;
    color: var(--accent);
    -webkit-text-stroke: 0px rgba(29, 124, 110, 0);
    will-change: transform, color, -webkit-text-stroke;
}

/* ── MASCOT WRAPPER (DESKTOP) ── */
.mascot-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    z-index: 10;
    width: clamp(260px, 45vw, 550px);
    height: clamp(260px, 45vw, 550px);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0px 25px 45px rgba(0, 0, 0, 0.18));
}

.mascot-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    will-change: opacity, transform, visibility;
}
.mascot-frame-1 {
    opacity: 1;
    visibility: visible;
}
.mascot-frame-2, .mascot-frame-3, .mascot-frame-4 {
    opacity: 0;
    visibility: hidden;
}

/* ── BOTTOM DOCK (Captions & Scroll Indicator) ── */
.hero-bottom-dock {
    position: absolute;
    bottom: clamp(15px, 3vh, 30px);
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    z-index: 20;
}

.hero-foreground-text {
    position: relative;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.caption-group {
    position: absolute;
    width: 100%;
    text-align: center;
    padding: 0 20px;
    opacity: 0;
    visibility: hidden;
    will-change: opacity, transform, visibility;
}
.caption-1 { opacity: 1; visibility: visible; }

.caption-group h2 {
    font-family: var(--font-primary);
    font-size: clamp(1.2rem, 3.5vw, 2.2rem);
    font-weight: var(--font-weight-black);
    color: var(--accent);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── SCROLL INDICATOR ── */
.scroll-indicator {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: var(--font-weight-bold);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    will-change: opacity;
}

.scroll-line {
    width: 2px;
    height: clamp(30px, 4vh, 40px);
    background-color: rgba(29, 124, 110, 0.25);
    overflow: hidden;
    position: relative;
    border-radius: 2px;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--accent);
    animation: scrollLine 2s infinite cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* ── MOBILE: Bigger mascot, 20px margins, fill white space ── */
@media (max-width: 767px) {
    .hero-bikebear-style {
        padding: 0 20px;      /* 20px left/right margins on mobile only */
    }

    .mascot-wrapper {
        width: calc(100vw - 40px);   /* Full width minus 20px margins each side */
        max-width: calc(100vw - 40px);
        height: calc(100vw - 40px);  /* Square aspect ratio matching width */
        transform: translate(-50%, -50%);  /* Center vertically */
        top: 48%;
        filter: drop-shadow(0px 15px 30px rgba(0, 0, 0, 0.15));
    }

    .hero-bg-text {
        font-size: clamp(3.5rem, 14vw, 10rem);
    }

    .caption-group h2 {
        font-size: clamp(0.9rem, 3vw, 1.4rem);
    }

    .hero-bottom-dock {
        bottom: clamp(8px, 2vh, 18px);
        gap: 10px;
    }

    .hero-foreground-text {
        height: 30px;
    }
}

/* ── SMALL MOBILE (< 480px): Even bigger images, fill screen ── */
@media (max-width: 480px) {
    .hero-bikebear-style {
        padding: 0 20px;
    }

    .mascot-wrapper {
        width: calc(100vw - 40px);
        max-width: calc(100vw - 40px);
        height: calc(100vw - 40px);
        top: 46%;
        transform: translate(-50%, -50%);
    }

    .hero-bg-text {
        font-size: clamp(3rem, 13vw, 8rem);
    }

    .hero-bottom-dock {
        bottom: clamp(6px, 1.5vh, 14px);
    }

    .caption-group h2 {
        font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    }
}
