/* ===== Cybria welcome experience ===== */

/* --- intro --- */
#intro{position:fixed;inset:0;z-index:1000;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;transition:opacity 1s ease,visibility 1s}
#intro.out{opacity:0;visibility:hidden}
#intro svg{width:min(620px,86vw);height:auto;overflow:visible}
#intro .who{font:600 clamp(1rem,2.4vw,1.35rem)/1.3 "Plus Jakarta Sans",sans-serif;color:#4a2a63;opacity:0;transform:translateY(8px);transition:opacity 1s ease 3.5s,transform 1s ease 3.5s;text-align:center;padding:0 20px}
#intro.go .who{opacity:1;transform:none}
#intro .skip{position:absolute;right:22px;bottom:22px;background:none;border:1.5px solid #e2dcef;color:#6f6c8a;border-radius:999px;padding:8px 16px;font:600 .85rem "Plus Jakarta Sans",sans-serif;cursor:pointer}
#intro .skip:hover{border-color:#7b2ff7;color:#7b2ff7}
#intro .c-out{stroke-dasharray:110;stroke-dashoffset:110}
#intro .c-in{stroke-dasharray:56;stroke-dashoffset:56}
#intro.go .c-out{animation:draw 1.3s cubic-bezier(.6,0,.2,1) forwards}
#intro.go .c-in{animation:draw 1.1s cubic-bezier(.6,0,.2,1) .45s forwards}
#intro .px{opacity:0;transform-box:fill-box;transform-origin:center}
#intro.go .px{animation:fly 1s cubic-bezier(.2,.9,.3,1.3) forwards}
#intro .wm{opacity:0;transform-box:fill-box;transform-origin:center;transform:scale(.93)}
#intro.go .wm{animation:pop 1.4s cubic-bezier(.2,.8,.2,1) 1s forwards}
#intro .rule{transform-box:fill-box;transform-origin:center;transform:scaleX(0)}
#intro.go .rule{animation:grow 1s ease 2s forwards}
#intro .tag{clip-path:inset(0 100% 0 0)}
#intro.go .tag{animation:type 1.5s steps(26) 2.4s forwards}
#intro .sweep{height:40px;width:auto;fill:#8f86b8;margin-top:-2px}
#intro .sweep g{opacity:0}
#intro.go .sweep g{animation:sweep 1.8s ease-out forwards}
#intro.go .sweep g:nth-child(1){animation-delay:3.6s}#intro.go .sweep g:nth-child(2){animation-delay:3.9s}#intro.go .sweep g:nth-child(3){animation-delay:4.2s}
@keyframes sweep{0%{opacity:0;transform:translateX(-14px)}60%{opacity:1}100%{opacity:var(--o,1);transform:none}}
#intro .sweep g:nth-child(1){--o:.35}#intro .sweep g:nth-child(2){--o:.67}
@keyframes draw{to{stroke-dashoffset:0}}
@keyframes fly{from{opacity:0;transform:translate(var(--dx),var(--dy)) scale(.2) rotate(90deg)}to{opacity:1;transform:none}}
@keyframes pop{to{opacity:1;transform:none}}
@keyframes grow{to{transform:scaleX(1)}}
@keyframes type{to{clip-path:inset(0 0 0 0)}}

/* --- greeting line in the hero --- */
.greet{font-weight:700;font-size:1.05rem;color:#4a2a63;margin-bottom:10px;min-height:1.6em}
.greet .hi{background:linear-gradient(110deg,#e6007e,#7b2ff7);-webkit-background-clip:text;background-clip:text;color:transparent}
.greet .caret{display:inline-block;width:2px;height:1.05em;background:#e6007e;margin-left:2px;vertical-align:-2px;animation:blink 1s steps(1) infinite}
@keyframes blink{50%{opacity:0}}

/* --- sound button --- */
.snd{position:fixed;left:22px;bottom:22px;z-index:60;display:flex;align-items:center;gap:10px}
.snd button{width:48px;height:48px;border-radius:50%;border:1.5px solid #e2dcef;background:#fff;box-shadow:0 8px 22px -10px rgba(40,20,90,.35);cursor:pointer;display:grid;place-items:center;color:#4a2a63;transition:transform .2s}
.snd button:hover{transform:scale(1.07)}
.snd button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.snd.pulse button{animation:ring 1.6s ease-out 3}
@keyframes ring{0%{box-shadow:0 0 0 0 rgba(230,0,126,.45)}100%{box-shadow:0 0 0 16px rgba(230,0,126,0)}}
.snd .tip{background:#120d2e;color:#fff;font-size:.82rem;font-weight:600;padding:8px 12px;border-radius:10px;opacity:0;transform:translateX(-6px);transition:.35s;pointer-events:none;white-space:nowrap}
.snd.show-tip .tip{opacity:1;transform:none}
.snd.playing button{color:#e6007e;border-color:#f6b3d6}

/* --- chat bubble --- */
.chat{position:fixed;right:22px;bottom:94px;z-index:61;width:min(330px,calc(100vw - 44px));background:#fff;border-radius:18px;box-shadow:0 24px 50px -18px rgba(30,10,80,.45);border:1px solid #ece8f6;padding:16px 16px 14px;transform:translateY(16px) scale(.96);opacity:0;visibility:hidden;transition:.35s cubic-bezier(.2,.8,.2,1);transform-origin:bottom right}
.chat.open{transform:none;opacity:1;visibility:visible}
.chat::after{content:"";position:absolute;right:22px;bottom:-8px;width:16px;height:16px;background:#fff;border-right:1px solid #ece8f6;border-bottom:1px solid #ece8f6;transform:rotate(45deg)}
.chat .top{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.chat .av{width:38px;height:38px;border-radius:50%;background:#fff;border:1px solid #ece8f6;display:grid;place-items:center;overflow:hidden}
.chat .av img{width:30px;height:30px}
.chat .nm{font-weight:700;font-size:.92rem;line-height:1.2}
.chat .st{font-size:.75rem;color:#14945a;font-weight:600}
.chat .x{margin-left:auto;background:none;border:0;font-size:1.3rem;line-height:1;color:#9a97b0;cursor:pointer;padding:4px}
.chat .msg{background:#f5f2fd;border-radius:14px 14px 14px 4px;padding:10px 13px;font-size:.92rem;color:#2a2640;min-height:40px}
.chat .typing span{display:inline-block;width:7px;height:7px;border-radius:50%;background:#b3a9d6;margin-right:4px;animation:bob 1s infinite}
.chat .typing span:nth-child(2){animation-delay:.15s}.chat .typing span:nth-child(3){animation-delay:.3s}
@keyframes bob{50%{transform:translateY(-4px)}}
.chat .opts{display:flex;flex-wrap:wrap;gap:7px;margin-top:11px;opacity:0;transform:translateY(6px);transition:.35s .1s}
.chat.ready .opts{opacity:1;transform:none}
.chat .opts a,.chat .opts button{font:600 .82rem "Plus Jakarta Sans",sans-serif;border:1.5px solid #e2dcef;background:#fff;color:#4a2a63;border-radius:999px;padding:7px 12px;cursor:pointer;text-decoration:none;transition:.2s}
.chat .opts a:hover,.chat .opts button:hover{border-color:#7b2ff7;color:#7b2ff7;background:#faf7ff}
.chat .opts .wa{background:#25d366;border-color:#25d366;color:#fff}
.chat .opts .wa:hover{background:#1fb457;border-color:#1fb457;color:#fff}

/* --- festival bar --- */
.fest{position:relative;z-index:51;color:#fff;text-align:center;font-weight:700;font-size:.92rem;padding:9px 44px;background:linear-gradient(90deg,#e6007e,#7b2ff7,#00a8e8,#7b2ff7,#e6007e);background-size:200% 100%;animation:sheen 10s linear infinite}
.fest button{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:0;color:#fff;font-size:1.2rem;cursor:pointer;opacity:.85}
@keyframes sheen{to{background-position:200% 0}}

@media (max-width:760px){.snd{left:14px;bottom:14px}.chat{right:14px;bottom:86px}.snd .tip{display:none}}
@media (prefers-reduced-motion:reduce){#intro{display:none}}
