/**
 * KingsHelp — Hero Banner System
 * Isolated CSS: .hero-stage, .hero-banner, micro-animations.
 * Uses only .hero-* / .hb-* / .hn-* prefixes. Zero conflict with style.css.
 */

/* ══════════════════════════════════════════════════════
   BANNER STAGE
══════════════════════════════════════════════════════ */

/* Alt FX: iOS notifications stack */
.kh-ios-stack {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(260px, 74%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.kh-ios-notif {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 16px 44px rgba(10, 18, 40, 0.14);
    display: grid;
    grid-template-columns: 10px 1fr;
    gap: 10px;
    align-items: start;
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    will-change: transform, opacity;
}

html[data-theme="dark"] .kh-ios-notif {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
}

.kh-ios-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(33, 82, 173, 0.95), rgba(82, 49, 148, 0.90));
    box-shadow: 0 0 0 3px rgba(33, 82, 173, 0.12);
    margin-top: 3px;
}

.kh-ios-title {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: rgba(15, 23, 42, 0.90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kh-ios-sub {
    margin-top: 2px;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.55);
}

html[data-theme="dark"] .kh-ios-title {
    color: rgba(237, 240, 248, 0.92);
}

html[data-theme="dark"] .kh-ios-sub {
    color: rgba(237, 240, 248, 0.62);
}

@media (prefers-reduced-motion: reduce) {
    .kh-ios-notif {
        opacity: 1;
        transform: none;
        will-change: auto;
    }
}

.hero-stage {
    position: relative;
    width: 100%;
    /* Fixed viewport stage so banners can't collapse/flicker */
    height: calc(100vh - 104px);
    height: calc(100svh - 104px);
    min-height: 620px;
    overflow: hidden;
}

/* Stage padding handled by .hero */
.hero-stage {
    padding: 0;
}

/* ── Individual banner ─────────────────────────────── */
.hero-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    display: flex;
    align-items: center;
    /* Start hidden */
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    transition:
        opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: visible;
}

/* Active banner */
.hero-banner--active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Exiting banner */
.hero-banner--exit {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

.hero-banner > .container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hero-banner > .container > * {
    position: relative;
    z-index: 1;
}

/* Ensure no legacy corner decal appears in hero */
.hero-corner {
    display: none !important;
}

.hero-stage {
    background: none !important;
}

/* Shared grid for hero banners */
.hero-banner-grid {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(26px, 4vw, 70px);
    align-items: center;
}

.hb3-spacer {
    min-height: 1px;
}

/* Banner 0 — left copy + right media */
.hero-banner[data-banner="0"] .hb0-layout {
    margin: 0 auto;
}

.hero-banner[data-banner="0"] > .container {
    padding-left: 0;
    padding-right: 0;
}

.hero-banner[data-banner="0"] .hb0-inner {
    max-width: 720px;
    margin: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.hero-banner[data-banner="0"] .hb0-media {
    flex: 0 0 clamp(220px, 28vw, 360px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
    justify-self: end;
}

.hero-banner[data-banner="0"] .hb0-media img {
    width: 100%;
    height: auto;
    max-width: 580px;
    display: block;
    transform: translateY(100px) scale(1.7);
    transform-origin: right center;
}

.hero-banner.hero-banner--active[data-banner="0"] .hb0-media img {
    animation: hbMediaIn 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes hbMediaIn {
    from { opacity: 0; transform: translateY(130px) scale(1.62); }
    to { opacity: 1; transform: translateY(100px) scale(1.7); }
}

.hero-banner[data-banner="0"] .hero-sub {
    max-width: 48rem;
    text-align: left;
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    width: 100%;
}

.hero-sub-cycle {
    position: relative;
    width: 100%;
    max-width: 48rem;
    margin: 8px 0 0;
    text-align: left;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    min-height: calc(1.6em * 2);
}

.hero-sub-cycle .hero-sub-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 320ms ease, transform 320ms ease;
    will-change: opacity, transform;
}

.hero-sub-cycle .hero-sub-text.is-out {
    opacity: 0;
    transform: translateY(4px);
}

@media (prefers-reduced-motion: reduce) {
    .hero-sub-cycle .hero-sub-text {
        transition: none;
        transform: none;
    }
}

.hero-banner[data-banner="0"] .hero-title {
    text-align: left;
    line-height: 1.08;
    padding-bottom: 0.08em;
}

/* ── Typewriter titles (banner headings) ───────────────────────── */
.kh-type {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: bottom;
    width: auto;
    /* Prevent clipping of glyphs (e.g. "ó") during reveal */
    padding-right: 0.18em;
}

/* Ensure width animation works reliably on inline spans */
.hero-title .kh-type,
.hb3-title .kh-type {
    display: inline-block;
    padding-bottom: 0.08em;
}

/* Typewriter reveal (domino: line1 then line2) */
.hero-banner.hero-banner--active .kh-type {
    clip-path: inset(0 100% 0 0);
}

.hero-banner.hero-banner--active .kh-type--line1 {
    animation:
        khTypeClip var(--kh-type-dur1, 1200ms) steps(var(--kh-type-steps1, 16), end) both,
        khTypeJitter 520ms steps(2, end) 2 both;
}

.hero-banner.hero-banner--active .kh-type--line2 {
    animation:
        khTypeClip var(--kh-type-dur2, 1100ms) steps(var(--kh-type-steps2, 14), end) both,
        khTypeJitter 520ms steps(2, end) 2 both;
    animation-delay: calc(var(--kh-type-dur1, 1200ms) + var(--kh-type-gap, 140ms));
}

/* Restart typewriter when a banner becomes active */
.hero-banner:not(.hero-banner--active) .kh-type {
    animation: none !important;
    clip-path: inset(0 100% 0 0);
}

.hero-banner:not(.hero-banner--active) .kh-type::after {
    animation: none !important;
    opacity: 0 !important;
}

/* line2 delay handled above */

@keyframes khTypeClip {
    from { clip-path: inset(0 calc(100% + 0.2em) 0 0); }
    to { clip-path: inset(0 -0.2em 0 0); }
}

@keyframes khTypeJitter {
    0% { transform: translate3d(0, 0, 0); }
    25% { transform: translate3d(0.3px, 0, 0); }
    55% { transform: translate3d(-0.2px, 0, 0); }
    100% { transform: translate3d(0, 0, 0); }
}

/* Text caret */
.hero-banner.hero-banner--active .kh-type::after {
    content: '|';
    display: inline-block;
    margin-left: 0.08em;
    color: currentColor;
    opacity: 0.78;
    transform: translateY(0.02em);
    animation: khCaretBlink 720ms step-end infinite;
}

/* Domino caret: show on current line only */
.hero-banner.hero-banner--active .kh-type--line1::after {
    opacity: 0;
    animation:
        khCaretBlink 720ms step-end infinite,
        khCaretLife var(--kh-type-dur1, 1200ms) steps(1, end) both;
}

.hero-banner.hero-banner--active .kh-type--line2::after {
    opacity: 0;
    animation:
        khCaretBlink 720ms step-end infinite,
        khCaretLife var(--kh-type-dur2, 1100ms) steps(1, end) both,
        khCaretGlitch 2600ms steps(1, end) infinite;
    animation-delay:
        calc(var(--kh-type-dur1, 1200ms) + var(--kh-type-gap, 140ms)),
        calc(var(--kh-type-dur1, 1200ms) + var(--kh-type-gap, 140ms)),
        calc(var(--kh-type-dur1, 1200ms) + var(--kh-type-gap, 140ms));
}

@keyframes khCaretBlink {
    50% { opacity: 0; }
}

@keyframes khCaretLife {
    0% { opacity: 0.92; }
    99% { opacity: 0.92; }
    100% { opacity: 0; }
}

@keyframes khCaretGlitch {
    0%, 92%, 100% { filter: none; transform: translateY(0.02em); }
    93% { filter: drop-shadow(0 0 10px rgba(41, 90, 173, 0.55)); transform: translate3d(0.5px, 0.02em, 0); }
    95% { filter: drop-shadow(0 0 10px rgba(201, 168, 76, 0.45)); transform: translate3d(-0.4px, 0.02em, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-banner.hero-banner--active .kh-type { animation: none; }
    .hero-banner.hero-banner--active .kh-type::after { animation: none; opacity: 0; }
}

.hero-banner[data-banner="0"] .hero-chips {
    justify-content: flex-start;
}

.hero-banner[data-banner="0"] .hero-cta {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-banner[data-banner="0"] .hero-eyebrow {
    justify-content: flex-start;
}

.hero-banner[data-banner="0"] .hb0-tagline {
    margin: 2px 0 10px;
    font-size: clamp(16px, 1.7vw, 20px);
    font-weight: 800;
    color: var(--text-soft);
    opacity: 0.95;
}

/* Banner 1 (demo) — 2-col grid */
.hero-banner[data-banner="1"] .hero-inner {
    display: grid;
    gap: 64px;
    align-items: center;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
}

.hero-banner[data-banner="1"] .hero-inner {
    grid-template-columns: 0.7fr 1fr;
}

/* Allow demo phone shadows to overflow */
.hero-banner[data-banner="1"] {
    overflow: visible;
}

.hero-banner[data-banner="1"] > .container {
    overflow: visible;
    padding-left: 0;
    padding-right: 0;
}

.hero-banner[data-banner="1"] .hb2p-inner {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Banner 3 — centered single column (no forced viewport math) */
.hero-banner[data-banner="2"] {
    overflow: visible;
    /* Prevent overlap with the top progress selector */
    padding-top: 28px;
    padding-bottom: 24px;
    box-sizing: border-box;
}

.hero-banner[data-banner="2"] .container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-top: clamp(12px, 2.4vh, 28px);
    padding-bottom: clamp(12px, 2.4vh, 28px);
    padding-left: 0;
    padding-right: 0;
}

.hero-banner[data-banner="2"] .hb3-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(26px, 4vw, 70px);
    align-items: center;
}

.hb3-content {
    flex: 1 1 520px;
    min-width: 0;
}

.hero-banner[data-banner="2"] .hb3-media {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.hb3-media-btn {
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
    line-height: 0;
    border-radius: 18px;
    display: inline-flex;
}

.hb3-media-btn:focus-visible {
    outline: 2px solid rgba(124, 58, 237, 0.65);
    outline-offset: 4px;
}

.hero-banner[data-banner="2"] .hb3-media::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -12px;
    width: 82%;
    height: 30px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45), transparent 70%);
    filter: blur(10px);
    opacity: 0.8;
    pointer-events: none;
}

.hero-banner[data-banner="2"] .hb3-media img {
    width: 100%;
    height: auto;
    max-width: 520px;
    display: block;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
    will-change: transform;
}

.hero-banner.hero-banner--active[data-banner="2"] .hb3-media {
    animation: hbMediaInSoft 720ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-banner.hero-banner--active[data-banner="2"] .hb3-media img {
    animation: hbMediaFloat 5.4s ease-in-out infinite;
}

@keyframes hbMediaInSoft {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hbMediaFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

@media (prefers-reduced-motion: reduce) {
    .hero-banner.hero-banner--active[data-banner="0"] .hb0-media img,
    .hero-banner.hero-banner--active[data-banner="2"] .hb3-media,
    .hero-banner.hero-banner--active[data-banner="2"] .hb3-media img {
        animation: none !important;
    }
}


@media (max-width: 1200px) {
    .hero-banner-grid {
        max-width: 1000px;
    }

    .hero-banner[data-banner="1"] .hero-inner {
        margin-left: 0;
    }

    .hb2p-inner {
        padding-left: 0;
    }

    .hero-banner[data-banner="2"] .hb3-inner {
        margin: 0 auto;
        grid-template-columns: 1fr;
    }

    .hero-banner[data-banner="2"] .hb3-media {
        justify-content: center;
        max-width: 360px;
        margin: 16px auto 0;
    }
}

@media (max-width: 900px) {
    .hero-banner-grid {
        grid-template-columns: 1fr;
    }

    .hero-banner[data-banner="0"] .hb0-media {
        width: 100%;
        max-width: 360px;
        justify-self: center;
    }

    .hero-banner[data-banner="1"] .hero-inner {
        margin-left: 0;
    }

    .hb2p-inner {
        padding-left: 0;
    }

    .hero-banner[data-banner="2"] .hb3-inner {
        margin: 0 auto;
    }

    .hb3-reward-card {
        width: 100%;
        max-width: 320px;
    }

    .hb3-reward-row {
        flex-wrap: wrap;
    }
}

@media (max-height: 760px) {
    .hb3-title {
        font-size: clamp(24px, 4.2vw, 40px);
        margin-bottom: 6px;
    }

    .hb3-eyebrow {
        margin-bottom: 6px;
    }

    .hb3-reward-row {
        gap: 12px;
        margin-top: 10px;
    }

    .hb3-reward-card {
        padding: 14px 12px;
    }

    .hero-banner[data-banner="2"] .container {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .hero-banner[data-banner="2"] {
        padding-top: 48px;
        padding-bottom: 18px;
    }
}

@media (max-height: 700px) {
    .hero-stage {
        min-height: 600px;
    }
}

/* ── Banner 1: Preview tenue (ghost) ─────────────────── */
.hero-preview--ghost {
    opacity: 0.15;
    filter: blur(0.5px);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

/* Banner 2: Preview featured */
.hero-preview--featured {
    opacity: 1;
    filter: none;
}

/* ══════════════════════════════════════════════════════
   HERO COPY COMPACT (banner 2)
══════════════════════════════════════════════════════ */
.hero-copy--compact {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hb-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}

.hb-bullet {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    color: var(--text-soft);
    line-height: 1.5;
}

.hb-bullet-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--kh-brand-500);
    flex-shrink: 0;
    margin-top: 7px;
}

/* ══════════════════════════════════════════════════════
   BANNER 2 — "PINCHAZO" (2 phones, 6s loop)
   (Rendered in hero-banner[data-banner="1"])
══════════════════════════════════════════════════════ */

.hb2p-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    /* Scale the Apple-like demo phone (280x570).
       Uses viewport to avoid bottom clipping inside hero. */
    /* Keep within hero viewport: nav(64) + safe(20) top + safe(20) bottom */
    /* Tuned for 1920x1080@100% to avoid bottom clipping */
    /* Smaller phones so banner breathes within margins */
    /* +10% bigger phones */
    --hb2p-device-scale: 0.81;
    --hb2p-zoom-left: 1.08;
    --hb2p-zoom-right: 1.08;
}

@media (max-height: 860px) {
    .hb2p-wrap {
        --hb2p-device-scale: 0.78;
    }
}

@media (max-height: 780px) {
    .hb2p-wrap {
        --hb2p-device-scale: 0.74;
    }
}

@media (max-width: 900px) {
    .hb2p-wrap {
        --hb2p-device-scale: 0.78;
    }
}

@media (max-width: 520px) {
    .hero-stage {
        min-height: 640px;
    }
}

@media (max-width: 640px) {
    .hero-stage {
        min-height: 720px;
    }

    .hero-banner {
        align-items: flex-start;
    }

    .hero-banner[data-banner="0"] .hb0-inner {
        align-items: center;
        text-align: center;
    }

    .hero-banner[data-banner="0"] .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-banner[data-banner="0"] .hero-chips {
        justify-content: center;
    }

    .hero-banner[data-banner="0"] .hero-chips .chip:nth-child(n+3) {
        display: none;
    }

    .hero-banner[data-banner="0"] .hb0-tagline {
        display: none;
    }

    .hero-banner[data-banner="0"] .hb0-media img {
        max-width: 320px;
    }

    .hero-banner[data-banner="1"] .hb2p-phones {
        display: none;
    }

    .hero-banner[data-banner="1"] .hb2p-bullets {
        display: none;
    }

    .hero-banner[data-banner="1"] .hb2p-sub-line {
        position: static;
        opacity: 1;
        animation: none;
    }

    .hero-banner[data-banner="1"] .hb2p-sub-line:not(:first-child) {
        display: none;
    }

    .hero-banner[data-banner="1"] .hb2p-sub {
        min-height: auto;
    }

    .hero-banner[data-banner="2"] .hb3-inner {
        text-align: center;
    }

    .hero-banner[data-banner="2"] .hero-sub {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-banner[data-banner="2"] .hb3-premium-teaser {
        display: none;
    }

    .kh-ios-stack {
        display: none;
    }
}

@media (max-width: 520px) {
    .hb2p-wrap {
        --hb2p-device-scale: 0.71;
        --hb2p-zoom-left: 1.04;
        --hb2p-zoom-right: 1.04;
    }
}

@media (max-width: 480px) {
    .hero-stage {
        min-height: 700px;
    }

    .hero-progress {
        width: calc(100% - 32px);
        top: 12px;
        gap: 6px;
    }

    .hero-progress-seg {
        height: 8px;
    }

    .hero-banner > .container {
        padding-top: 44px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-banner[data-banner="1"] > .container,
    .hero-banner[data-banner="2"] .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-banner-grid {
        gap: 20px;
    }

    .hero-banner[data-banner="0"] .hero-title {
        font-size: clamp(26px, 8vw, 34px);
        line-height: 1.04;
        margin-top: 6px;
    }

    .hero-banner[data-banner="0"] .hero-title .kh-type {
        white-space: normal;
        padding-right: 0;
        word-break: break-word;
    }

    .hero-banner[data-banner="0"] .hero-title .kh-type--line2 {
        text-wrap: balance;
    }

    .hero-sub,
    .hb2p-sub {
        max-width: 100%;
        -webkit-line-clamp: 3;
    }

    .hero-banner[data-banner="0"] .hb0-media img {
        transform: translateY(18px) scale(1.12);
    }

    .hb2p-wrap {
        --hb2p-device-scale: 0.58;
    }

    .hb2p-inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hero-banner[data-banner="1"] .hb2p-device-col--right {
        display: none;
    }

    .hero-banner[data-banner="1"] .hb2p-phones {
        margin-top: 10px;
        padding-bottom: 26px;
        gap: 10px;
    }

    .hero-banner[data-banner="2"] .hb3-media {
        max-width: 280px;
    }

    .hero-banner[data-banner="2"] {
        padding-top: 54px;
        padding-bottom: 28px;
    }

    .hero-banner[data-banner="2"] .container {
        padding-top: 18px;
    }

    .hb3-reward-row {
        flex-direction: column;
        align-items: stretch;
        margin: 20px 0 10px;
    }

    .hb3-reward-card {
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }
}

@media (max-width: 390px) {
    .hero-stage {
        min-height: 660px;
    }

    .hero-banner[data-banner="0"] .hb0-media img {
        transform: translateY(14px) scale(1.06);
    }

    .hb2p-wrap {
        --hb2p-device-scale: 0.54;
    }

    .hero-banner[data-banner="2"] .hb3-media {
        max-width: 260px;
    }
}

@media (max-width: 360px) {
    .hero-stage {
        min-height: 640px;
    }

    .hero-progress {
        width: calc(100% - 24px);
    }

    .hero-progress-seg {
        height: 7px;
    }

    .hero-banner[data-banner="0"] .hero-title {
        font-size: clamp(24px, 8.6vw, 32px);
    }

    .hb2p-wrap {
        --hb2p-device-scale: 0.50;
    }
}

.hb2p-inner {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: clamp(26px, 4vw, 70px);
    align-items: center;
    width: 100%;
    padding: 6px 0 6px;
    padding-left: 0;
}

/* (device scale is responsive via clamp above) */

.hb2p-copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.hb2p-sub {
    color: var(--text-soft);
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.6;
    max-width: 48rem;
    margin: 8px 0 0;
    text-align: left;
    text-wrap: balance;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.hb2p-sub.hb2p-sub-cycle {
    position: relative;
    display: block;
    -webkit-line-clamp: initial;
    overflow: visible;
    min-height: calc(1.6em * 2);
}

.hb2p-sub-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    opacity: 0;
    max-height: calc(1.6em * 2);
    overflow: hidden;
    animation: hb2pSubSwap var(--hb2p-dur, 9000ms) ease-in-out infinite;
}

.hb2p-sub-line:nth-child(1) {
    animation-delay: 0s;
}

.hb2p-sub-line:nth-child(2) {
    animation-delay: calc(var(--hb2p-dur, 9000ms) * 0.3333);
}

.hb2p-sub-line:nth-child(3) {
    animation-delay: calc(var(--hb2p-dur, 9000ms) * 0.6666);
}

@keyframes hb2pSubSwap {
    0% { opacity: 0; transform: translateY(4px); }
    10% { opacity: 1; transform: translateY(0); }
    28% { opacity: 1; transform: translateY(0); }
    33% { opacity: 0; transform: translateY(-4px); }
    100% { opacity: 0; transform: translateY(-4px); }
}

.hero-banner:not(.hero-banner--active) .hb2p-sub-line {
    animation: none;
    opacity: 0;
}

.hero-sub {
    color: var(--text-soft);
    font-size: clamp(14px, 1.3vw, 16px);
    line-height: 1.6;
    max-width: 520px;
    margin: 8px 0 0;
    text-wrap: balance;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.hero-sub.hero-sub-cycle {
    display: block;
    -webkit-line-clamp: initial;
    overflow: visible;
}

.hero-banner[data-banner="2"] .hero-sub {
    font-size: clamp(16px, 2vw, 18px);
    max-width: 48rem;
    margin: 8px 0 0;
}

.hero-sub--center {
    margin: 6px auto 10px;
    text-align: center;
}

.hero-sub--compact {
    max-width: 460px;
}

.hb2p-bullets {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 6px 0 0;
    padding: 0;
}

.hb2p-bullet {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.5;
}

.hb2p-bicon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 14px;
    background: rgba(33, 82, 173, 0.10);
    border: 1px solid rgba(33, 82, 173, 0.18);
    flex-shrink: 0;
    margin-top: 2px;
}

.hb2p-phones {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(12px, 2.0vw, 22px);
    width: 100%;
    padding-top: 0;
    position: relative;
    overflow: visible;
}

/* (sonar removed) */

.hb2p-device-wrap {
    --hb2p-scale: var(--hb2p-device-scale, 1);
    width: calc(280px * var(--hb2p-scale));
    height: calc(570px * var(--hb2p-scale));
    position: relative;
    flex: 0 0 auto;
    margin: 0 auto;
}

.hb2p-device--left {
    transform-origin: 50% 50%;
    z-index: 1;
    --ds-bg-scene: #0c1222;
    --ds-bg-card: rgba(255, 255, 255, 0.07);
    --ds-border: rgba(255, 255, 255, 0.12);
}

.hb2p-device--right {
    transform-origin: 50% 50%;
    z-index: 2;
    --ds-bg-scene: #0a1412;
    --ds-bg-card: rgba(255, 255, 255, 0.05);
    --ds-border: rgba(16, 185, 129, 0.25);
}

.hb2p-device--left .demo-phone {
    background: #0e111b;
    border-color: rgba(201, 168, 76, 0.25);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 40px 80px rgba(0, 0, 0, 0.62),
        inset 0 0 0 1.5px rgba(201, 168, 76, 0.08);
}

.hb2p-device--right .demo-phone {
    background: #0b1012;
    border-color: rgba(16, 185, 129, 0.32);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 42px 90px rgba(0, 0, 0, 0.66),
        inset 0 0 0 1.5px rgba(16, 185, 129, 0.12);
}

.hb2p-device--left .demo-phone-screen::before,
.hb2p-device--right .demo-phone-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hb2p-device--left .demo-phone-screen::before {
    background: radial-gradient(120% 140% at 0% 0%, rgba(201, 168, 76, 0.12) 0%, transparent 45%);
}

.hb2p-device--right .demo-phone-screen::before {
    background: radial-gradient(120% 140% at 100% 0%, rgba(16, 185, 129, 0.14) 0%, transparent 48%);
}

.hb2p-device-wrap .demo-phone {
    position: absolute;
    top: 0;
    left: 0;
    transform: scale(var(--hb2p-scale));
    transform-origin: top left;
    transition: none;
}

.hb2p-device--right {
    /* Swap demo accents to teal for helper */
    --ds-accent: #14C49B;
    --ds-accent2: #10B981;
}

/* Ensure notification content stays readable in all themes */
.hb2p-device--right .hb2p-sys-notif * {
    text-shadow: none;
}

.hb2p-user-tag {
    font-size: 11px;
    font-weight: 800;
    color: rgba(237, 240, 248, 0.72);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
}

.hb2p-user-tag--helper {
    color: rgba(52, 211, 153, 0.88);
    border-color: rgba(16, 185, 129, 0.20);
    background: rgba(16, 185, 129, 0.08);
}

html[data-theme="light"] .hb2p-user-tag {
    color: rgba(11, 15, 25, 0.62);
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.70);
}

html[data-theme="light"] .hb2p-user-tag--helper {
    color: rgba(5, 110, 83, 0.88);
    border-color: rgba(16, 185, 129, 0.22);
    background: rgba(16, 185, 129, 0.10);
}

.hb2p-mini {
    width: 100%;
    border-radius: 14px;
    padding: 12px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    opacity: 0;
    transform: translateY(12px);
    will-change: opacity, transform;
}

.hb2p-mini-title {
    font-size: 11px;
    font-weight: 800;
    color: rgba(237, 240, 248, 0.62);
    margin-bottom: 8px;
}

.hb2p-mini-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px;
    border-radius: 10px;
}

.hb2p-mini-av {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, rgba(82, 49, 148, 1), rgba(33, 82, 173, 0.95));
    flex-shrink: 0;
}

.hb2p-mini-av--green {
    background: linear-gradient(135deg, rgba(20, 196, 155, 1), rgba(16, 185, 129, 0.92));
}

.hb2p-mini-name {
    font-size: 12px;
    font-weight: 800;
    color: rgba(237, 240, 248, 0.84);
}

.hb2p-mini-meta {
    margin-left: auto;
    font-size: 11px;
    color: rgba(237, 240, 248, 0.55);
    font-weight: 700;
}

html[data-theme="light"] .hb2p-mini {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(0, 0, 0, 0.10);
}

html[data-theme="light"] .hb2p-mini-title {
    color: rgba(0, 0, 0, 0.52);
}

html[data-theme="light"] .hb2p-mini-name {
    color: rgba(0, 0, 0, 0.72);
}

html[data-theme="light"] .hb2p-mini-meta {
    color: rgba(0, 0, 0, 0.52);
}

.hb2p-phones::before {
    content: "";
    position: absolute;
    inset: -40px 0 -60px;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(60% 55% at 30% 45%, rgba(33, 82, 173, 0.16), transparent 60%),
        radial-gradient(60% 55% at 70% 50%, rgba(16, 185, 129, 0.14), transparent 62%),
        radial-gradient(40% 30% at 50% 85%, rgba(201, 168, 76, 0.10), transparent 65%);
    filter: blur(10px);
    opacity: 0.9;
}

/* Apple-like devices (reuse demo.css phone) */
.hb2p-device-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    z-index: 1;
    position: relative;
    padding-top: 44px;
    width: calc(280px * var(--hb2p-device-scale));
}

.hb2p-device-label {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--text);
    background: rgba(10, 14, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.2);
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] .hb2p-device-label {
    color: rgba(0, 0, 0, 0.78);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
    text-shadow: none;
}

.hb2p-device-col--left .hb2p-device-label {
    border-color: rgba(42, 91, 206, 0.4);
    background: linear-gradient(135deg, rgba(42, 91, 206, 0.35), rgba(201, 168, 76, 0.28));
}

.hb2p-device-col--right .hb2p-device-label {
    border-color: rgba(16, 185, 129, 0.35);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(20, 196, 155, 0.22));
}

.hero-banner[data-banner="1"] .hb2p-device-label {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    will-change: opacity, transform;
}

/* size is handled by hb2p-device-wrap + scale */

.hb2p-phone {
    z-index: 1;
    height: var(--hb2p-phone-h);
    width: calc(var(--hb2p-phone-h) * 0.48);
    max-width: 340px;
    border-radius: 34px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(0, 0, 0, 0.20);
    position: relative;
    padding: 12px;
    overflow: visible;
}

.hb2p-phone--right {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(14, 168, 126, 0.18);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(14, 168, 126, 0.16);
}

html[data-theme="light"] .hb2p-phone {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.02));
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(0, 0, 0, 0.08);
}

html[data-theme="light"] .hb2p-phone--right {
    border-color: rgba(16, 185, 129, 0.22);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.18),
        0 0 0 1px rgba(16, 185, 129, 0.14);
}

.hb2p-phone::after {
    content: "";
    position: absolute;
    inset: 10px 10px auto 10px;
    height: 38%;
    border-radius: 26px;
    background: radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.55;
}

.hb2p-phone-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.2px;
    color: var(--text);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hb2p-phone--right .hb2p-phone-label {
    border-color: rgba(16, 185, 129, 0.22);
}

html[data-theme="light"] .hb2p-phone-label {
    color: rgba(0, 0, 0, 0.78);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(0, 0, 0, 0.10);
}

.hb2p-screen {
    position: relative;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    --hb2p-top-ui: 76px;
    background:
        radial-gradient(120% 90% at 30% 20%, rgba(33, 82, 173, 0.24), rgba(0, 0, 0, 0) 55%),
        linear-gradient(180deg, rgba(9, 12, 22, 0.88), rgba(4, 6, 14, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hb2p-phone--right .hb2p-screen {
    background:
        radial-gradient(120% 90% at 30% 20%, rgba(20, 196, 155, 0.22), rgba(0, 0, 0, 0) 55%),
        linear-gradient(180deg, rgba(8, 14, 18, 0.88), rgba(4, 8, 12, 0.92));
}

html[data-theme="light"] .hb2p-phone--right .hb2p-screen {
    background:
        radial-gradient(120% 90% at 30% 20%, rgba(16, 185, 129, 0.14), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 250, 248, 0.96));
}

html[data-theme="light"] .hb2p-screen {
    background:
        radial-gradient(120% 90% at 30% 20%, rgba(33, 82, 173, 0.14), rgba(255, 255, 255, 0) 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 247, 252, 0.96));
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Top UI (statusbar + appbar) */
.hb2p-ui {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    z-index: 5;
    pointer-events: none;
}

.hb2p-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.70);
    opacity: 0.9;
}

.hb2p-status-icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
}

html[data-theme="light"] .hb2p-statusbar {
    color: rgba(0, 0, 0, 0.55);
}

.hb2p-statusbar span {
    white-space: nowrap;
}

.hb2p-statusbar .hb2p-time {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.hb2p-appbar {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

html[data-theme="light"] .hb2p-appbar {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(0, 0, 0, 0.10);
}

.hb2p-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.hb2p-brand-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.hb2p-wordmark {
    height: 14px;
    width: auto;
    object-fit: contain;
    opacity: 0.92;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
}

.hb2p-brand-name {
    font-size: 12.5px;
    font-weight: 900;
    letter-spacing: -0.1px;
    color: var(--text);
}

.hb2p-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hb2p-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(135deg, rgba(82, 49, 148, 1), rgba(33, 82, 173, 0.95));
    box-shadow: 0 10px 22px rgba(33, 82, 173, 0.18);
}

.hb2p-avatar--alt {
    background: linear-gradient(135deg, rgba(20, 196, 155, 1), rgba(16, 185, 129, 0.92));
    box-shadow: 0 10px 22px rgba(16, 185, 129, 0.20);
}

.hb2p-scene {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(22px);
    will-change: transform, opacity;
}

.hb2p-action {
    position: relative;
    width: 100%;
}

.hb2p-action .hb2p-tap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
}

.hb2p-pill-sent,
.hb2p-pill-match {
    opacity: 0;
    transform: translateY(10px);
    will-change: opacity, transform;
}

.hb2p-sys-notif {
    width: 100%;
    border-radius: 16px;
    padding: 12px 14px 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    z-index: 40;
    opacity: 0;
    transform: translateY(-14px);
    will-change: opacity, transform;
}

html[data-theme="light"] .hb2p-sys-notif {
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.hb2p-sys-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    opacity: 0.85;
}

.hb2p-sys-chip {
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.10);
    border: 1px solid rgba(16, 185, 129, 0.18);
    color: rgba(5, 110, 83, 0.88);
}

.hb2p-sys-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.hb2p-sys-app {
    font-size: 12px;
    font-weight: 700;
    color: var(--ds-text, #EDF0F8);
    letter-spacing: -0.2px;
}

.hb2p-sys-now {
    margin-left: auto;
    font-size: 11px;
    color: var(--ds-muted, rgba(237, 240, 248, 0.50));
}

.hb2p-sys-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--ds-text, #EDF0F8);
    letter-spacing: -0.2px;
    margin-bottom: 10px;
}

.hb2p-sys-sub {
    font-size: 11.5px;
    color: var(--ds-muted, rgba(237, 240, 248, 0.55));
    margin-top: -2px;
    margin-bottom: 10px;
}

.hb2p-sys-note {
    font-size: 11.5px;
    line-height: 1.35;
    color: rgba(11, 15, 25, 0.70);
    margin-top: -2px;
    margin-bottom: 12px;
}

html[data-theme="light"] .hb2p-sys-sub {
    color: rgba(0, 0, 0, 0.52);
}

.hb2p-match-card {
    opacity: 0;
    transform: translateY(12px);
    will-change: opacity, transform;
    position: relative;
    z-index: 40;
}

.hb2p-reward-card {
    max-width: 280px;
}

.hb2p-card,
.hb2p-notif {
    width: min(92%, 280px);
    border-radius: 18px;
    padding: 16px 16px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.hb2p-notif {
    border-radius: 22px;
}

.hb2p-label {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    opacity: 0.9;
    margin-bottom: 6px;
}

.hb2p-btn-wrap {
    position: relative;
    margin-top: 2px;
}

html[data-theme="light"] .hb2p-card,
html[data-theme="light"] .hb2p-notif {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.hb2p-card-title,
.hb2p-notif-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: var(--text);
    margin-bottom: 10px;
}

.hb2p-notif-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    opacity: 0.8;
    font-size: 12px;
    color: var(--text-muted);
}

.hb2p-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--kh-brand-500);
    box-shadow: 0 0 0 4px var(--kh-brand-tint-12);
}

.hb2p-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 100%;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: white;
    background: linear-gradient(135deg, rgba(82, 49, 148, 1), rgba(33, 82, 173, 0.95));
    box-shadow: 0 10px 28px rgba(33, 82, 173, 0.22);
    transform: translateY(0);
}

.hb2p-status {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
    opacity: 0.85;
}

.hb2p-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1px;
    width: fit-content;
    opacity: 0;
    transform: translateY(8px);
    will-change: transform, opacity;
}

.hb2p-pill--sent {
    background: rgba(59, 130, 246, 0.14);
    border: 1px solid rgba(59, 130, 246, 0.22);
    color: var(--text);
}

.hb2p-done {
    width: min(86%, 280px);
    text-align: center;
    font-size: 16px;
    font-weight: 850;
    color: var(--text);
    padding: 14px 14px;
    border-radius: 18px;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.22);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.hb2p-reward {
    margin-top: 14px;
    width: min(86%, 280px);
    text-align: center;
    padding: 14px 14px 12px;
    border-radius: 18px;
    background: rgba(201, 168, 76, 0.10);
    border: 1px solid rgba(201, 168, 76, 0.22);
}

.hb2p-reward-pts {
    font-size: 15px;
    font-weight: 900;
    color: var(--text);
}

.hb2p-reward-plus {
    display: inline-block;
    color: var(--gold-light, #F2D37B);
    will-change: transform, opacity;
}

.hb2p-ranking {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.hb2p-tap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    opacity: 0;
    will-change: transform, opacity;
    pointer-events: none;
}

.hb2p-tap-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.hb2p-tap-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.65);
    opacity: 0;
    transform: scale(0.7);
    will-change: transform, opacity;
}

.hb2p-app-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(201, 168, 76, 0.25));
}

.hb2p-cta {
    display: flex;
    justify-content: center;
}

/* ── Animation timeline (5s total) ───────────────────── */
.hero-banner[data-banner="1"] .hb2p-phones,
.hero-banner[data-banner="1"] .hb2p-device--left,
.hero-banner[data-banner="1"] .hb2p-device--right,
.hero-banner[data-banner="1"] .hb2p-scene,
.hero-banner[data-banner="1"] .hb2p-tap,
.hero-banner[data-banner="1"] .hb2p-tap-ring,
.hero-banner[data-banner="1"] .hb2p-sys-notif,
.hero-banner[data-banner="1"] .hb2p-pill-sent,
.hero-banner[data-banner="1"] .hb2p-pill-match,
.hero-banner[data-banner="1"] .hb2p-reward-plus {
    animation: none;
}

.hero-banner[data-banner="1"].hero-banner--active {
    /* Slower mobile demo timeline (+1.5s) */
    --hb2p-dur: 7.5s;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-phones {
    animation: hb2pWrap var(--hb2p-dur) linear infinite;
    will-change: opacity;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--left {
    animation: hb2pPhoneLeft var(--hb2p-dur) linear infinite;
    will-change: transform, opacity;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--right {
    animation: hb2pPhoneRight var(--hb2p-dur) linear infinite;
    will-change: transform, opacity;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device-col--left .hb2p-device-label {
    animation: hb2pLabelLeft var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device-col--right .hb2p-device-label {
    animation: hb2pLabelRight var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--left .hb2p-scene--a {
    animation: hb2pSceneA var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--right .hb2p-scene--b {
    animation: hb2pSceneB var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--left .hb2p-scene--c,
.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--right .hb2p-scene--c {
    animation: hb2pSceneC var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-tap--a {
    animation: hb2pTapA var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-tap--b {
    animation: hb2pTapB var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-tap-ring {
    animation: hb2pPulse 0.72s ease-out infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-reward-plus {
    animation: hb2pCountPop var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--left .ds-request-card,
.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--left .ds-btn-fake {
    animation: hb2pCardIn var(--hb2p-dur) linear infinite;
    will-change: transform, opacity;
}

/* Keep left phone UI visible while right phone enters */
.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--left .ds-status-bar {
    animation: hb2pSearching var(--hb2p-dur) linear infinite;
    will-change: transform, opacity;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-pill-sent {
    animation: hb2pSentPill var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-pill-left-accepted {
    animation: hb2pLeftAccepted var(--hb2p-dur) linear infinite;
    will-change: opacity, transform;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--right .hb2p-sys-notif {
    animation: hb2pNotifIn var(--hb2p-dur) linear infinite;
    will-change: transform, opacity;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-pill-match {
    animation: hb2pMatchText var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-mini--offers {
    animation: hb2pOffersIn var(--hb2p-dur) linear infinite;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-match-card {
    animation: hb2pRightCard var(--hb2p-dur) linear infinite;
}

/* Button press moments */
.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--left .hb2p-action .ds-btn-fake {
    animation: hb2pPressLeft var(--hb2p-dur) linear infinite;
    will-change: transform;
}

.hero-banner[data-banner="1"].hero-banner--active .hb2p-device--right .hb2p-action--accept .ds-btn-fake {
    animation: hb2pPressRight var(--hb2p-dur) linear infinite;
    will-change: transform;
}

@keyframes hb2pWrap {
    0% {
        opacity: 1;
    }

    96% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes hb2pPhoneLeft {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    6% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    10% {
        opacity: 1;
        transform: translateY(0) scale(1.04);
    }

    16% {
        opacity: 1;
        transform: translateY(0) scale(var(--hb2p-zoom-left));
    }

    24% {
        opacity: 1;
        transform: translateY(0) scale(var(--hb2p-zoom-left));
    }

    30% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    96% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes hb2pPhoneRight {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    32% {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    38% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    44% {
        opacity: 1;
        transform: translateY(0) scale(1.04);
    }

    50% {
        opacity: 1;
        transform: translateY(0) scale(var(--hb2p-zoom-right));
    }

    58% {
        opacity: 1;
        transform: translateY(0) scale(var(--hb2p-zoom-right));
    }

    62% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    96% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes hb2pCardIn {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.99);
    }

    8% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    32% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    64% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    66% {
        opacity: 0;
        transform: translateY(-8px) scale(0.995);
    }

    100% {
        opacity: 0;
        transform: translateY(-8px) scale(0.995);
    }
}

@keyframes hb2pSentPill {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    16% {
        opacity: 0;
        transform: translateY(8px);
    }

    22% {
        opacity: 1;
        transform: translateY(0);
    }

    32% {
        opacity: 1;
        transform: translateY(0);
    }

    64% {
        opacity: 1;
        transform: translateY(0);
    }

    66% {
        opacity: 0;
        transform: translateY(-6px);
    }

    100% {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@keyframes hb2pSearching {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }

    18% {
        opacity: 0;
        transform: translateY(4px);
    }

    26% {
        opacity: 0.9;
        transform: translateY(0);
    }

    32% {
        opacity: 0.9;
        transform: translateY(0);
    }

    64% {
        opacity: 0.9;
        transform: translateY(0);
    }

    66% {
        opacity: 0;
        transform: translateY(-4px);
    }

    100% {
        opacity: 0;
        transform: translateY(-4px);
    }
}

@keyframes hb2pNotifIn {
    0% {
        opacity: 0;
        transform: translateY(-16px) scale(0.99);
    }

    32% {
        opacity: 0;
        transform: translateY(-16px) scale(0.99);
    }

    40% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    64% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    72% {
        opacity: 0;
        transform: translateY(-10px) scale(0.995);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.995);
    }
}

@keyframes hb2pMatchText {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }

    46% {
        opacity: 0;
        transform: translateY(4px);
    }

    56% {
        opacity: 0.85;
        transform: translateY(0);
    }

    64% {
        opacity: 0.85;
        transform: translateY(0);
    }

    72% {
        opacity: 0;
        transform: translateY(-4px);
    }

    100% {
        opacity: 0;
        transform: translateY(-4px);
    }
}

@keyframes hb2pRightCard {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    44% {
        opacity: 0;
        transform: translateY(12px);
    }

    52% {
        opacity: 1;
        transform: translateY(0);
    }

    64% {
        opacity: 1;
        transform: translateY(0);
    }

    72% {
        opacity: 0;
        transform: translateY(-6px);
    }

    100% {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@keyframes hb2pLeftAccepted {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    44% {
        opacity: 0;
        transform: translateY(10px);
    }

    52% {
        opacity: 1;
        transform: translateY(0);
    }

    64% {
        opacity: 1;
        transform: translateY(0);
    }

    66% {
        opacity: 0;
        transform: translateY(-6px);
    }

    100% {
        opacity: 0;
        transform: translateY(-6px);
    }
}

@keyframes hb2pPressLeft {
    0% {
        transform: none;
    }

    16% {
        transform: none;
    }

    20% {
        transform: scale(0.98);
    }

    24% {
        transform: none;
    }

    100% {
        transform: none;
    }
}

@keyframes hb2pPressRight {
    0% {
        transform: none;
    }

    46% {
        transform: none;
    }

    50% {
        transform: scale(0.98);
    }

    54% {
        transform: none;
    }

    100% {
        transform: none;
    }
}

@keyframes hb2pOffersIn {
    0% {
        opacity: 0;
        transform: translateY(12px);
    }

    26% {
        opacity: 0;
        transform: translateY(12px);
    }

    34% {
        opacity: 1;
        transform: translateY(0);
    }

    64% {
        opacity: 1;
        transform: translateY(0);
    }

    66% {
        opacity: 0;
        transform: translateY(-8px);
    }

    100% {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes hb2pSceneA {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }

    6% {
        opacity: 1;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(0);
    }

    32% {
        opacity: 0.92;
        transform: translateY(0);
    }

    64% {
        opacity: 0.92;
        transform: translateY(0);
    }

    66% {
        opacity: 0;
        transform: translateY(-18px);
    }

    100% {
        opacity: 0;
        transform: translateY(-18px);
    }
}

@keyframes hb2pSceneB {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }

    32% {
        opacity: 0;
        transform: translateY(22px);
    }

    38% {
        opacity: 1;
        transform: translateY(0);
    }

    62% {
        opacity: 1;
        transform: translateY(0);
    }

    64% {
        opacity: 0;
        transform: translateY(-18px);
    }

    100% {
        opacity: 0;
        transform: translateY(-18px);
    }
}

@keyframes hb2pSceneC {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }

    64% {
        opacity: 0;
        transform: translateY(22px);
    }

    70% {
        opacity: 1;
        transform: translateY(0);
    }

    96% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hb2pTapA {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }

    14% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }

    18% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    22% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(1px) scale(0.92);
    }

    26% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes hb2pTapB {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }

    44% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }

    48% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    52% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(1px) scale(0.92);
    }

    56% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes hb2pPulse {
    0% {
        opacity: 0;
        transform: scale(0.72);
    }

    20% {
        opacity: 0.85;
        transform: scale(0.92);
    }

    100% {
        opacity: 0;
        transform: scale(1.28);
    }
}

@keyframes hb2pCountPop {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.86);
    }

    64% {
        opacity: 0;
        transform: translateY(6px) scale(0.86);
    }

    70% {
        opacity: 1;
        transform: translateY(0) scale(1.12);
    }

    78% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ══════════════════════════════════════════════════════
   BANNER 3 — Rewards / Premium scene
══════════════════════════════════════════════════════ */
.hb3-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--kh-brand-500);
    opacity: 0.9;
    margin-bottom: 16px;
}

.hb3-title {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hb3-reward-row {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
    margin: 28px 0;
}

.hb3-reward-card {
    background: var(--bg-card);
    border: 1px solid var(--border-h);
    border-radius: 16px;
    padding: 10px 10px;
    width: 140px;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hb3-reward-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

html[data-theme="light"] .hb3-reward-icon {
    border-color: rgba(0, 0, 0, 0.10);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.10);
}

.hb3-ico {
    width: 30px;
    height: 30px;
    color: rgba(237, 240, 248, 0.92);
}

html[data-theme="light"] .hb3-ico {
    color: rgba(11, 15, 25, 0.78);
}

.hb3-reward-card[data-kind="recompensa"] .hb3-reward-icon {
    background: rgba(201, 168, 76, 0.10);
    border-color: rgba(201, 168, 76, 0.20);
}

.hb3-reward-card[data-kind="recompensa"] .hb3-ico {
    color: var(--gold-light);
}

.hb3-reward-card[data-kind="trueque"] .hb3-reward-icon {
    background: rgba(82, 49, 148, 0.10);
    border-color: rgba(82, 49, 148, 0.18);
}

.hb3-reward-card[data-kind="trueque"] .hb3-ico {
    color: rgba(129, 140, 248, 0.95);
}

.hb3-reward-card[data-kind="altruista"] .hb3-reward-icon {
    background: rgba(16, 185, 129, 0.10);
    border-color: rgba(16, 185, 129, 0.20);
}

.hb3-reward-card[data-kind="altruista"] .hb3-ico {
    color: rgba(52, 211, 153, 0.95);
}

/* Subtle shine sweep + float (transform/opacity only) */
.hero-banner[data-banner="2"].hero-banner--active .hb3-reward-icon::before {
    content: "";
    position: absolute;
    inset: -40% -60%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.22) 45%, transparent 80%);
    transform: translateX(-60%) rotate(14deg);
    opacity: 0;
    will-change: transform, opacity;
    animation: hb3Shine 3.6s ease-in-out infinite;
}

.hero-banner[data-banner="2"].hero-banner--active .hb3-reward-card:nth-child(1) .hb3-reward-icon {
    animation: hb3Float 4.2s ease-in-out infinite;
}

.hero-banner[data-banner="2"].hero-banner--active .hb3-reward-card:nth-child(2) .hb3-reward-icon {
    animation: hb3Float 4.2s 0.25s ease-in-out infinite;
}

.hero-banner[data-banner="2"].hero-banner--active .hb3-reward-card:nth-child(3) .hb3-reward-icon {
    animation: hb3Float 4.2s 0.5s ease-in-out infinite;
}

@keyframes hb3Shine {
    0% {
        opacity: 0;
        transform: translateX(-60%) rotate(14deg);
    }

    20% {
        opacity: 0.0;
    }

    35% {
        opacity: 0.55;
    }

    55% {
        opacity: 0;
        transform: translateX(55%) rotate(14deg);
    }

    100% {
        opacity: 0;
        transform: translateX(55%) rotate(14deg);
    }
}

@keyframes hb3Float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }
}

.hb3-reward-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--kh-brand-tint-12);
}

/* (icon is now an SVG in .hb3-reward-icon) */

.hb3-reward-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}

.hb3-reward-desc {
    font-size: 9.5px;
    color: var(--text-muted);
    text-align: center;
}

/* Animate reward cards on enter */
.hero-banner--active .hb3-reward-card:nth-child(1) {
    animation: hbCardIn 0.5s 0.2s both ease;
}

.hero-banner--active .hb3-reward-card:nth-child(2) {
    animation: hbCardIn 0.5s 0.35s both ease;
}

.hero-banner--active .hb3-reward-card:nth-child(3) {
    animation: hbCardIn 0.5s 0.5s both ease;
}

@keyframes hbCardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.hb3-premium-teaser {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 168, 76, 0.07);
    border: 1px solid rgba(201, 168, 76, 0.20);
    border-radius: 50px;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--gold-light);
    margin-top: 8px;
}

.hb3-pts-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--kh-brand-tint-08);
    border: 1px solid var(--kh-brand-tint-18);
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--kh-brand-500);
    margin-top: 12px;
}

/* ══════════════════════════════════════════════════════
   PROGRESS BAR (replaces dots)
══════════════════════════════════════════════════════ */

.hero-progress {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(560px, calc(100% - 56px));
    height: 10px;
    padding: 0;
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 7;
    pointer-events: auto;
    background: transparent;
    border: none;
    border-radius: 999px;
    box-shadow: none;
    position: absolute;
}



.hero-progress-seg {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.18);
    outline: none;
    padding: 0;
    cursor: pointer;
    flex: 1;
    height: 10px;
    border-radius: 999px;
    background: rgba(10, 14, 22, 0.55);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
    color: transparent;
    font-size: 0;
}

@keyframes hb2pLabelLeft {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(8px) scale(0.98);
    }

    6% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    10% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.02);
    }

    16% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(var(--hb2p-zoom-left));
    }

    24% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(var(--hb2p-zoom-left));
    }

    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    96% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes hb2pLabelRight {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(8px) scale(0.98);
    }

    32% {
        opacity: 0;
        transform: translateX(-50%) translateY(8px) scale(0.98);
    }

    38% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    44% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.02);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(var(--hb2p-zoom-right));
    }

    58% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(var(--hb2p-zoom-right));
    }

    62% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    96% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.hero-progress-seg--active {
    border-color: rgba(124, 58, 237, 0.65);
    background: rgba(14, 18, 28, 0.65);
    box-shadow: none;
}

.hero-progress-seg:focus-visible {
    outline: 2.5px solid var(--kh-brand-500);
    outline-offset: 4px;
}

html[data-theme="light"] .hero-progress-seg {
    background: rgba(15, 23, 42, 0.10);
    border-color: rgba(15, 23, 42, 0.18);
}

html[data-theme="light"] .hero-progress {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

html[data-theme="light"] .hero-progress-seg--active {
    border-color: rgba(124, 58, 237, 0.55);
    background: rgba(15, 23, 42, 0.16);
    box-shadow: none;
}

.hero-progress-fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed 0%, #6d28d9 35%, #f97316 100%);
    box-shadow: 0 0 18px rgba(124, 58, 237, 0.75), 0 0 18px rgba(249, 115, 22, 0.6);
    filter: saturate(120%) brightness(1.08);
    will-change: width, background-position;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
}

.hero-progress-seg--active .hero-progress-fill {
    animation:
        heroProgressFill var(--dur, 4000ms) linear forwards,
        heroProgressGlow 2.4s ease-in-out infinite;
}

@keyframes heroProgressFill {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

@keyframes heroProgressGlow {
    0% {
        filter: saturate(115%) brightness(1.05);
    }
    50% {
        filter: saturate(150%) brightness(1.12);
    }
    100% {
        filter: saturate(125%) brightness(1.06);
    }
}

/* (hero dots removed; progress bar is used instead) */

/* ══════════════════════════════════════════════════════
   MICRO-INTERACTIONS
══════════════════════════════════════════════════════ */

/* Chip lift on hover */
.chip {
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--kh-brand-tint-12);
}

/* Parallax token (set by hero.js on mousemove) */
.hero-bg {
    transform: translateY(var(--hero-parallax-y, 0px));
    transition: transform 0.1s linear;
    will-change: transform;
}

/* Preview card glow */
section.hero .preview-card {
    box-shadow:
        0 0 0 1px var(--kh-brand-tint-12),
        0 24px 64px rgba(0, 0, 0, 0.5);
}

/* ── Hero Burst Particles (canvas lives inside #kh-hero) ───────────── */
section.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

#kh-particles {
    filter: saturate(140%) contrast(125%);
    opacity: 1;
    mix-blend-mode: normal;
}

html[data-theme="dark"] #kh-particles {
    filter: saturate(150%) contrast(128%);
    mix-blend-mode: screen;
}

html[data-theme="light"] #kh-particles {
    filter: saturate(145%) contrast(128%);
    mix-blend-mode: multiply;
}

/* ══════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */
@media (max-width: 900px) {

    .hero-banner[data-banner="0"] .hero-inner,
    .hero-banner[data-banner="1"] .hero-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Hide ghost preview on mobile to reduce noise */
    .hero-preview--ghost {
        display: none;
    }

    /* Featured preview in banner 2 stays visible but smaller */
    .hero-preview--featured {
        max-width: 420px;
        margin: 0 auto;
    }

    /* Pinchazo phones: stack nicely */
    .hb2p-phones {
        flex-wrap: wrap;
        align-items: center;
        gap: 18px;
        padding-top: 10px;
    }

    .hb2p-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

}

/* device scale uses clamp() in .hb2p-wrap */

@media (max-width: 768px) {
    .hb3-reward-row {
        gap: 10px;
    }

    .hb3-reward-card {
        min-width: 110px;
        padding: 14px 16px;
    }

}

/* ══════════════════════════════════════════════════════
   REDUCED MOTION OVERRIDES
══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .hero-banner {
        transition: none !important;
        animation: none !important;
    }

    .hero-banner--active {
        opacity: 1;
        transform: none;
    }

    .hero-banner:not(.hero-banner--active) {
        opacity: 0;
    }

    .hero-bg {
        transition: none !important;
    }

    /* Progress: no animation, just show active */
    .hero-progress-seg--active .hero-progress-fill {
        animation: none !important;
        width: 100% !important;
    }


    .hb3-reward-card {
        animation: none !important;
    }

    .hero-banner[data-banner="2"] .hb3-reward-icon {
        animation: none !important;
    }

    .hero-banner[data-banner="2"] .hb3-reward-icon::before {
        animation: none !important;
        display: none !important;
    }

    /* Banner "Pinchazo": show final state only */
    .hero-banner[data-banner="1"] .hb2p-phones {
        animation: none !important;
        opacity: 1 !important;
    }

    .hero-banner[data-banner="1"] .hb2p-device-wrap {
        animation: none !important;
        opacity: 1 !important;
    }

    .hero-banner[data-banner="1"] .hb2p-device--left,
    .hero-banner[data-banner="1"] .hb2p-device--right {
        transform: none !important;
    }

    .hero-banner[data-banner="1"] .hb2p-device-label {
        opacity: 1 !important;
        transform: translateX(-50%) translateY(0) !important;
        animation: none !important;
    }

    .hero-banner[data-banner="1"] .demo-phone {
        animation: none !important;
        opacity: 1 !important;
    }

    .hero-banner[data-banner="1"] .hb2p-scene--a,
    .hero-banner[data-banner="1"] .hb2p-scene--b,
    .hero-banner[data-banner="1"] .hb2p-tap,
    .hero-banner[data-banner="1"] .hb2p-tap-ring {
        display: none !important;
        animation: none !important;
    }

    .hero-banner[data-banner="1"] .hb2p-pill-left-accepted,
    .hero-banner[data-banner="1"] .hb2p-match-card,
    .hero-banner[data-banner="1"] .hb2p-mini {
        display: none !important;
        animation: none !important;
    }

    .hero-banner[data-banner="1"] .hb2p-scene--c {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .hero-banner[data-banner="1"] .ds-anim-pop,
    .hero-banner[data-banner="1"] .ds-status-dot--active {
        animation: none !important;
    }

    .hero-banner[data-banner="1"] .hb2p-reward-plus {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .chip:hover {
        transform: none;
    }
}

/* ════════════════════════════════════════════════════════
   HERO INTRO SPLASH — "KingsHelp" wordmark reveal
════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════
   PNG INTRO OVERLAY
════════════════════════════════════════════════════════ */

#kh-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Match theme background — no flash */
    background: var(--bg, #070A10);
    pointer-events: auto;
    /* blocks interaction during intro */
    will-change: opacity;
    /* Overlay fade-out is triggered by JS adding the exit class */
}

/* Exit state: fade overlay out */
#kh-intro-overlay.kh-intro-overlay--exit {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inner container: logo centered, isolated from burst canvas */
.kh-intro-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    overflow: visible;
    isolation: isolate;
    --intro-blur-max: 72px;
    --intro-blur-strong: 54px;
    --intro-blur-mid: 30px;
    --intro-blur-soft: 10px;
    --intro-logo-shadow: drop-shadow(0 0 28px rgba(201, 168, 76, 0.28)) drop-shadow(0 0 16px rgba(79, 70, 229, 0.22));
}

/* Burst canvas (particle explosion) */
.kh-intro-burst {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: screen;
}

/* ── Intro logo image ───────────────────────────────────── */
.kh-intro-logo-wrap {
    position: relative;
    display: grid;
    place-items: center;
    pointer-events: none;
    user-select: none;
    will-change: transform, opacity, filter;
    opacity: 0;
}

.kh-intro-logo-wrap.is-entering,
.kh-intro-logo-wrap.is-visible,
.kh-intro-logo-wrap.is-exiting {
    opacity: 1;
}

.kh-intro-glow {
    position: absolute;
    inset: -48px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 45%, rgba(99, 102, 241, 0.65), transparent 62%),
        radial-gradient(circle at 60% 55%, rgba(168, 85, 247, 0.5), transparent 70%),
        radial-gradient(circle at 50% 50%, rgba(76, 29, 149, 0.45), transparent 75%);
    opacity: 0;
    filter: blur(44px);
    pointer-events: none;
}

.kh-intro-logo-wrap.is-entering .kh-intro-glow {
    animation: khIntroGlowIn 1300ms ease-out both;
}

.kh-intro-logo-wrap.is-visible .kh-intro-glow {
    opacity: 0.38;
    filter: blur(32px);
}

.kh-intro-logo-wrap.is-exiting .kh-intro-glow {
    animation: khIntroGlowOut 950ms ease-in both;
}

/* ── Crown image — zoom-out entrance ──────────────────── */
.kh-intro-crown-img {
    width: clamp(165px, 21vw, 240px);
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: transform, opacity, filter;
    filter: blur(0px) brightness(1) var(--intro-logo-shadow);
    transform: translateZ(0);
    animation: none;
}

.kh-intro-logo-wrap.is-entering .kh-intro-crown-img {
    animation: khIntroFogIn 1300ms ease-out both;
}

.kh-intro-logo-wrap.is-visible .kh-intro-crown-img {
    opacity: 1;
    transform: scale(1);
    filter: blur(0px) brightness(1) var(--intro-logo-shadow);
}

.kh-intro-logo-wrap.is-exiting .kh-intro-crown-img {
    animation: khIntroFogOut 950ms ease-in both;
}

@keyframes khIntroFogIn {
    0% {
        opacity: 0;
        filter: blur(var(--intro-blur-max)) brightness(1.22) var(--intro-logo-shadow);
    }
    20% {
        opacity: 0.18;
        filter: blur(var(--intro-blur-strong)) brightness(1.18) var(--intro-logo-shadow);
    }
    45% {
        opacity: 0.45;
        filter: blur(var(--intro-blur-mid)) brightness(1.10) var(--intro-logo-shadow);
    }
    75% {
        opacity: 0.85;
        filter: blur(var(--intro-blur-soft)) brightness(1.03) var(--intro-logo-shadow);
    }
    100% {
        opacity: 1;
        filter: blur(0px) brightness(1) var(--intro-logo-shadow);
    }
}

@keyframes khIntroFogOut {
    0% {
        opacity: 1;
        filter: blur(0px) brightness(1) var(--intro-logo-shadow);
    }
    40% {
        opacity: 0.72;
        filter: blur(10px) brightness(1.03) var(--intro-logo-shadow);
    }
    70% {
        opacity: 0.34;
        filter: blur(28px) brightness(1.08) var(--intro-logo-shadow);
    }
    100% {
        opacity: 0;
        filter: blur(60px) brightness(1.12) var(--intro-logo-shadow);
    }
}

@keyframes khIntroGlowIn {
    0% {
        opacity: 0;
        filter: blur(56px);
    }
    55% {
        opacity: 0.85;
        filter: blur(40px);
    }
    100% {
        opacity: 0.38;
        filter: blur(32px);
    }
}

@keyframes khIntroGlowOut {
    0% {
        opacity: 0.38;
        filter: blur(32px);
    }
    100% {
        opacity: 0;
        filter: blur(56px);
    }
}

@keyframes khCrownZoomOut {
    from {
        opacity: 0;
        transform: scale(2.0);
    }

    30% {
        opacity: 1;
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Wordmark image — delayed fade + slide-up ─────────── */
.kh-intro-word-img {
    width: clamp(220px, 30vw, 340px);
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    opacity: 0;
    transform: translateY(8px);
    will-change: opacity, transform;
    transition:
        opacity 500ms cubic-bezier(0.4, 0, 0.2, 1),
        transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.4));
}

.kh-intro-word-img.kh-intro-word--visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Fallback full logo ────────────────────────────────── */
.kh-intro-fallback-img {
    width: clamp(180px, 25vw, 280px);
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    animation: khCrownZoomOut 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ── Reduced motion: no animations ────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .kh-intro-burst {
        display: none !important;
    }

    .kh-intro-crown-img,
    .kh-intro-fallback-img {
        animation: none;
    }

    .kh-intro-word-img {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .kh-intro-logo-wrap {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }

    .kh-intro-glow {
        animation: none !important;
        opacity: 0.18;
        filter: blur(10px);
    }

    .kh-intro-logo-wrap.is-exiting {
        transition: opacity 200ms ease;
        opacity: 0 !important;
    }

    #kh-intro-overlay.kh-intro-overlay--exit {
        transition: opacity 200ms ease;
    }
}

@media (max-width: 680px) {
    .kh-intro-inner {
        --intro-blur-max: 56px;
        --intro-blur-strong: 42px;
        --intro-blur-mid: 24px;
        --intro-blur-soft: 7px;
    }

    .kh-intro-glow {
        inset: -28px;
        filter: blur(28px);
    }
}

/* hero-intro legacy class — now unused, kept for safety */
.hero-intro {
    display: none !important;
}


/* ════════════════════════════════════════════════════════
   BANNER TRANSITION SPEED (match JS TRANSITION_MS = 550)
════════════════════════════════════════════════════════ */

/* Override the 0.7s set earlier */
.hero-banner {
    transition:
        opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ════════════════════════════════════════════════════════
   SVG CHIP ICONS
════════════════════════════════════════════════════════ */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.chip-icon {
    flex-shrink: 0;
    vertical-align: middle;
    color: var(--kh-brand-500);
    opacity: 0.9;
}

/* ════════════════════════════════════════════════════════
   STAGGER ENTRY — Banner 0 children animate in
════════════════════════════════════════════════════════ */

@keyframes hbFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* When Banner 0 becomes active, its inner children stagger in */
.hero-banner--active[data-banner="0"] .hb0-inner>* {
    animation: hbFadeUp 0.5s both ease;
}

.hero-banner--active[data-banner="0"] .hb0-inner>*:nth-child(1) {
    animation-delay: 0.05s;
}

.hero-banner--active[data-banner="0"] .hb0-inner>*:nth-child(2) {
    animation-delay: 0.12s;
}

.hero-banner--active[data-banner="0"] .hb0-inner>*:nth-child(3) {
    animation-delay: 0.18s;
}

.hero-banner--active[data-banner="0"] .hb0-inner>*:nth-child(4) {
    animation-delay: 0.24s;
}

.hero-banner--active[data-banner="0"] .hb0-inner>*:nth-child(5) {
    animation-delay: 0.30s;
}

.hero-banner--active[data-banner="0"] .hb0-inner>*:nth-child(6) {
    animation-delay: 0.36s;
}

/* Banner 1 (demo) bullets stagger */
.hero-banner--active[data-banner="1"] .hb-bullet:nth-child(1) {
    animation: hbFadeUp 0.4s 0.1s both ease;
}

.hero-banner--active[data-banner="1"] .hb-bullet:nth-child(2) {
    animation: hbFadeUp 0.4s 0.2s both ease;
}

.hero-banner--active[data-banner="1"] .hb-bullet:nth-child(3) {
    animation: hbFadeUp 0.4s 0.3s both ease;
}

/* Banner 2 reward cards stagger (already defined, but ensure correct timing) */

/* ════════════════════════════════════════════════════════
   MICRO-INTERACTIONS — Premium hover states
════════════════════════════════════════════════════════ */

/* Button lift + shadow on hover (enhance existing) */
.btn-primary:hover {
    box-shadow: 0 10px 32px rgba(33, 82, 173, 0.30);
}

.btn-ghost:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Chip: subtle lift */
.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(33, 82, 173, 0.13);
}

/* ════════════════════════════════════════════════════════
   REDUCED MOTION: disable intro + stagger
════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    .hero-intro {
        display: none !important;
    }

    .hero-intro-word {
        animation: none;
    }

    .hero-banner--active .hb0-inner>*,
    .hero-banner--active .hb-bullet {
        animation: none !important;
    }
}
