/* Home page: a pinned opening that folds into the hero ribbons, plus page grain and living faces.
   The intro only exists under .intro-on (set in <head> when motion is allowed). */

/* Pinned stage. The page after it starts --run below the top, so the hero rises
   under the stage while the panels fold, and both land together. */
.intro{display:none}
.intro-on .intro{display:block;position:relative;z-index:20;--run:105vh;height:calc(100vh + var(--run));height:calc(100svh + var(--run));margin-bottom:-100vh;margin-bottom:calc(-1 * 100svh);pointer-events:none}
.intro-stage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden}
.intro-panels,.intro-faces{position:absolute;inset:0}
.intro-panel{position:absolute;inset:0;overflow:hidden}
/* The panel that folds first is drawn on top, so it crosses over the ones still open. */
/* Before intro.js runs, the panels, their content and the faces already sit where it puts them
   (its widths: 27/46/27% with 10px gaps; 22/56/22 at 900px; 13/74/13 with 6px gaps at 600px), so the
   opening never jumps. */
.intro-panel.orange{z-index:3;background:#FF5722;color:#20211F;clip-path:inset(0 calc(73% + 5.4px) 0 0)}
.intro-panel.purple{z-index:2;background:#673AB7;color:#F5F3ED;clip-path:inset(0 calc(27% + 4.6px) 0 calc(27% + 4.6px))}
.intro-panel.yellow{z-index:1;background:#FFEB3B;color:#20211F;clip-path:inset(0 0 0 calc(73% + 5.4px))}
/* Own layers: folding re-clips the panel without repainting its artwork. */
.intro-art,.intro-content{will-change:transform,opacity}
.intro-art{position:absolute;inset:0}

/* Each panel gets its own print material: halftone, night sky, ruled planner. */
.intro-panel.orange .intro-art{background:radial-gradient(circle,rgb(150 38 6/.34) 0 1.15px,transparent 1.7px) 0 0/10px 10px;-webkit-mask-image:linear-gradient(165deg,#000 10%,transparent 75%);mask-image:linear-gradient(165deg,#000 10%,transparent 75%)}
.intro-panel.yellow .intro-art{background:repeating-linear-gradient(180deg,transparent 0 35px,rgb(32 33 31/.11) 35px 36px)}
.intro-sky,.intro-stars,.intro-glow,.intro-earth{position:absolute;display:block}
.intro-sky{inset:0;background:linear-gradient(180deg,#0b0716 0%,#150c2a 20%,#2a1755 38%,#4b2a8f 52%,#7a3aa6 61%,#c84a78 67.5%,#ff5f2e 71.5%,#ff8a3d 73%)}
.intro-stars{inset:0 0 45% 0;opacity:.75;background:
  radial-gradient(1.3px 1.3px at 31% 14%,#fff 50%,transparent 100%),radial-gradient(1px 1px at 38% 31%,#fff 50%,transparent 100%),
  radial-gradient(1.4px 1.4px at 45% 9%,#fff 50%,transparent 100%),radial-gradient(1px 1px at 52% 24%,#fff 50%,transparent 100%),
  radial-gradient(1.2px 1.2px at 58% 6%,#fff 50%,transparent 100%),radial-gradient(1px 1px at 63% 37%,#fff 50%,transparent 100%),
  radial-gradient(1.5px 1.5px at 67% 19%,#fff 50%,transparent 100%),radial-gradient(1px 1px at 41% 45%,#fff 50%,transparent 100%),
  radial-gradient(1.1px 1.1px at 55% 41%,#fff 50%,transparent 100%),radial-gradient(1px 1px at 34% 52%,#fff 50%,transparent 100%),
  radial-gradient(1.2px 1.2px at 61% 55%,#fff 50%,transparent 100%),radial-gradient(1px 1px at 48% 60%,#fff 50%,transparent 100%)}
.intro-glow{left:50%;top:72%;width:110%;height:46%;translate:-50% -52%;background:radial-gradient(closest-side,rgb(255 150 70/.85),rgb(255 87 34/.45) 38%,transparent 72%)}
.intro-earth{left:50%;top:72%;width:340%;aspect-ratio:1;translate:-50% 0;border-radius:50%;background:radial-gradient(circle at 50% 0,#2b1626 0,#140b16 6%,#08060b 22%);box-shadow:0 -1.5px 0 #ffd56e,0 -6px 16px rgb(255 122 46/.9),0 -34px 90px rgb(255 87 34/.45)}
.intro-panel.purple .intro-art::after{content:'';position:absolute;inset:0;opacity:.2;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 2.4 0 0 0 -1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0/200px 200px}

/* Panel content sits inside the panel's opening rectangle (left/width come from intro.js). */
.intro-content{position:absolute;top:0;bottom:0;left:0;width:calc(27% - 5.4px);padding:clamp(18px,2.1vw,30px);display:flex;flex-direction:column}
.intro-panel.purple .intro-content{left:calc(27% + 4.6px);width:calc(46% - 9.2px)}.intro-panel.yellow .intro-content{left:calc(73% + 5.4px);width:calc(27% - 5.4px)}
.intro-label{display:flex;gap:12px;align-items:baseline;font:800 11px/1.3 var(--font);letter-spacing:.15em;text-transform:uppercase}
.intro-label b{opacity:.55;font-weight:800}

.intro-chat{margin:auto 0;display:flex;flex-direction:column;align-items:flex-start;gap:10px;max-width:330px}
.bubble{display:flex;align-items:center;gap:10px;padding:10px 15px 10px 10px;background:#F5F3ED;border-radius:16px 16px 16px 4px;font:650 clamp(13px,1.05vw,16px)/1.3 var(--font);letter-spacing:-.01em;box-shadow:3px 3px 0 rgb(32 33 31/.9)}
.bubble.dark{align-self:flex-end;padding-left:15px;background:#20211F;color:#F5F3ED;border-radius:16px 16px 4px 16px;box-shadow:none}
.bubble .dots{display:flex;gap:4px;padding:4px 2px}
.bubble .dots i{width:6px;height:6px;border-radius:50%;background:#20211F}
.cute-face.mini{width:26px;height:26px}.cute-face.mini b{border-width:0 2px 2px}

.intro-note{position:absolute;left:0;right:0;top:51%;text-align:center;font:clamp(30px,3.3vw,50px)/1 'Segoe Print','Comic Sans MS',cursive;rotate:-5deg;color:#F5F3ED}
.intro-live{position:absolute;left:50%;top:61%;translate:-50% 0;display:flex;align-items:center;gap:10px;white-space:nowrap;font:700 12px/1 var(--font);letter-spacing:.08em;text-transform:uppercase;color:rgb(245 243 237/.82)}
.wave{display:flex;align-items:center;gap:3px;height:16px}
.wave i{width:3px;height:100%;border-radius:2px;background:#3ddc84;transform-origin:50% 50%;scale:1 .35}

/* A flare, as friends see it in Joying (the app's own notice, captured), stuck to the ruled page. */
.intro-flare{display:block;margin:auto 0;align-self:center;width:min(100%,320px);height:auto;border-radius:10px;rotate:3deg;box-shadow:6px 6px 0 #20211F}

/* Faces that fly from the stage to their place above the headline. */
/* In flight they wear a paper sticker edge, so the orange face still reads over the
   orange panel; the edge is gone by the time they land on the page. */
.intro-faces .cute-face{position:absolute;left:calc(50% - 54px);top:calc(37% - 54px);width:108px;height:108px;transform:rotate(3deg);--peel:1;will-change:transform;box-shadow:0 0 0 calc(var(--peel,0) * 5px) #F5F3ED,calc(var(--peel,0) * 4px) calc(var(--peel,0) * 5px) 0 calc(var(--peel,0) * 5px) rgb(32 33 31/.22)}
.intro-faces .cute-face b{border-width:0 var(--bw,5px) var(--bw,5px)}
.intro-faces .cute-face:nth-child(1){left:calc(50% - 181.44px);transform:rotate(-12deg)}.intro-faces .cute-face:nth-child(3){left:calc(50% + 73.44px);transform:rotate(10deg)}

.intro-cue{position:absolute;left:50%;bottom:clamp(14px,3.4vh,34px);translate:-50% 0;display:flex;flex-direction:column;align-items:center;gap:10px;font:700 10px/1 var(--font);letter-spacing:.24em;text-transform:uppercase;color:rgb(245 243 237/.6)}
.intro-cue::after{content:'';width:1px;height:34px;background:linear-gradient(#F5F3ED,transparent);transform-origin:50% 0}
.intro-skip{position:absolute;top:clamp(10px,1.4vw,20px);right:calc(27% + 18.6px);display:flex;align-items:center;gap:7px;min-height:44px;padding:0 10px;border:0;background:none;color:#F5F3ED;font:700 13px/1 var(--font);cursor:pointer;pointer-events:auto}
.intro-skip .icon{width:16px;height:16px}
.intro-skip:hover{text-decoration:underline;text-underline-offset:5px}
.intro-skip:focus-visible{outline:3px solid #FFEB3B;outline-offset:2px;border-radius:4px}

/* Hand-off: the real ribbons and faces stay hidden until the stage has become them. */
.intro-on:not(.intro-done) .flow-hero,
.intro-on:not(.intro-done) .landing-faces .cute-face,
.intro-on:not(.intro-done) .landing-faces .faces-note{visibility:hidden}
.intro-done .intro-stage{visibility:hidden}

@media(max-width:900px){.intro-chat{max-width:none}.bubble{font-size:13px}
  .intro-panel.orange{clip-path:inset(0 calc(78% + 4.4px) 0 0)}.intro-panel.purple{clip-path:inset(0 calc(22% + 5.6px) 0 calc(22% + 5.6px))}.intro-panel.yellow{clip-path:inset(0 0 0 calc(78% + 4.4px))}
  .intro-content{width:calc(22% - 4.4px)}.intro-panel.purple .intro-content{left:calc(22% + 5.6px);width:calc(56% - 11.2px)}.intro-panel.yellow .intro-content{left:calc(78% + 4.4px);width:calc(22% - 4.4px)}
  .intro-skip{right:calc(22% + 19.6px)}
  .intro-faces .cute-face{left:calc(50% - 46px);top:calc(37% - 46px);width:92px;height:92px}.intro-faces .cute-face:nth-child(1){left:calc(50% - 154.56px)}.intro-faces .cute-face:nth-child(3){left:calc(50% + 62.56px)}
}
@media(max-width:600px){
  .intro-panel.orange .intro-content,.intro-panel.yellow .intro-content,.intro-panel.purple .intro-label{display:none}
  .intro-note{font-size:30px}.intro-live{font-size:11px}
  .intro-panel.orange{clip-path:inset(0 calc(87% + 1.56px) 0 0)}.intro-panel.purple{clip-path:inset(0 calc(13% + 4.44px) 0 calc(13% + 4.44px))}.intro-panel.yellow{clip-path:inset(0 0 0 calc(87% + 1.56px))}
  .intro-panel.purple .intro-content{left:calc(13% + 4.44px);width:calc(74% - 8.88px)}
  .intro-skip{right:calc(13% + 8.44px)}
  .intro-faces .cute-face{left:calc(50% - 36px);top:calc(36% - 36px);width:72px;height:72px}.intro-faces .cute-face:nth-child(1){left:calc(50% - 120.96px)}.intro-faces .cute-face:nth-child(3){left:calc(50% + 48.96px)}
}

/* The laptop and phone sit above the folding panels, the way the real ribbons pass
   behind them. Without isolation, .page-flow's children share the root stacking order. */
.intro-on .page-flow{isolation:auto}
.intro-on .hero-showcase{z-index:25}

/* Footer finale: the ribbons run behind the wordmark and end as the logo's three dots.
   Stack: tile backing (-2) < ribbons (-1) < the white J, which hides the lanes under its bar. */
.site-footer{z-index:auto}
.footer-wordmark{flex-wrap:wrap;row-gap:12px}
.footer-wordmark .brand-symbol{position:relative;background:none;width:var(--tile,clamp(48px,12vw,160px));height:var(--tile,clamp(48px,12vw,160px))}
.footer-wordmark .brand-symbol::before{content:'';position:absolute;inset:0;z-index:-2;border-radius:inherit;background:#191919}
/* Once main.js has plugged the lanes in, the baked-in dots step aside for the ribbon ends. */
.ribbon-plug .footer-wordmark .brand-symbol img{
  -webkit-mask:radial-gradient(3% 3% at 50.22% 41.97%,transparent 96%,#000),radial-gradient(3% 3% at 50.09% 50.09%,transparent 96%,#000),radial-gradient(3% 3% at 50.24% 57.93%,transparent 96%,#000);
  -webkit-mask-composite:source-in;
  mask:radial-gradient(3% 3% at 50.22% 41.97%,transparent 96%,#000),radial-gradient(3% 3% at 50.09% 50.09%,transparent 96%,#000),radial-gradient(3% 3% at 50.24% 57.93%,transparent 96%,#000);
  mask-composite:intersect}

/* Conversations: the real messages screen, not the hero's phone again. */
.conversation-phone img{aspect-ratio:390/780}
.conversation-phone .phone-screen,.conversation-phone .phone-status{background:#1b1b1b;color:#F5F3ED}
.conversation-phone .phone-screen:after{background:#F5F3ED}

/* The hero phone wears the Ember theme; its status bar picks up the same orange into purple. */
.hero-phone .phone-screen{background:#261446}
.hero-phone .phone-status{background:linear-gradient(90deg,#a83801,#5f151c 50%,#820054);color:#fff}
.hero-phone .phone-screen:after{background:#F5F3ED}

/* Grain over the whole page: one static tile, no blending, no animation. */
.grain{position:fixed;inset:0;z-index:60;pointer-events:none;opacity:.07;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2.2 0 0 0 -.8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0/220px 220px}

/* Living faces: eyes follow the pointer (intro.js sets --ex/--ey) and blink now and then. */
.cute-face i{position:absolute;inset:0;transform:translate(var(--ex,0px),var(--ey,0px));transform-origin:50% 35%;transition:transform .35s cubic-bezier(.2,.7,.3,1)}

@media(prefers-reduced-motion:no-preference){
  .cute-face i{animation:face-blink 5.6s infinite}
  .cute-face.purple i{animation-duration:6.4s;animation-delay:-2.2s}
  .cute-face.yellow i{animation-duration:7.3s;animation-delay:-4.6s}
  .bubble{animation:bubble-in .55s cubic-bezier(.2,.8,.2,1) backwards}
  .bubble:nth-child(1){animation-delay:.25s}.bubble:nth-child(2){animation-delay:.75s}.bubble:nth-child(3){animation-delay:1.25s}.bubble:nth-child(4){animation-delay:1.75s}
  .bubble .dots i{animation:typing 1.2s ease-in-out infinite}.bubble .dots i:nth-child(2){animation-delay:.15s}.bubble .dots i:nth-child(3){animation-delay:.3s}
  .wave i{animation:speak 1.1s ease-in-out infinite}.wave i:nth-child(2){animation-delay:-.5s;animation-duration:.9s}.wave i:nth-child(3){animation-delay:-.2s;animation-duration:1.3s}.wave i:nth-child(4){animation-delay:-.7s}.wave i:nth-child(5){animation-delay:-.35s;animation-duration:.8s}
  .intro-cue::after{animation:cue 2.2s ease-in-out infinite}
  .intro-flare{animation:ticket-in .7s .4s cubic-bezier(.3,1.4,.5,1) backwards}
  .faces-note.is-writing{animation:note-write 1s steps(12,end) both}
  .footer-face-group{clip-path:inset(-40px -40px -6px -40px)}
  .footer-face-group.is-waiting .cute-face{translate:0 120%}
  .footer-face-group.is-in .cute-face{animation:face-hop .8s cubic-bezier(.34,1.56,.64,1) backwards}
  .footer-face-group.is-in .cute-face:nth-child(2){animation-delay:.1s}.footer-face-group.is-in .cute-face:nth-child(3){animation-delay:.2s}
}
/* Far off screen (toons.js) the endless loops stop; a loop restarting unseen looks the same. */
.loops-far :is(.cute-face i,.dots i,.wave i,.tn-doodle),.loops-far :is(.intro-cue,.tn-tile)::after{animation:none!important}
@keyframes face-blink{0%,93%,100%{scale:1 1}95.5%{scale:1 .12}}
@keyframes bubble-in{from{opacity:0;translate:0 14px;scale:.96}}
@keyframes typing{0%,60%,100%{translate:0 0;opacity:.45}30%{translate:0 -3px;opacity:1}}
@keyframes speak{0%,100%{scale:1 .3}50%{scale:1 1}}
@keyframes cue{0%{scale:1 0;opacity:1}55%{scale:1 1;opacity:1}100%{scale:1 1;opacity:0}}
@keyframes ticket-in{from{opacity:0;translate:0 24px;rotate:-4deg}}
@keyframes note-write{from{clip-path:inset(-30% 100% -30% 0)}to{clip-path:inset(-30% -6% -30% 0)}}
@keyframes face-hop{from{translate:0 120%}}

/* Live clips (live.js): a recording of the real app plays over its screenshot, then holds. */
.live-screen{position:relative;display:block;overflow:hidden;border-radius:3px}
.live-screen>img{display:block}
.live-clip{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .3s ease;pointer-events:none}
.live-screen.is-live .live-clip{opacity:1}
.live-replay{position:absolute;right:12px;bottom:12px;z-index:2;display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:0 14px 0 11px;border:0;border-radius:10px;background:rgb(20 19 22/.82);color:#F5F3ED;font:700 12px/1 var(--font);cursor:pointer;backdrop-filter:blur(6px)}
.live-replay[hidden]{display:none}
.live-replay svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.live-replay:hover{background:rgb(20 19 22/.94)}
.live-replay:focus-visible{outline:3px solid #FFEB3B;outline-offset:2px}
@media(max-width:600px){.live-replay{right:6px;bottom:6px;min-height:30px;font-size:11px}}
/* Voice: the light and dark rooms are each a live screen; the theme switch shows one. */
.landing-voice-screen .live-screen{display:none;border-radius:0}
.landing-voice-screen .live-screen>picture{display:block}
/* The last section on plum (2026-10-15): a band from just above the footer to the end of the page,
   painted under the brand lines (z-index -2; the lines sit at -1) and full-bleed through its shadow,
   which never adds a sideways scrollbar. The logo's dark tile reads on it as it is. */
.site-footer{--band:#2a1d42;color:#f5f3ed}
.site-footer::before{content:'';position:absolute;z-index:-2;inset:-70px 0 -1px;background:var(--band);box-shadow:0 0 0 100vmax var(--band);clip-path:inset(0 -100vmax);pointer-events:none}
.site-footer nav a,.site-footer .footer-cookie,.site-footer .footer-wordmark{color:inherit}
.site-footer nav a:hover,.site-footer .footer-cookie:hover{color:#FFEB3B}
.site-footer :is(a,button):focus-visible{outline-color:#FFEB3B}

/* The last section in columns (2026-10-15): brand and the two ways in on the left, Joying / Help &
   safety / Legal on the right, the giant wordmark with the brand lines, then a slim bottom line. */
.site-footer{display:block;padding:24px 0 30px}
.site-footer .ft-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:40px 56px;align-items:start;padding-top:24px}
.site-footer .ft-brand .footer-face-group{margin-bottom:22px}
.site-footer .ft-tag{margin:0 0 24px;max-width:320px;font-size:17px;line-height:1.5;font-weight:500;color:#f5f3edd9}
.site-footer .ft-actions{display:flex;flex-wrap:wrap;gap:10px}
.site-footer .ft-btn{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid #f5f3ed4d;border-radius:10px;font-size:14px;font-weight:700;text-decoration:none;color:#f5f3ed}
.site-footer .ft-btn:hover{border-color:#f5f3ed99}
.site-footer .ft-btn-main{background:#f5f3ed;border-color:#f5f3ed;color:#2a1d42}
.site-footer .ft-btn-main:hover{background:#FFEB3B;border-color:#FFEB3B}
.site-footer .ft-cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px;margin:0;font-size:14px}
.site-footer .ft-cols h2{margin:0 0 12px;font-size:11px;line-height:1.4;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#FFEB3B}
.site-footer .ft-cols a,.site-footer .ft-cols .footer-cookie{display:block;width:fit-content;min-height:0;padding:7px 0;font-size:14px;line-height:1.5;color:#f5f3edcc;text-decoration:none}
.site-footer .ft-cols a:hover,.site-footer .ft-cols .footer-cookie:hover{color:#FFEB3B}
.site-footer .footer-wordmark{margin-top:56px}
.site-footer .ft-bottom{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-top:28px;padding-top:16px;border-top:1px solid #f5f3ed26;font-size:12px;color:#f5f3ed99}
.site-footer .ft-bottom a{display:inline-flex;align-items:center;gap:6px;min-height:36px;color:#f5f3edcc;text-decoration:none}
.site-footer .ft-bottom a:hover{color:#FFEB3B}
@media(max-width:760px){.site-footer .ft-top{grid-template-columns:minmax(0,1fr);gap:36px}.site-footer .ft-cols{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 18px}.site-footer .footer-wordmark{margin-top:40px}}

/* Two soft bands in the middle (2026-10-15): peach behind group chats, lavender behind voice, so the
   long page has a rhythm (paper, band, paper, band, the plum ending). Painted under the brand lines
   (z-index -2, as the plum footer) and full-bleed through the shadow, with no sideways scroll. */
.cut-row.page-band{position:relative;border-top-color:transparent}
.page-band::before{content:'';position:absolute;z-index:-2;inset:0;background:var(--page-band);box-shadow:0 0 0 100vmax var(--page-band);clip-path:inset(0 -100vmax);pointer-events:none}
.page-band + :is(section,.cut-row){border-top-color:transparent}
.page-band-peach{--page-band:#ffe3d6}
.page-band-lavender{--page-band:#ebe3f7}

/* The header waits off stage while the intro plays; intro.js drops it in and threads the ribbons into its lines. */
.intro-on:not(.intro-done) .site-bar{visibility:hidden}
.header-threads{position:fixed;inset:0;z-index:45;width:100%;height:100%;pointer-events:none;overflow:visible}
.header-threads path{fill:none;stroke-width:3;stroke-linecap:butt;stroke-linejoin:round;stroke-dasharray:0 2}
