/* Explain: Styles for the interactive golden zipper reveal animation. */
/* ==========================================================
   Premium interactive golden zipper
   STRICTLY scoped to #growthZipper (Growth Methodology only).
   Every selector is prefixed with #growthZipper, so no rule
   here can reach any other section, page or shared component.
   ========================================================== */

#growthZipper {
    position: relative;
    isolation: isolate;
    --z-progress: 0;
    --z-y: 0%;
    --z-slider-top: 0px;
    --z-fold: clamp(9px, 1.05vw, 14px);
    --z-veil-opacity: calc(1 - (max(0, var(--z-progress) - 0.92) * 16));
    --z-fabric: #123c58;
    --z-fabric-edge: #071a2b;
}

#growthZipper .zipper__content {
    position: relative;
    z-index: 1;
}

#growthZipper .zipper__item {
    opacity: 1;
    transform: none;
}

/* ---------- Veil (kept inside the component box) ---------- */

#growthZipper .zipper__veil {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: var(--z-veil-opacity);
}

#growthZipper.is-live .zipper__veil {
    display: block;
}

/* ---------- Fabric panels ---------- */

#growthZipper .zipper__half {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    pointer-events: auto;
    background-color: var(--z-fabric);
    background-image:
        radial-gradient(120% 70% at 50% 0%, rgba(53, 184, 176, 0.26), rgba(18, 60, 88, 0) 62%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.34)),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.045) 0 1px, rgba(255, 255, 255, 0) 1px 4px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0 1px, rgba(255, 255, 255, 0) 1px 4px);
    will-change: clip-path;
}

#growthZipper .zipper__half--l {
    left: 0;
    border-radius: 26px 0 0 26px;
    clip-path: polygon(
        0 0,
        0 100%,
        100% 100%,
        100% calc(var(--z-slider-top) + 16px),
        calc(100% - var(--z-progress) * 28%) calc(var(--z-slider-top) * 0.82),
        calc(100% - var(--z-progress) * 100%) calc(var(--z-slider-top) * 0.42),
        calc(100% - var(--z-progress) * 185%) 0
    );
}

#growthZipper .zipper__half--r {
    right: 0;
    border-radius: 0 26px 26px 0;
    clip-path: polygon(
        100% 0,
        100% 100%,
        0 100%,
        0 calc(var(--z-slider-top) + 16px),
        calc(var(--z-progress) * 28%) calc(var(--z-slider-top) * 0.82),
        calc(var(--z-progress) * 100%) calc(var(--z-slider-top) * 0.42),
        calc(var(--z-progress) * 185%) 0
    );
}

/* ---------- Folded-over fabric edges along the opened part ---------- */

#growthZipper .zipper__fold {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 6;
    pointer-events: none;
    opacity: calc(var(--z-progress) * 3);
    background-color: var(--z-fabric);
    will-change: clip-path, opacity;
}

#growthZipper .zipper__fold--l {
    left: 0;
    border-radius: 26px 0 0 26px;
    background-image: linear-gradient(103deg,
        rgba(150, 208, 220, 0.46) 0%,
        rgba(84, 152, 172, 0.42) 15%,
        rgba(34, 92, 118, 0.45) 40%,
        rgba(12, 38, 58, 0.48) 72%,
        rgba(4, 16, 28, 0.45) 100%);
    filter: drop-shadow(9px 12px 14px rgba(0, 0, 0, 0.28));
    clip-path: polygon(
        calc(100% - var(--z-progress) * 185%) 0,
        calc(100% - var(--z-progress) * 100%) calc(var(--z-slider-top) * 0.42),
        calc(100% - var(--z-progress) * 28%) calc(var(--z-slider-top) * 0.82),
        100% calc(var(--z-slider-top) + 16px),
        calc(100% - var(--z-progress) * 28% + var(--z-fold)) calc(var(--z-slider-top) * 0.82),
        calc(100% - var(--z-progress) * 100% + var(--z-fold)) calc(var(--z-slider-top) * 0.42),
        calc(100% - var(--z-progress) * 185% + var(--z-fold)) 0
    );
}

#growthZipper .zipper__fold--r {
    right: 0;
    border-radius: 0 26px 26px 0;
    background-image: linear-gradient(257deg,
        rgba(150, 208, 220, 0.46) 0%,
        rgba(84, 152, 172, 0.42) 15%,
        rgba(34, 92, 118, 0.45) 40%,
        rgba(12, 38, 58, 0.48) 72%,
        rgba(4, 16, 28, 0.45) 100%);
    filter: drop-shadow(-9px 12px 14px rgba(0, 0, 0, 0.28));
    clip-path: polygon(
        calc(var(--z-progress) * 185%) 0,
        calc(var(--z-progress) * 100%) calc(var(--z-slider-top) * 0.42),
        calc(var(--z-progress) * 28%) calc(var(--z-slider-top) * 0.82),
        0 calc(var(--z-slider-top) + 16px),
        calc(var(--z-progress) * 28% - var(--z-fold)) calc(var(--z-slider-top) * 0.82),
        calc(var(--z-progress) * 100% - var(--z-fold)) calc(var(--z-slider-top) * 0.42),
        calc(var(--z-progress) * 185% - var(--z-fold)) 0
    );
}

html[data-theme="light"] #growthZipper .zipper__half {
    background-color: #1b5c7e;
}

html[data-theme="light"] #growthZipper .zipper__fold {
    background-color: #1b5c7e;
}

/* ---------- Golden seam on the still-closed part ---------- */

#growthZipper .zipper__seam {
    position: absolute;
    left: 50%;
    top: calc(var(--z-slider-top) + 16px);
    bottom: 0;
    width: 20px;
    margin-left: -10px;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    pointer-events: none;
    z-index: 7;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.24) 14%, rgba(0, 0, 0, 0.24) 100%);
}

#growthZipper .zipper__teeth {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.4) 100%),
        repeating-linear-gradient(180deg,
            #fff2cf 0px, #f0d489 2px, #c99a3c 6px, #7d5714 9px,
            rgba(0, 0, 0, 0) 9px, rgba(0, 0, 0, 0) 15px);
}

#growthZipper .zipper__teeth--l {
    left: 0;
}

#growthZipper .zipper__teeth--r {
    right: 0;
    background-position: 0 0, 0 7px;
}

/* ---------- Warm glow following the slider ---------- */

#growthZipper .zipper__glow {
    position: absolute;
    left: 50%;
    top: calc(var(--z-slider-top) + 26px);
    width: 220px;
    height: 180px;
    margin-left: -110px;
    margin-top: -90px;
    background: radial-gradient(circle, rgba(255, 199, 108, 0.13), rgba(255, 170, 50, 0) 70%);
    pointer-events: none;
    z-index: 8;
}

/* ---------- Golden slider + pull tab ---------- */

#growthZipper .zipper__slider {
    display: none;
}

#growthZipper.is-live .zipper__slider {
    display: block;
    position: absolute;
    left: 50%;
    top: var(--z-slider-top);
    width: 42px;
    height: 64px;
    margin-left: -21px;
    z-index: 9;
    cursor: grab;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    opacity: var(--z-veil-opacity);
}

#growthZipper .zipper__slider:active,
#growthZipper .zipper__slider.is-dragging {
    cursor: grabbing;
}

#growthZipper .zipper__slider-top {
    position: relative;
    display: block;
    height: 34px;
    border-radius: 10px 10px 7px 7px;
    background: linear-gradient(180deg, #fff6d6 0%, #efd489 26%, #c1912f 62%, #8a6318 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -2px 3px rgba(0, 0, 0, 0.4),
        0 0 16px rgba(255, 196, 84, 0.5),
        0 6px 12px rgba(0, 0, 0, 0.45);
    transition: box-shadow 220ms ease, filter 220ms ease;
}

#growthZipper .zipper__slider-top::before {
    content: "";
    position: absolute;
    inset: 7px 9px;
    border-radius: 4px;
    background-image: repeating-linear-gradient(0deg,
        rgba(120, 80, 10, 0.55) 0 1px,
        rgba(255, 255, 255, 0.35) 1px 3px);
    opacity: 0.85;
}

#growthZipper .zipper__slider-pull {
    display: block;
    width: 20px;
    height: 30px;
    margin: 3px auto 0;
    border-radius: 0 0 10px 10px;
    border: 2px solid #b8892f;
    border-top-color: #efd489;
    background: linear-gradient(180deg, rgba(214, 166, 60, 0.95), rgba(86, 60, 14, 0.95));
    box-shadow:
        0 0 14px rgba(255, 196, 84, 0.4),
        inset 0 0 7px rgba(255, 255, 255, 0.3),
        0 4px 10px rgba(0, 0, 0, 0.4);
}

#growthZipper .zipper__slider:hover .zipper__slider-top,
#growthZipper .zipper__slider:focus-visible .zipper__slider-top {
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -2px 3px rgba(0, 0, 0, 0.4),
        0 0 24px rgba(255, 196, 84, 0.75),
        0 6px 12px rgba(0, 0, 0, 0.45);
}

#growthZipper .zipper__slider:focus-visible .zipper__slider-top {
    outline: 2px solid rgba(255, 214, 130, 0.9);
    outline-offset: 3px;
}

#growthZipper:not(.is-open) .zipper__slider-pull {
    animation: zipperPullHint 2.8s ease-in-out infinite;
}

/* ---------- Drag hint ---------- */

#growthZipper .zipper__hint {
    position: absolute;
    left: 50%;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 196, 84, 0.4);
    background: rgba(3, 14, 26, 0.62);
    color: #ffe6a8;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
    transform: translateX(-50%);
    opacity: calc(1 - var(--z-progress) * 1.4);
}

#growthZipper .zipper__hint i {
    font-size: 0.7rem;
}

/* ---------- Responsive tuning ---------- */

@media (max-width: 767px) {
    #growthZipper {
        --z-fold: clamp(7px, 2vw, 11px);
    }

    #growthZipper .zipper__half--l {
        border-radius: 18px 0 0 18px;
    }

    #growthZipper .zipper__half--r {
        border-radius: 0 18px 18px 0;
    }

    #growthZipper .zipper__fold--l {
        border-radius: 18px 0 0 18px;
    }

    #growthZipper .zipper__fold--r {
        border-radius: 0 18px 18px 0;
    }

    #growthZipper .zipper__seam {
        width: 16px;
        margin-left: -8px;
        border-radius: 0 0 8px 8px;
    }

    #growthZipper .zipper__teeth {
        width: 8px;
        background-size: auto, 100% 12px;
    }

    #growthZipper .zipper__slider {
        width: 36px;
        height: 55px;
        margin-left: -18px;
    }

    #growthZipper .zipper__slider-top {
        height: 28px;
    }

    #growthZipper .zipper__slider-pull {
        width: 16px;
        height: 24px;
    }

    #growthZipper .zipper__glow {
        width: 170px;
        height: 140px;
        margin-left: -85px;
        margin-top: -70px;
    }

    #growthZipper .zipper__hint {
        bottom: 10px;
        font-size: 0.66rem;
        padding: 0.3rem 0.7rem;
    }
}

/* ---------- Keyframes ---------- */

@keyframes zipperPullHint {
    0%, 100% {
        transform: translateY(0);
        box-shadow: 0 0 14px rgba(255, 196, 84, 0.4), inset 0 0 7px rgba(255, 255, 255, 0.3), 0 4px 10px rgba(0, 0, 0, 0.4);
    }
    50% {
        transform: translateY(4px);
        box-shadow: 0 0 22px rgba(255, 196, 84, 0.7), inset 0 0 7px rgba(255, 255, 255, 0.3), 0 4px 10px rgba(0, 0, 0, 0.4);
    }
}

/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
    #growthZipper .zipper__half,
    #growthZipper .zipper__fold,
    #growthZipper .zipper__hint,
    #growthZipper .zipper__slider-top {
        transition: none !important;
    }

    #growthZipper:not(.is-open) .zipper__slider-pull {
        animation: none !important;
    }
}