/* ============================================
   KALP Hero — Scroll-Driven Chocolate Unwrap
   ============================================ */

/* The hero section needs enough height for scroll distance */
.kalp-hero-scroll {
    position: relative;
    height: 220vh; /* scroll distance for the unwrap (was 300vh — sped up ~40% on 2026-06-26 user sign-off: bar opens by ~3rd scroll instead of ~5th). Mobile @media below keeps 250vh. */
    background: var(--deep-brown);
}

/* Canvas wrapper stays pinned while user scrolls */
.hero-scroll__canvas-wrapper {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero-canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Overlay Content (appears after unwrap) ---- */
.hero-scroll__overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 10;
    visibility: hidden;
}

.hero-scroll__overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* Ensure overlay hides completely when dismissed */
.hero-scroll__overlay.is-hidden-past {
    display: none;
}

.hero-scroll__content {
    text-align: center;
    padding: 2rem;
    max-width: var(--container-sm);
}

.hero-scroll__subtitle {
    font-family: var(--font-cursive);
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--gold);
    margin-bottom: 0.5rem;
    letter-spacing: 0.1em;
    transform: translateY(20px);
    opacity: 0;
    animation: heroFadeUp 0.8s 0.2s forwards;
}

.hero-scroll__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 300;
    color: var(--cream);
    margin: 0.2em 0;
    letter-spacing: 0.05em;
    transform: translateY(30px);
    opacity: 0;
    animation: heroFadeUp 0.8s 0.4s forwards;
}

.hero-scroll__tagline {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 2vw, 1.15rem);
    color: rgba(255, 248, 238, 0.7);
    line-height: 1.6;
    margin-bottom: 2rem;
    transform: translateY(20px);
    opacity: 0;
    animation: heroFadeUp 0.8s 0.6s forwards;
}

.hero-scroll__ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    transform: translateY(20px);
    opacity: 0;
    animation: heroFadeUp 0.8s 0.8s forwards;
}

.hero-scroll__btn {
    display: inline-block;
    padding: 14px 36px;
    font-family: var(--font-button);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Astra parent's `a:hover` flips link colour to its default theme blue.
   Chain ancestor + use !important on every state so brand colour wins. */
.hero-scroll__btn--primary,
.hero-scroll__btn--primary:visited,
.hero-scroll__cta a.hero-scroll__btn--primary {
    background: var(--gold);
    color: var(--deep-brown) !important;
    border: var(--border-thin) solid var(--gold);
}

.hero-scroll__btn--primary:hover,
.hero-scroll__btn--primary:focus,
.hero-scroll__btn--primary:active,
.hero-scroll__cta a.hero-scroll__btn--primary:hover,
.hero-scroll__cta a.hero-scroll__btn--primary:focus {
    background: var(--gold-light);
    color: var(--deep-brown) !important;
    border-color: var(--gold-light);
}

.hero-scroll__btn--secondary,
.hero-scroll__btn--secondary:visited,
.hero-scroll__cta a.hero-scroll__btn--secondary {
    background: transparent;
    color: var(--gold) !important;
    border: var(--border-thin) solid var(--gold);
}

.hero-scroll__btn--secondary:hover,
.hero-scroll__btn--secondary:focus,
.hero-scroll__btn--secondary:active,
.hero-scroll__cta a.hero-scroll__btn--secondary:hover,
.hero-scroll__cta a.hero-scroll__btn--secondary:focus {
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold-light) !important;
    border-color: var(--gold-light);
}

/* ---- Scroll Hint ---- */
.hero-scroll__scroll-hint {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 15;
    transition: opacity 0.5s ease;
}

.hero-scroll__scroll-hint span {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(201, 168, 76, 0.6);
}

.hero-scroll__scroll-hint.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.hero-scroll__scroll-arrow {
    color: var(--gold);
    animation: bounceDown 1.5s infinite;
}

/* ---- Progress Bar ---- */
.hero-scroll__progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--border-thick);
    background: rgba(201, 168, 76, 0.15);
    z-index: 20;
}

.hero-scroll__progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transition: width 0.05s linear;
}

/* ---- Animations ---- */
@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .kalp-hero-scroll {
        height: 250vh; /* Less scroll distance on mobile */
    }

    .hero-scroll__content {
        padding: 1.5rem;
    }

    .hero-scroll__ctas {
        flex-direction: column;
        align-items: center;
    }

    .hero-scroll__btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .hero-scroll__scroll-hint {
        bottom: 24px;
    }
}

@media (max-width: 480px) {
    .hero-scroll__title {
        font-size: 2.5rem;
    }

    .hero-scroll__subtitle {
        font-size: 1.1rem;
    }
}
