/* Motion layer: preserve existing typography, cards and page structure. */
body.home-motion { --motion-ease:cubic-bezier(.16,1,.3,1);overflow-x:clip;overflow-y:visible; }
.welcome-scene { display:none; }
.welcome-pending .welcome-scene {
  position:fixed; inset:0; z-index:100000; display:grid; place-content:center;
  background:#f3f0f8; color:#292332; padding:28px; text-align:center;
  animation:welcome-curtain 850ms cubic-bezier(.76,0,.24,1) 1200ms forwards;
}
[data-theme="dark"].welcome-pending .welcome-scene { background:#171522; color:#eee8fa; }
.welcome-scene p { margin:0; font:400 clamp(26px,4vw,54px)/1.2 var(--font-body); letter-spacing:-.04em; }
.welcome-scene p span { display:inline-block; animation:welcome-word 850ms var(--motion-ease) both; }
.welcome-scene p span:nth-child(2) { animation-delay:120ms; }
.welcome-scene p span:nth-child(3) { animation-delay:240ms; }
.welcome-scene p span:nth-child(4) { animation-delay:360ms; }
.welcome-accent { color:var(--accent-dark); }
.welcome-skip { position:absolute; bottom:max(28px,env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); border:0; background:transparent; color:inherit; font:400 13px var(--font-body); padding:14px 20px; cursor:pointer; white-space:nowrap; }
@keyframes welcome-word { from { opacity:0; filter:blur(12px); transform:translateY(18px); } to { opacity:1; filter:blur(0); transform:none; } }
@keyframes welcome-curtain { to { transform:translateY(-101%); border-radius:0 0 64px 64px; visibility:hidden; } }
.motion-replay { display:inline-flex; align-items:center; gap:8px; border:0; padding:10px 0; margin-top:10px; background:transparent; color:var(--text-muted); font:400 12px var(--font-body); cursor:pointer; }
.motion-replay[hidden] { display:none; }
.motion-replay:hover { color:var(--accent-dark); }
.home-motion #hero { isolation:isolate; }
.welcome-mascot { display:flex;justify-content:center;margin-bottom:20px; }
.welcome-mascot .site-mascot { width:100px;height:100px;object-fit:contain;animation:mascot-hello 1100ms var(--motion-ease) both; }
@keyframes mascot-hello { from{opacity:0;transform:translateY(24px) rotate(-12deg) scale(.8)}to{opacity:1;transform:none} }
.home-motion #hero .hero-photo-card { position:relative; }
.motion-toggle { margin-left:20px; }
.certificate-mascot { position:absolute;z-index:2;top:8px;right:10px;width:76px;height:76px;pointer-events:none; }
.certificate-mascot .site-mascot { width:76px;height:76px;object-fit:contain; }
html.lenis.lenis-smooth { scroll-behavior:auto!important; }
@media(min-width:1000px) and (min-height:760px) {
  .home-motion #education { overflow:visible!important; }
  .home-motion .education-certificates { position:sticky;top:90px;align-self:start; }
}
@media(max-width:700px) {
  .welcome-mascot .site-mascot { width:78px;height:78px; }
  .motion-toggle { margin-left:12px; }
}
/* Both outer surfaces and the illustrated phone UI follow the dark theme. */
html[data-theme="dark"] body #telegram-tools .home-tools-card { background:linear-gradient(120deg,#1d2030,#272338)!important;border-color:#39364d!important; }
html[data-theme="dark"] body #telegram-tools :is(h2,.home-tool-caption strong) { color:#f1ecff!important; }
html[data-theme="dark"] body #telegram-tools :is(.home-tools-copy>p,.home-tool-caption span) { color:#c3bdd5!important; }
html[data-theme="dark"] body #telegram-tools .section-kicker { color:#bbb0e2!important; }
html[data-theme="dark"] body #telegram-tools .btn-outline { color:#e7ddff!important;border-color:#9d8cdf!important;background:rgba(156,129,222,.09)!important; }
html[data-theme="dark"] body #telegram-tools .home-tool-mock { background:rgba(255,255,255,.04)!important;border-color:#45405c!important; }
html[data-theme="dark"] body #telegram-tools :is(.home-route-phone,.home-route-card,.home-safe-bubble,.home-letter-preview) { background:#211e33!important;border-color:#4a4166!important;color:#ece6fb!important; }
html[data-theme="dark"] body #telegram-tools :is(.home-route-phone strong,.home-route-card em,.home-letter-preview strong) { color:#ece6fb!important; }
html[data-theme="dark"] body #telegram-tools .home-route-card>span { color:#bcb3d2!important; }
html[data-theme="dark"] body #telegram-tools .home-route-card em { background:#302943!important; }
html[data-theme="dark"] body #telegram-tools :is(.home-safe-grid span,.home-route-card b) { background:#302943!important;border-color:#534572!important;color:#ddd0ff!important; }
html[data-theme="dark"] body #telegram-tools small { color:#bdabff!important; }
html.motion-paused .site-mascot,html.motion-paused body.home-motion #hero::before,html.motion-paused body.home-motion #hero::after { animation:none!important; }
html.motion-paused body.home-motion .motion-reveal { translate:none!important;clip-path:none!important;filter:none!important;transition:opacity 250ms ease!important; }
html body.home-motion #hero :is(.hero-text,.hero-photo-card) { opacity:1; transform:none; animation:none; }
.hero-photo-window { overflow:hidden; border-radius:20px; }
.home-motion #hero .hero-photo { transform:translateY(var(--photo-y,0px)) scale(1.08); transition:transform 180ms linear; }
/* State rules beat legacy AOS !important visibility; content is visible without JS. */
html body.home-motion .motion-reveal {
  opacity:1!important; translate:0 0; filter:blur(0);
  transition:opacity 900ms var(--motion-ease),translate 1100ms var(--motion-ease),filter 900ms var(--motion-ease),clip-path 1100ms var(--motion-ease)!important;
  transition-delay:var(--reveal-delay,0ms)!important;
}
html body.home-motion .motion-reveal:not(.is-revealed) { opacity:0!important; translate:0 52px; filter:blur(5px); }
html body.home-motion .motion-reveal.motion-mask:not(.is-revealed) { clip-path:inset(0 0 100% 0); translate:0 35px; filter:none; }
html body.home-motion .motion-reveal.motion-mask.is-revealed { clip-path:inset(-4px -4px -4px -4px); }
html body.home-motion .motion-reveal.motion-photo:not(.is-revealed) { clip-path:inset(10% 0 0 0 round 26px); translate:0 40px; filter:none; }
html body.home-motion .motion-reveal.motion-photo.is-revealed { clip-path:inset(-4px -4px -4px -4px round 26px); }
html body.home-motion #hero::before,html body.home-motion #hero::after { animation:none; filter:none; pointer-events:none; }
html body.home-motion #hero::before { background:radial-gradient(ellipse,rgba(159,136,239,.27),transparent 68%); }
html body.home-motion #hero::after { background:radial-gradient(ellipse,rgba(216,172,211,.18),transparent 68%); }
html body.home-motion.hero-in-view #hero::before { animation:ambient-light 12s ease-in-out infinite alternate; }
html body.home-motion.hero-in-view #hero::after { animation:ambient-light 16s ease-in-out -6s infinite alternate-reverse; }
@keyframes ambient-light { from { transform:translate3d(-8%,-4%,0) scale(.92); } to { transform:translate3d(12%,10%,0) scale(1.15); } }
.home-motion .topics-explorer-arrow { transition:translate 450ms var(--motion-ease); }
.home-motion .topics-explorer-card:hover .topics-explorer-arrow { translate:5px 0; }
.home-motion .btn:active { transform:translateY(1px) scale(.98)!important; }
.home-motion .self-check-list label:has(input:checked) { background:var(--accent-soft); box-shadow:inset 3px 0 var(--accent); }
.home-motion :is(.approach-modal,.pricing-modal) { transform-origin:50% 70%; }
html body.home-motion :is(.approach-modal-overlay.active,.pricing-modal-overlay.active,.pricing-modal-overlay.open) :is(.approach-modal,.pricing-modal) { animation:motion-dialog 550ms var(--motion-ease) both; }
@keyframes motion-dialog { from { opacity:0; transform:translateY(30px) scale(.94); } to { opacity:1; transform:none; } }
html.theme-wipe::view-transition-old(root),html.theme-wipe::view-transition-new(root) { animation:none; mix-blend-mode:normal; }
html.theme-wipe::view-transition-new(root) { z-index:1; }
/* Reduce motion to a short dissolve. Deliberate replay opts into the full entrance. */
@media(prefers-reduced-motion:reduce) {
  html:not(.motion-explicit).welcome-pending .welcome-scene { animation:welcome-dissolve 300ms ease 1000ms forwards; }
  html:not(.motion-explicit) .welcome-scene p span { animation:welcome-word-reduced 350ms ease both; }
  html:not(.motion-explicit) body.home-motion .motion-reveal { transition:opacity 300ms ease!important; transition-delay:0ms!important; clip-path:none!important; translate:none!important; filter:none!important; }
  html:not(.motion-explicit) .home-motion #hero .hero-photo { transform:none; transition:none; }
  html:not(.motion-explicit) body.home-motion #hero::before,html:not(.motion-explicit) body.home-motion #hero::after { animation:none!important; }
  html:not(.motion-explicit) body.home-motion :is(.approach-modal,.pricing-modal) { animation:none!important; }
}
@keyframes welcome-dissolve { to { opacity:0; visibility:hidden; } }
@keyframes welcome-word-reduced { from { opacity:0; } to { opacity:1; } }
