/* ==========================================================================
   Hero
   ========================================================================== */
.hx { position: relative; overflow: hidden; display: flex; align-items: center; min-height: calc(100vh - 72px); padding: 48px 0 64px; }

.hx-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .42; z-index: 0; animation: hxDrift 18s ease-in-out infinite; pointer-events: none; }
.hx-blob.b1 { width: 420px; height: 420px; background: var(--primary); top: -120px; left: -100px; }
.hx-blob.b2 { width: 360px; height: 360px; background: var(--accent); bottom: -120px; right: 8%; animation-delay: -6s; opacity: .28; }
.hx-blob.b3 { width: 300px; height: 300px; background: var(--secondary); top: 20%; right: -80px; animation-delay: -11s; opacity: .28; }
.dark-theme .hx-blob { opacity: .26; }
@keyframes hxDrift { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,30px) scale(1.08); } 66% { transform: translate(-30px,50px) scale(.95); } }

.hx-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }

.hx-pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: .76rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); }
.hx-title { margin: 1rem 0; font-size: clamp(2.1rem, 4.8vw, 3.7rem); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.hx-rot { display: block; min-height: 1.2em; }
.hx-rot span { display: inline-block; padding-bottom: .08em; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: hxWord .6s cubic-bezier(.2,.8,.2,1); }
@keyframes hxWord { from { opacity: 0; transform: translateY(.5em); } to { opacity: 1; transform: none; } }

.hx-lead { max-width: 540px; color: var(--muted); font-size: 1.02rem; }
.lead-short { display: none; }

.hx-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6rem 0 1.4rem; }
.hx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: .75rem 1.3rem; border-radius: 12px; font-size: .93rem; font-weight: 600; border: 1px solid transparent; transition: transform .2s, box-shadow .2s, border-color .2s; }
.hx-btn-primary { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); box-shadow: 0 8px 20px rgba(99,102,241,.35); }
.hx-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(99,102,241,.45); }
.hx-btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.hx-btn-ghost:hover { transform: translateY(-2px); border-color: var(--primary); }

.hx-stats { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hx-stats > div { display: flex; flex-direction: column; }
.hx-stats > div + div { padding-left: 1.5rem; border-left: 1px solid var(--border); }
.hx-stats strong { font-size: 1.55rem; font-weight: 800; line-height: 1.1; }
.hx-stats > div > span { font-size: .8rem; color: var(--muted); }

.hx-trust { display: flex; flex-wrap: wrap; gap: 1.3rem; margin-top: 1.4rem; font-size: .85rem; color: var(--muted); }
.hx-trust span { display: inline-flex; align-items: center; gap: 8px; }
.hx-trust i { color: var(--primary); }

/* Visual: phone with a looping conversation */
.hx-visual { position: relative; display: flex; justify-content: center; padding: 16px 0; }
.hx-phone { position: relative; width: min(290px, 82vw); border-radius: 30px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 12px; animation: hxFloat 7s ease-in-out infinite; }
@keyframes hxFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
.hx-phone-top { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; border-bottom: 1px solid var(--border); }
.hx-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.hx-phone-top b { display: block; font-size: .85rem; line-height: 1.2; }
.hx-phone-top small { font-size: .7rem; color: var(--success); }
.hx-phone-top small::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: 5px; animation: hxPulse 1.6s infinite; }
@keyframes hxPulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.hx-chat { height: 245px; padding: 14px 2px 4px; display: flex; flex-direction: column; justify-content: flex-end; gap: 9px; overflow: hidden; }
.hx-msg { max-width: 86%; padding: 9px 13px; border-radius: 16px; font-size: .82rem; line-height: 1.45; animation: hxPop .45s cubic-bezier(.2,.9,.3,1.2) both; }
.hx-msg.them { align-self: flex-start; background: var(--bg-soft); border-bottom-left-radius: 5px; }
.hx-msg.me { align-self: flex-end; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-bottom-right-radius: 5px; }
.hx-msg small { display: block; margin-top: 2px; font-size: .64rem; opacity: .7; }
@keyframes hxPop { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }
.hx-typing { align-self: flex-start; display: flex; gap: 5px; padding: 11px 13px; border-radius: 16px; background: var(--bg-soft); }
.hx-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: hxBounce 1s infinite; }
.hx-typing i:nth-child(2) { animation-delay: .15s; } .hx-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hxBounce { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

.hx-level { display: flex; align-items: center; gap: 9px; margin-top: 6px; padding: 9px 11px; border-radius: 13px; background: var(--bg-soft); font-size: .76rem; }
.hx-level > i { color: var(--success); }
.hx-level .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--border); overflow: hidden; }
.hx-level .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--accent)); animation: hxFill 6s ease-in-out infinite; }
@keyframes hxFill { 0% { width: 12%; } 70%,100% { width: 86%; } }

.hx-chip { position: absolute; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 15px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .78rem; font-weight: 600; white-space: nowrap; animation: hxFloat2 6s ease-in-out infinite; }
.hx-chip i { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem; }
.hx-chip small { display: block; font-weight: 400; color: var(--muted); font-size: .68rem; line-height: 1.2; }
.hx-chip.c1 { left: -2%; top: 8%; } .hx-chip.c1 i { background: linear-gradient(135deg, #f59e0b, #ec4899); }
.hx-chip.c2 { right: -3%; top: 50%; animation-delay: -2s; } .hx-chip.c2 i { background: linear-gradient(135deg, var(--success), var(--secondary)); }
.hx-chip.c3 { left: -1%; bottom: 3%; animation-delay: -4s; } .hx-chip.c3 i { background: linear-gradient(135deg, var(--primary), var(--accent)); }
@keyframes hxFloat2 { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.hx-rise { opacity: 0; transform: translateY(22px); animation: hxRise .8s cubic-bezier(.2,.8,.2,1) forwards; }
.hx-rise.d1 { animation-delay: .05s; } .hx-rise.d2 { animation-delay: .15s; } .hx-rise.d3 { animation-delay: .25s; } .hx-rise.d4 { animation-delay: .35s; } .hx-rise.d5 { animation-delay: .45s; }
@keyframes hxRise { to { opacity: 1; transform: none; } }

/* ---------- Tablet / mobile: short text, animation visible right away ---------- */
@media (max-width: 900px) {
    .hx { min-height: 0; padding: 22px 0 44px; }
    .hx-inner { grid-template-columns: 1fr; gap: 1.4rem; text-align: center; }
    .hx-title { margin: .8rem 0 .5rem; font-size: clamp(1.9rem, 8.5vw, 2.5rem); }
    .lead-full { display: none; }
    .lead-short { display: inline; }
    .hx-lead { margin: 0 auto; font-size: .98rem; }
    .hx-cta { justify-content: center; margin: 1.1rem 0 0; gap: 10px; }
    .hx-btn { flex: 1 1 100%; padding: .8rem 1rem; }
    .hx-stats, .hx-trust { display: none; }
    .hx-chip { display: none; }
    .hx-visual { padding: 4px 0 0; }
    .hx-phone { width: min(270px, 78vw); }
    .hx-chat { height: 190px; }
}
@media (max-width: 380px) { .hx-phone { width: 250px; } .hx-chat { height: 170px; } }

@media (prefers-reduced-motion: reduce) {
    .hx *, .hx-blob { animation: none !important; }
    .hx-rise { opacity: 1; transform: none; }
}
