/* Landing composition. Greeting, clear-face scene, invitation, then entry. */
.landing-v2 *{box-sizing:border-box}
.landing-v2{--portrait-size:min(67cqw,250px);width:390px;height:min(844px,100dvh);position:relative;display:flex;flex-direction:column;container-type:size;overflow:auto;border-radius:32px;background:radial-gradient(ellipse at 17% 29%,color-mix(in srgb,var(--balu-honey) 34%,transparent),transparent 45%),radial-gradient(ellipse at 85% 43%,color-mix(in srgb,var(--balu-border) 48%,transparent),transparent 49%),var(--balu-paper)}
.reference-design .landing-v2{width:100%;height:100%;min-height:0;flex:1;border:0;border-radius:0;box-shadow:none;animation:none}
.landing-v2 button{font:inherit;cursor:pointer}
.landing-v2:after{content:'';pointer-events:none;position:absolute;inset:0;opacity:.05;mix-blend-mode:multiply;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.55' filter='url(%23n)'/%3E%3C/svg%3E")}
.landing-v2 .brand{height:55px;flex:none;display:flex;justify-content:flex-end;align-items:center;padding:8px 20px 0}
.landing-v2 .language{position:relative;width:48px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;background:transparent;border-radius:12px}
.landing-v2 .language:focus-visible{outline:2px solid var(--balu-focus);outline-offset:4px}
.language-tile{transform:scale(.75);transform-origin:top left;position:absolute;left:2px;top:1px;width:36px;height:36px;display:grid;place-items:center;border:1px solid var(--balu-border);border-radius:9px;background:var(--balu-sage);color:var(--balu-on-sage);font:500 24px/1 var(--font-ui);transition:transform .2s,background .2s;color:var(--balu-on-sage)}
.language-tile.devanagari{font-family:'Noto Sans Devanagari',sans-serif;padding-top:4px}
.language-tile.is-selected{z-index:1;transform:translate(14px,9px) scale(.75);background:var(--balu-primary);border-color:var(--balu-primary);color:var(--balu-cream);box-shadow:0 3px 8px color-mix(in srgb,var(--balu-primary) 12%,transparent)}
.landing-v2 .greeting{position:relative;z-index:2;flex:none;align-self:center;text-align:center;background:var(--balu-on-primary);border:1px solid var(--balu-surface);box-shadow:0 8px 22px color-mix(in srgb,var(--balu-on-sage) 6%,transparent);border-radius:25px;padding:12px 22px;margin-top:4px;width:252px}
.landing-v2 .greeting h1{font-size:23px;line-height:1.4;font-weight:500;letter-spacing:-.65px;margin:0}
.landing-v2 .greeting p{font-size:15px;line-height:1.5;color:var(--balu-muted);margin:4px 0 0}
.landing-v2 .greeting-wave{display:inline-block;font-size:23px}
.landing-v2 .greeting-tail{position:absolute;width:17px;height:17px;bottom:-9px;left:calc(50% - 9px);background:var(--balu-on-primary);border-radius:0 0 4px 0;transform:rotate(45deg)}
.landing-v2 .scene{--portrait-size:min(67cqw,250px);position:relative;display:flex;flex-direction:column;align-items:center;flex:1 0 auto;min-height:0;margin:20px 0 0;gap:10px}
.landing-v2 .bear-stage{position:relative;flex:none;width:var(--portrait-size);height:var(--portrait-size)}
.landing-v2 .bear{width:100%;height:100%;position:relative;z-index:1;overflow:visible;filter:drop-shadow(0 7px 4px color-mix(in srgb,var(--balu-on-peach) 8%,transparent))}
.landing-v2 .bear-shadow{position:absolute;bottom:8%;left:29%;width:46%;height:4%;border-radius:50%;background:color-mix(in srgb,var(--balu-on-peach) 14%,transparent);filter:blur(7px)}
.landing-v2 .halo{position:absolute;width:var(--portrait-size);height:var(--portrait-size);left:calc(50% - var(--portrait-size)/2);top:0;border-radius:50%;background:radial-gradient(ellipse,color-mix(in srgb,var(--balu-honey) 30%,transparent),transparent 70%)}
.landing-v2 .landing-topics{width:100%;display:grid;grid-template-columns:max-content max-content;justify-content:center;align-items:center;gap:15px 20px;padding:4px 14px 10px}
.landing-v2 .topic{position:relative;z-index:2;width:max-content;max-width:163px;min-height:0;justify-self:center;display:flex;gap:6px;align-items:center;padding:10px;border:1px solid var(--border);border-radius:19px;background:var(--bg);color:var(--balu-ink);box-shadow:0 6px 16px color-mix(in srgb,var(--balu-muted) 6%,transparent);transform:rotate(var(--tilt))}
.landing-v2 .topic:after{content:'';position:absolute;bottom:-7px;width:14px;height:14px;background:var(--bg);border-right:1px solid var(--border);border-bottom:1px solid var(--border);transform:rotate(42deg);border-radius:0 0 3px 0}
.landing-v2 .topic p{font-size:14px;line-height:1.45;letter-spacing:-.3px;margin:0;white-space:nowrap}
.landing-v2 .topic strong{font-weight:500;color:var(--accent)}
.landing-v2 .topic-icon{font-size:19px;flex:none}
.landing-v2 .topic-one{--bg:var(--balu-honey);--border:var(--balu-secondary);--accent:var(--balu-on-honey);--tilt:-5deg;}
.landing-v2 .topic-two{--bg:var(--balu-peach);--border:var(--balu-border);--accent:var(--balu-on-peach);--tilt:5deg;}
.landing-v2 .topic-three{--bg:var(--balu-sage);--border:var(--balu-border);--accent:var(--balu-on-sage);--tilt:-5deg;}
.landing-v2 .topic-four{--bg:var(--balu-lilac);--border:var(--balu-border);--accent:var(--balu-on-lilac);--tilt:5deg;}
.landing-v2 .topic-one:after,.landing-v2 .topic-three:after{right:17px}
.landing-v2 .topic-two:after,.landing-v2 .topic-four:after{left:17px}
.landing-v2 .spark{position:absolute;color:var(--balu-secondary);z-index:0}
.landing-v2 .spark-one{right:22px;top:118px;font-size:24px}
.landing-v2 .spark-two{left:25px;top:190px;font-size:13px}
.landing-v2 .spark-three{left:40px;top:50px;font-size:20px}
.landing-v2 .invitation{position:relative;height:118px;flex:none;text-align:center;margin-top:18px}
.landing-v2 .invite-bubble{display:inline-block;position:relative;border:1px solid var(--balu-border);border-radius:24px;background:var(--balu-paper);padding:9px 22px;box-shadow:0 5px 12px color-mix(in srgb,var(--balu-on-sage) 4%,transparent)}
.landing-v2 .invite-bubble:before{content:'';position:absolute;top:-7px;left:calc(50% - 6px);height:12px;width:12px;background:var(--balu-paper);border-top:1px solid var(--balu-border);border-left:1px solid var(--balu-border);transform:rotate(45deg)}
.landing-v2 .invite-bubble p{font-size:16px;line-height:1.5;margin:0;color:var(--balu-muted)}
.landing-v2 .invite-bubble h2{font-size:27px;letter-spacing:-1px;line-height:1.25;font-weight:500;margin:2px 0 0}
.landing-v2 .swirl{position:absolute;width:88px;height:64px;left:calc(50% + 38px);top:65px;color:var(--balu-muted);transform:rotate(9deg)}
.landing-v2 footer{display:flex;justify-content:center;flex:none;padding:0 20px 24px;z-index:2}
.landing-v2 .hello-button{display:flex;align-items:center;justify-content:center;gap:13px;min-width:242px;min-height:55px;padding:12px 24px;font-size:18px;font-weight:500;line-height:1.4;background:var(--balu-primary);color:var(--balu-cream);border:0;border-radius:40px;box-shadow:var(--balu-shadow)}
.landing-v2 .hello-button:active{background:var(--balu-primary-pressed)}
.landing-v2 .cta-wave{font-size:23px}
/* Generated five-second welcome. Transparent video overlays its matching still. */
.landing-v2 .landing-still{display:block;object-fit:contain}
.landing-v2 .landing-video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;z-index:2;pointer-events:none}
.landing-v2 .landing-video[hidden]{display:none}
.landing-v2 .bear-stage:has(.landing-video:not([hidden])) .landing-still{visibility:hidden}
@media(prefers-reduced-motion:reduce){.landing-v2 .landing-video{display:none!important}.landing-v2 .bear-stage .landing-still{visibility:visible!important}}
@container(max-height:740px){.landing-v2 .brand{height:55px;padding-top:4px}.landing-v2 .greeting{padding:9px 20px}.landing-v2 .scene{--portrait-size:min(61cqw,215px);margin-top:18px;gap:6px}.landing-v2 .landing-topics{gap:13px 18px}.landing-v2 .topic{padding:8px 10px}.landing-v2 .invitation{height:106px;margin-top:13px}.landing-v2 .swirl{height:58px;top:61px}.landing-v2 footer{padding-bottom:18px}.landing-v2 .hello-button{min-height:52px}}
@container(max-height:660px){.landing-v2 .scene{--portrait-size:min(55cqw,180px);margin-top:16px}.landing-v2 .greeting h1{font-size:21px}.landing-v2 .greeting p{font-size:14px}.landing-v2 .invitation{height:102px;margin-top:11px}.landing-v2 .invite-bubble h2{font-size:25px}}
@container(max-width:350px){.landing-v2 .topic{padding:8px;gap:4px}.landing-v2 .topic p{font-size:12.5px}.landing-v2 .topic-icon{font-size:17px}.landing-v2 .greeting{width:234px}}
html[lang=hi] .landing-v2 .topic p{white-space:normal;letter-spacing:0;line-height:1.5}
html[lang=hi] .landing-v2 .greeting h1{letter-spacing:0}
@media(prefers-reduced-motion:reduce){.landing-v2 *{animation:none!important;transition:none!important}}

/* Phone entry uses the same conversation roles and typing component as chat. */
.staged-greeting .language{position:relative;width:48px;height:44px;border:0;background:transparent;box-shadow:none;padding:0;flex:none}
.staged-greeting .greeting-thread{display:flex;flex-direction:column;gap:14px;padding:22px 22px 0}
.staged-greeting .greeting-user-bubble{align-self:flex-end;max-width:88%;padding:11px 16px;border-radius:20px 20px 5px 20px;background:var(--balu-sage);color:var(--balu-ink);font-size:16px;line-height:1.5;overflow-wrap:anywhere}
.staged-greeting .greeting-user-bubble.is-arriving{animation:hello-reveal .3s ease-out both}
.staged-greeting .greeting-response{min-height:58px}
.staged-greeting .hello-bubble{width:fit-content;max-width:94%;background:var(--balu-surface);border:0;box-shadow:none}
.staged-greeting .hello-bubble p{margin:0;line-height:1.5}
.staged-greeting.login-visible .hello-bubble{animation:none}
.staged-greeting .chat-typing-presence{padding:10px 0;margin:0;min-height:40px}
.staged-greeting .greeting-login-space{margin-top:auto}
.staged-greeting .inline-login{animation:hello-reveal .3s ease-out both}
@container(max-height:680px){.staged-greeting .greeting-thread{padding-top:12px;gap:10px}.staged-greeting .greeting-login-space{margin-top:auto}}
@media(prefers-reduced-motion:reduce){.staged-greeting .greeting-user-bubble,.staged-greeting .hello-bubble,.staged-greeting .inline-login{animation:none}}
