/* ===== Reset / base ===== */
*, *::before, *::after { box-sizing: border-box; }
/* toast (copy-link confirmation, etc.) */
.zw-toast {
  position: fixed; left: 50%; bottom: 32px;
  transform: translateX(-50%) translateY(20px);
  background: #181a1f; color: #fff; padding: 12px 20px; border-radius: 10px;
  font-family: var(--font); font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  opacity: 0; pointer-events: none; z-index: 9999;
  transition: opacity .25s ease, transform .25s ease;
}
.zw-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* single font stack (--font) for EN + TH: Poppins for Latin, Noto Sans Thai for Thai glyphs */
button { font: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 { font-weight: 600; color: var(--ink-2); line-height: 1.2; }

.wrap { width: 100%; max-width: calc(var(--content) + var(--gutter) * 2); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 1210px; }
@media (min-width: 1024px) { .wrap { padding: 0 var(--gutter); } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 500; white-space: nowrap; transition: .15s ease;
}
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover { background: var(--green-hover); }
.btn-outline { background: #fff; color: var(--ink-2); border: 1px solid var(--border-strong); }
.btn-outline:hover { border-color: var(--ink-2); }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface); }
.btn-dark { background: #1c1c1e; color: #fff; }
.btn-dark:hover { background: #333; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff; border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo img { height: 34px; width: auto; }
.main-nav { display: none; gap: 30px; margin-left: 12px; }
/* mobile-only TH/EN + Login block inside the nav sheet; hidden on every desktop
   layout (revealed only when .main-nav.open on ≤767px, see mobile.css) */
.nav-actions-mobile { display: none; }
.main-nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.main-nav a:hover { color: var(--ink-2); }
.header-actions { display: none; align-items: center; gap: 12px; margin-left: auto; }
.lang-toggle { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; }
.lang { padding: 5px 12px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--muted); }
.lang.is-active { background: #fff; color: var(--ink-2); box-shadow: var(--shadow-soft); }

.nav-toggle { display: flex; flex-direction: column; gap: 4px; margin-left: auto; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink-2); border-radius: 2px; }

@media (min-width: 1024px) {
  .main-nav, .header-actions { display: flex; }
  .nav-toggle { display: none; }
}
/* mobile menu open */
.main-nav.open {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; left: 0; right: 0; top: 64px;
  background: #fff; border-bottom: 1px solid var(--border); padding: 12px 20px 20px;
}
.main-nav.open a { padding: 10px 0; }

/* ===== Sections ===== */
.section { padding: 56px 0; }
@media (min-width: 1024px) { .section { padding: 80px 0; } }

.capsule {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 7px 14px; font-size: 14px; font-weight: 500; color: var(--ink-2);
}
.capsule .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.section-center { text-align: center; }
.section-center .capsule { margin: 0 auto; }

.section-head { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.section-head h2 { font-size: clamp(26px, 4vw, 32px); font-weight: 500; max-width: 560px; }
.section-sub { color: var(--muted); font-size: clamp(17px, 2.4vw, 24px); font-weight: 500; max-width: 560px; }
@media (min-width: 1024px) {
  .section-head { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
h2.center { font-size: clamp(28px, 5vw, 40px); font-weight: 500; margin: 18px 0 0; }
h2.center + * { margin-top: 24px; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; padding: 52px 0 0; min-height: 540px; }
.hero-scene {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 1440px; height: 376px; max-width: none; z-index: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 82%, transparent);
          mask-image: linear-gradient(#000 82%, transparent);
}
.hero-floor { width: 1440px; max-width: none; display: block; image-rendering: pixelated; }
.walkers { position: absolute; inset: 0; }
.walker {
  position: absolute; left: 0; top: 0; width: 84px; height: 84px;
  background-repeat: no-repeat; background-size: 336px 336px; image-rendering: pixelated;
  transform: translate(-100px, -100px); will-change: transform;
}
.walker .wtag {
  position: absolute; left: 50%; bottom: 100%; margin-bottom: 9px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 4px 12px; font-size: 12px; font-weight: 600; letter-spacing: .1px; color: var(--ink-2);
  box-shadow: 0 6px 16px rgba(20, 24, 40, .12);
}
.walker .wtag::before {           /* online presence dot */
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 3px rgba(88, 214, 141, .22); flex: 0 0 auto;
  animation: wtag-pulse 2s ease-in-out infinite;
}
.walker .wtag::after {            /* little tail pointing at the character */
  content: ""; position: absolute; top: 100%; left: 50%; margin-top: -1px;
  transform: translateX(-50%); width: 8px; height: 8px; background: #fff;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border);
  border-bottom-right-radius: 2px; rotate: 45deg;
}
@keyframes wtag-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(88, 214, 141, .22); }
  50%      { box-shadow: 0 0 0 5px rgba(88, 214, 141, .10); }
}
@media (prefers-reduced-motion: reduce) { .walker .wtag::before { animation: none; } }
.walker.inchat .wtag { opacity: 0; }
.walker .bubble {
  position: absolute; left: 50%; bottom: 98%; transform: translateX(-50%) translateY(6px) scale(.9);
  max-width: 220px; width: max-content; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 7px 12px; font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--ink-2);
  box-shadow: var(--shadow-soft); opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; z-index: 5;
}
.walker .bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #fff;
}
.walker .bubble.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.hero-inner { position: relative; z-index: 2; text-align: center; padding-top: 20px; }
@media (max-width: 767px) {
  .hero-scene { opacity: .5;
    -webkit-mask-image: linear-gradient(transparent 2%, #000 40%, #000 84%, transparent);
            mask-image: linear-gradient(transparent 2%, #000 40%, #000 84%, transparent); }
  .walker .wtag { display: none; }
}
@media (min-width: 768px)  { .hero { min-height: 640px; } }
@media (min-width: 1024px) { .hero { min-height: 700px; padding-top: 64px; } }
.hero h1 { font-size: clamp(34px, 7vw, 56px); font-weight: 700; color: var(--ink); line-height: 1.14; }
.hero h1 mark { background: var(--purple); color: #fff; padding: 0 10px; border-radius: 6px; }
.hero-sub { max-width: 640px; margin: 22px auto 0; color: var(--muted); font-size: 16px; font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 28px; }

/* ===== Hero floating name tags (Figma: Lucas blue / Samantha red) ===== */
.hero-tags { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.htag { position: absolute; display: flex; align-items: center; gap: 6px; opacity: 0; }
.htag-lucas { left: 2.2%;  top: 20%; }
.htag-sam   { right: 2.4%; top: 13%; }
.htag-pill {
  background: var(--tag-blue); color: #fff; font-size: 15px; font-weight: 500;
  padding: 9px 16px; border-radius: var(--r-sm); white-space: nowrap; line-height: 1;
  box-shadow: 0 8px 18px rgba(20, 24, 40, .16);
}
.htag-red  .htag-pill { background: var(--tag-red); }
.htag-face {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  background: var(--tag-blue); box-shadow: 0 6px 14px rgba(20, 24, 40, .18);
}
.htag-red .htag-face { background: var(--tag-red); }
.htag-face img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.htag-arrow { width: 40px; height: 55px; flex: 0 0 auto; display: block; }
.htag-lucas .htag-pill  { transform: rotate(-9deg); }
.htag-lucas .htag-arrow { transform: rotate(48deg);  margin-left: 2px; }   /* tip → up-right at headline */
.htag-sam   .htag-pill  { transform: rotate(6deg); }
.htag-sam   .htag-arrow { transform: rotate(-104deg); margin-right: 2px; }  /* tip → left at headline */

/* enter, then drift like a mouse cursor — horizontal, kept inside the empty side zone */
.htag-lucas { animation: htagIn .7s cubic-bezier(.22,.61,.36,1) .9s forwards, htagDriftL 7s ease-in-out 1.7s infinite; }
.htag-sam   { animation: htagIn .7s cubic-bezier(.22,.61,.36,1) 1.15s forwards, htagDriftR 7.8s ease-in-out 1.95s infinite; }
@keyframes htagIn { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
/* left tag: nudge right into the open left margin and back (never reaches the text) */
@keyframes htagDriftL {
  0%   { transform: translate(0, 0); }
  30%  { transform: translate(72px, -10px); }
  55%  { transform: translate(96px, 6px); }
  80%  { transform: translate(34px, -4px); }
  100% { transform: translate(0, 0); }
}
/* right tag: nudge left into the open right margin and back */
@keyframes htagDriftR {
  0%   { transform: translate(0, 0); }
  30%  { transform: translate(-70px, 8px); }
  55%  { transform: translate(-100px, -8px); }
  80%  { transform: translate(-38px, 5px); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .htag { opacity: 1; animation: none; }
}
@media (max-width: 1180px) { .htag { transform: scale(.82); } .htag-lucas { left: .5%; } .htag-sam { right: .5%; } }
@media (max-width: 1439px) { .hero-tags { display: none; } }
.tag {
  display: none; position: absolute; z-index: 3; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 6px 14px 6px 6px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-soft);
}
.tag img { width: 28px; height: 28px; border-radius: 50%; }
.tag-lucas { bottom: 250px; left: 11%; }
.tag-sam   { bottom: 250px; left: 55%; }
@media (min-width: 1024px) { .tag { display: inline-flex; } }

/* ===== Logo marquee ===== */
.logos { padding: 10px 0 30px; }
.marquee { overflow: hidden; width: 100%; }
.marquee-track { display: flex; width: max-content; animation: scroll-x 32s linear infinite; }
.logos .marquee-track img { height: 90px; width: auto; max-width: none; opacity: .8; }
@keyframes scroll-x { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ===== Bento image ===== */
.bento { position: relative; width: 100%; max-width: var(--content); margin: 36px auto 0; container-type: inline-size; }
.bento-img {
  width: 100%; border-radius: var(--r-lg); display: block;
  /* the baked grid has a soft drop-shadow halo around the outer cards that bleeds
     past their rounded corners (reads as a white/grey rectangle sticking out).
     clip to the card-solid box so the outer edges are crisp. does NOT move the
     image content, so the % hotspots stay aligned. */
  clip-path: inset(0 2.6% 5.7% 2.6% round 16px);
}

/* ---- interactive bento cards (sprite overlays over the flat image) ---- */
.bento-hot {
  position: absolute; overflow: hidden; border-radius: 16px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  /* clean per-card frame drawn in CSS (the baked grid bg is now white, so each
     card needs its own crisp edge + soft shadow to read as a card) */
  box-shadow: 0 0 0 1px rgba(20,24,40,.05), 0 3px 10px rgba(20,24,40,.05);
}
.bento-hot .bfx {
  position: absolute; inset: 0;
  background-image: url("../assets/bento-grid.png"); background-repeat: no-repeat;
  transform-origin: center; will-change: transform, filter;
  transition: transform .5s cubic-bezier(.22,.61,.36,1), filter .4s ease;
}
/* green ring + lift on hover — signals each card is interactive */
.bento-hot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 3;
  pointer-events: none; box-shadow: 0 0 0 0 rgba(88,214,141,0), 0 0 0 0 rgba(20,24,40,0);
  transition: box-shadow .3s ease;
}
.bento-hot:hover::before { box-shadow: 0 0 0 2px rgba(88,214,141,.55), 0 16px 36px rgba(20,24,40,.14); }

/* card rectangles + their sprite window (values map the 1440x889 image) */
.bh-office  { left: 2.78%;  top: .45%;   width: 30.66%; height: 61.24%; }
.bh-office  .bfx { background-size: 324.3% 164.0%; background-position: 4.02% 1.15%; }
/* Virtual office: a 4th (blond) character walks the empty middle strip back and
   forth. The baked scene keeps the other characters fixed. */
.bh-office .vox {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  clip-path: inset(1% 1% 1% 1% round 18px);
}
/* crisp high-res office scene (replaces the blurry baked one); 4 fixed characters */
.bh-office .vox-map {
  position: absolute; left: 19%; top: 12%; width: 60%; height: auto;
  image-rendering: pixelated; z-index: 1;
}
.bh-office .vox-walker {
  position: absolute; top: 54%; left: 18%; width: 8%; aspect-ratio: 1; z-index: 3;
  background: url("../assets/char-blond.png") no-repeat;
  background-size: 400% 400%; background-position: 33.33% 66.67%;
  image-rendering: pixelated;
}
.bh-chat    { left: 34.32%; top: .45%;   width: 63.18%; height: 29.57%; }
.bh-chat    .bfx { background-size: 158.24% 334.2%; background-position: 93.2% 0.64%; }
/* ===== Avatar card (rebuilt) =====
   Baked avatars are erased from the bento image; this overlay draws a live strip
   of standing characters that slides left->right on hover. Everything lives inside
   .av-mask, which is INSET from the hotspot so it sits fully within the real card
   and uses overflow:hidden (works in every browser) — so the white edge-fade can
   never leak into the grey gutter, and nothing rounds/spills past the card. */
.bh-avatar {
  left: 34.32%; top: 31.46%; width: 31.18%; height: 21.40%;
  background: transparent; cursor: pointer; overflow: visible;
}
.bh-avatar::before { display: none; }
/* the strip clipper — fixed 8px inset on left/right so the sliding characters and
   the white edge-fade always stay 8px inside the real card edge (no gutter leak,
   independent of card scaling) */
.av-mask {
  position: absolute; left: 8px; right: 8px; top: 2%; height: 64%;
  overflow: hidden; border-radius: 14px 14px 0 0;
  background: transparent; pointer-events: none;
}
/* white edge-fade (Figma "Highlight") — clipped by .av-mask, stays in the card */
.av-mask::before, .av-mask::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 16%; z-index: 3;
  pointer-events: none;
}
.av-mask::before { left: 0;  background: linear-gradient(to right, #fff, rgba(255,255,255,0)); }
.av-mask::after  { right: 0; background: linear-gradient(to left,  #fff, rgba(255,255,255,0)); }
.av-lane { position: absolute; inset: 0; }
.av-item {
  position: absolute; bottom: 0; left: 0;
  width: 10%; aspect-ratio: 3 / 4;
  background-repeat: no-repeat; background-size: contain; background-position: center bottom;
  image-rendering: pixelated;
  transform-origin: bottom center; will-change: transform, opacity;
}
/* real "Avatar" title laid over the baked one so it can animate */
.av-title {
  position: absolute; left: 4.5%; right: 3%; bottom: 0; height: 22%;
  display: flex; align-items: flex-end; gap: 0; background: #fff;
  font-family: var(--font); font-weight: 500; color: var(--green);
  font-size: clamp(15px, 1.65cqw, 24px); line-height: 1; padding-bottom: 4%;
  pointer-events: none; white-space: nowrap; overflow: hidden;
}
.av-title .av-l { display: inline-block; transform-origin: bottom center; }
.bh-avatar:hover .av-title .av-l {
  animation: avLetter .9s ease var(--d, 0s) infinite;
}
@keyframes avLetter {
  0%, 60%, 100% { transform: translateY(0); color: var(--green); }
  30%           { transform: translateY(-32%); color: var(--purple); }
}
/* underline sweep under the title on hover */
.av-title::after {
  content: ""; position: absolute; left: 0; bottom: 12%; height: 3px; width: 0;
  background: var(--green); border-radius: 3px; transition: width .35s ease;
}
.bh-avatar:hover .av-title::after { width: 2.2em; }
.bh-screen  { left: 66.38%; top: 31.46%; width: 31.12%; height: 30.24%; }
.bh-screen  .bfx { background-size: 318.6% 326.8%; background-position: 96.4% 44.7%; }
.bh-builder { left: 2.78%;  top: 63.13%; width: 62.72%; height: 31.15%; }
.bh-builder .bfx { background-size: 162.5% 317.5%; background-position: 7.22% 91.6%; }
/* green active sofa icon at the head of the Decoration toolbar */
.bh-builder .dec-active {
  position: absolute; left: 60.8%; top: 36.5%; width: 5.1%; aspect-ratio: 1; z-index: 2;
  display: grid; place-items: center; border-radius: 22%;
  background: linear-gradient(137deg, #c7fdde 8%, #3fed88 52%, #4cdc89 96%);
  box-shadow: 0 6px 12px rgba(88,214,141,.35); pointer-events: none;
}
.bh-builder .dec-active svg { width: 68%; height: 68%; }
.bh-team    { left: 66.38%; top: 63.13%; width: 31.12%; height: 31.15%; }
.bh-team    .bfx { background-size: 318.6% 317.5%; background-position: 96.4% 91.6%; }

/* ---- non-avatar cards: no sprite motion; only the heading animates ---- */
.bh-office .bfx, .bh-chat .bfx, .bh-screen .bfx,
.bh-builder .bfx, .bh-team .bfx { display: none; }
.bh-office::before,  .bh-office:hover::before,
.bh-chat::before,    .bh-chat:hover::before,
.bh-screen::before,  .bh-screen:hover::before,
.bh-builder::before, .bh-builder:hover::before,
.bh-team::before,    .bh-team:hover::before { display: none; }

/* live heading laid over the baked title — animates like the Avatar card */
.bento-hot .b-title {
  position: absolute; z-index: 2; display: inline-flex; align-items: flex-end;
  background: #fff; color: var(--green);
  font-family: var(--font); font-weight: 500; line-height: 1;
  font-size: clamp(13px, 1.65cqw, 24px); white-space: nowrap;
  padding: .1em .34em .12em .04em; pointer-events: none;
}
.bento-hot .b-title .b-l { display: inline-block; transform-origin: bottom center; }
.bento-hot:hover .b-title .b-l { animation: avLetter .9s ease var(--d, 0s) infinite; }
.bento-hot .b-title::after {
  content: ""; position: absolute; left: .04em; bottom: 0; height: 3px; width: 0;
  background: var(--green); border-radius: 3px; transition: width .35s ease;
}
.bento-hot:hover .b-title::after { width: 2.2em; }
.bh-office  .b-title { left: 3.6%;  top: 1.6%;  }
.bh-chat    .b-title { left: 1.9%;  top: 62.4%; }
.bh-screen  .b-title { left: 3.2%;  top: 7.6%;  }
.bh-builder .b-title { left: 1.8%;  top: 60.2%; }
.bh-team    .b-title { left: 3.2%;  top: 60.2%; }

/* live translatable descriptions laid over the baked English copy.
   The description text is baked into bento-grid12.png; each .b-desc is a
   white block that masks the baked copy and re-authors it with a data-i18n
   key, so it switches with the language (same trick as .rtc-desc on chat).
   Positions are the baked text box mapped to each card's % rect. */
.bento-hot .b-desc {
  position: absolute; margin: 0; z-index: 2; pointer-events: none;
  background: #fff; color: var(--muted);
  font: 400 clamp(9px,.92cqw,13px)/1.5 var(--font);
}
.bh-office  .b-desc { left: 3%;   top: 84.5%; width: 92%; height: 13%; }
.bh-avatar  .b-desc { left: 4%;   top: 97%;   width: 90%; height: 34%; }
.bh-screen  .b-desc { left: 4%;   top: 19%;   width: 92%; height: 16%; }
.bh-builder .b-desc { left: 1.7%; top: 73.5%; width: 42%; height: 15%; }
.bh-team    .b-desc { left: 4%;   top: 73.5%; width: 90%; height: 15%; }

/* ---- Real-time chat card: live overlay drawn over the baked panel ---- */
/* covers the right half of the baked cell (chat mock) and rebuilds it as
   real DOM so the notification badge, online dots and incoming message can
   animate. left text ("Real-time chat" heading) stays baked + b-title. */
/* Clip the whole chat overlay to the REAL CARD rectangle (like Figma clips its
   frame). The .bh-chat hotspot is mapped ~7px taller/wider than the visible
   card (it includes the inter-cell gap), so without this, masks/rows/shadows
   spill into the gap. clip-path trims anything past the card WITHOUT moving any
   child (positions stay % of the hotspot). Insets = card position within the
   hotspot, from a pixel scan of bento-grid.png. Reuse this pattern for any
   future card overlay/animation. */
.bh-chat .rtc {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* hotspot is wider/taller than the card: ~5% gutter on the right, ~3.8% below
     (pixel-scanned). Clip so the white cover never leaks into those gutters. */
  clip-path: inset(0.6% 0.6% 0.6% 0.66% round 16px);
}
/* white mask that hides the baked chat mock (trimmed to the card by clip-path) */
.bh-chat .rtc-cover {
  position: absolute; top: 0; bottom: 0; left: 53.5%; right: 0; background: #fff;
}
/* green chat icon — hidden at rest, pops over the panel's top-left on play */
.bh-chat .rtc-icon {
  position: absolute; left: 48.5%; top: 7.5%; width: 4.4%; aspect-ratio: 1; z-index: 5;
  display: grid; place-items: center; border-radius: 24%;
  background: linear-gradient(137deg, #c7fdde 10%, #3fed88 51%, #4cdc89 94%);
  box-shadow: 0 8px 12px rgba(145,238,194,.4);
  opacity: 0; transform: scale(.5); transform-origin: center;
  transition: opacity .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.bh-chat .rtc.play .rtc-icon { opacity: 1; transform: scale(1); }
.bh-chat .rtc.play .rtc-icon.ring { animation: rtcBell .6s ease; }
.bh-chat .rtc-icon svg { width: 58%; height: 58%; }
.bh-chat .rtc-badge {
  position: absolute; top: -26%; right: -30%; min-width: 46%; height: 46%;
  padding: 0 .2em; border-radius: 999px; background: #d41818; color: #fff;
  font: 600 clamp(8px,.82cqw,11px)/1 var(--font); display: grid; place-items: center;
  box-shadow: 0 0 0 2px #fff; opacity: 0; transform: scale(0);
}
.bh-chat .rtc-badge.show { opacity: 1; transform: scale(1); }
.bh-chat .rtc-badge.pop  { animation: rtcPop .4s cubic-bezier(.34,1.56,.64,1); }

/* white message panel — runs down to the card's bottom edge (Figma); the .rtc
   clip trims it there so the last row is cut off, like the design */
.bh-chat .rtc-panel {
  position: absolute; left: 57%; right: 5%; top: 4%; bottom: -6%;
  border-radius: 16px 16px 0 0; background: #fff;
  border: 1px solid var(--border); border-bottom: none; overflow: visible;
  box-shadow: 0 4px 14px rgba(20,24,40,.08);
  display: flex; flex-direction: column; justify-content: flex-start; gap: 0; padding: 3% 1.5% 0;
}
.bh-chat .rtc-row {
  position: relative; flex: 0 0 23%; display: flex; align-items: center;
  gap: 3.5%; padding: 0 3.5%; margin: 0; border-radius: 12px;
  transition: transform .45s cubic-bezier(.22,.61,.36,1), box-shadow .4s ease, background .3s ease;
}
/* incoming-message notification: row lifts as a floating white card (Figma).
   kept within the panel (small rotate, no upscale) so it never clips. */
.bh-chat .rtc-row.act {
  background: #fff; z-index: 4;
  /* soft, compact shadow so the lifted card pops without the wide blur reading
     as a grey line across the panel */
  box-shadow: 0 4px 12px rgba(166,166,166,.16), 0 1px 3px rgba(166,166,166,.12);
  transform: rotate(1deg);
}
.bh-chat .rtc-av {
  position: relative; flex: 0 0 auto; width: 11.5%; aspect-ratio: 1;
}
.bh-chat .rtc-face {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: var(--avbg);
}
.bh-chat .rtc-face img {
  position: absolute; left: 50%; top: 9%; height: 152%; width: auto;
  transform: translateX(-50%); image-rendering: pixelated; pointer-events: none;
}
.bh-chat .rtc-dot {
  position: absolute; right: -4%; bottom: 2%; width: 30%; aspect-ratio: 1; z-index: 2;
  border-radius: 50%; box-shadow: 0 0 0 2px #fff;
}
.bh-chat .rtc-dot.on   { background: #58d68d; }
.bh-chat .rtc-dot.away { background: #ecc819; }
.bh-chat .rtc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bh-chat .rtc-top  { display: flex; align-items: center; gap: 4%; }
.bh-chat .rtc-name {
  flex: 1 1 auto; font: 400 clamp(10px,1.06cqw,15px)/1.2 var(--font); color: #181a1f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bh-chat .rtc-time { flex: 0 0 auto; font: 400 clamp(7px,.76cqw,11px)/1 var(--font); color: #61656d; }
.bh-chat .rtc-line { display: flex; align-items: center; gap: 4%; }
.bh-chat .rtc-msg {
  flex: 1 1 auto; min-width: 0; font: 400 clamp(8px,.9cqw,13px)/1.25 var(--font); color: #61656d;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bh-chat .rtc-fresh { display: none; font-weight: 500; }
.bh-chat .rtc-unread {
  display: none; flex: 0 0 auto;
  min-width: 1.5em; height: 1.5em; padding: 0 .32em; border-radius: 999px;
  background: #d41818; color: #fff; font: 500 clamp(8px,.78cqw,11px)/1 var(--font);
  place-items: center;
}
/* live description — covers the truncated baked text with a white block and
   re-authors the full copy (matches the Figma wording + the other cards' style) */
.bh-chat .rtc-desc {
  /* stretch top->bottom so the white block fully masks the baked description
     (the baked copy has an extra line that peeked out below the live text) */
  position: absolute; left: 1.2%; top: 71%; bottom: 1.5%; width: 48%; margin: 0;
  padding: .4% 1.4% 1.4% .6%; background: #fff; z-index: 2; pointer-events: none;
  font: 400 clamp(9px,.92cqw,13px)/1.5 var(--font); color: var(--muted);
}
/* active row swaps to the fresh message + shows its unread pill */
.bh-chat .rtc-row.act .rtc-old   { display: none; }
.bh-chat .rtc-row.act .rtc-fresh { display: block; }
.bh-chat .rtc-row.act .rtc-unread { display: grid; animation: rtcPop .4s cubic-bezier(.34,1.56,.64,1) both; }

@keyframes rtcPop  { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rtcBell {
  0%   { transform: scale(1) rotate(0); }
  30%  { transform: scale(1.18) rotate(-12deg); }
  60%  { transform: scale(1.06) rotate(7deg); }
  100% { transform: scale(1) rotate(0); }
}

/* reduced motion: show the finished state (both messages in, badge 2) */
@media (prefers-reduced-motion: reduce) {
  .bh-chat .rtc-icon { opacity: 1; transform: scale(1); }
  .bh-chat .rtc-badge { opacity: 1; transform: scale(1); }
  .bh-chat .rtc-row[data-new] { background: #fff; box-shadow: 0 8px 18px rgba(166,166,166,.18); }
  .bh-chat .rtc-row[data-new] .rtc-old { display: none; }
  .bh-chat .rtc-row[data-new] .rtc-fresh { display: block; }
  .bh-chat .rtc-row[data-new] .rtc-unread { display: grid; animation: none; }
  .bh-chat .rtc-row.act, .bh-chat .rtc-icon.ring { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bento-hot:hover .b-title .b-l { animation: none; }
}

/* ---- Screen share card: live overlay, cam-call -> screen-share ---- */
/* Same technique as the chat card: cover the baked media (video window +
   avatars) with a white mask, rebuild it as live DOM, clip the whole overlay to
   the REAL card rect so nothing spills into the inter-cell gap. Insets from a
   pixel scan of bento-grid.png (bh-screen cell). Child positions are % of the
   hotspot (like .rtc). Default classes (s-win s-dot) = the finished frame, so
   no-JS / reduced-motion users see the complete "screen share" card. */
.bh-screen .ssx {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* bottom inset 0 (was 3.31%) so the avatars reach the card's true bottom edge;
     the card itself (.bento-hot overflow:hidden, radius 16px) clips the corners */
  clip-path: inset(0.37% 0.22% 0% 1.55% round 16px);
}
/* white mask over the baked media zone (keeps the baked title + description) */
.bh-screen .ssx-cover {
  position: absolute; left: 0; right: 0; top: 37%; bottom: 0; background: #fff;
}
/* state 1 — two webcam feeds (people on a video call) */
.bh-screen .ssx-cam {
  position: absolute; width: 11.73%; height: 23.53%; object-fit: cover;
  border-radius: 12%; box-shadow: 0 4px 10px rgba(20,24,40,.14); z-index: 3;
  opacity: 0; transition: opacity .5s ease;
}
.bh-screen .ssx-cam-l { left: 25.44%; top: 42.65%; }
.bh-screen .ssx-cam-r { left: 62.39%; top: 42.65%; }
.bh-screen .ssx.s-cam .ssx-cam { opacity: 1; }
/* state 4 — screen-share window (a teammate presenting) */
.bh-screen .ssx-win {
  position: absolute; left: 34.07%; top: 41.18%; width: 34.96%; height: 29.04%;
  object-fit: cover; z-index: 4;
  filter: drop-shadow(0 6px 14px rgba(20,24,40,.18));
  opacity: 0; transform: scale(.6); transform-origin: center;
  transition: opacity .35s ease, transform .4s cubic-bezier(.34,1.56,.64,1);
}
.bh-screen .ssx.s-win .ssx-win { opacity: 1; transform: scale(1); }
/* pixel avatars (full body; clipped at the card bottom by clip-path) */
.bh-screen .ssx-av { position: absolute; overflow: visible; z-index: 3; }
.bh-screen .ssx-av img {
  position: absolute; left: 0; top: 0; width: 100%; height: auto;
  image-rendering: pixelated; pointer-events: none;
}
.bh-screen .ssx-av-l { left: 17%; top: 73.53%; width: 13.72%; height: 23.53%; }
.bh-screen .ssx-av-r { left: 63%; top: 73.53%; width: 24.12%; height: 40.07%; }
/* right avatar faces left, toward the left avatar */
.bh-screen .ssx-av-r img { transform: scaleX(-1); }
/* thinking dots on the inner side of each head, just below the shared screen */
.bh-screen .ssx-dot {
  position: absolute; width: 4%; aspect-ratio: 1; height: auto; z-index: 5;
  opacity: 0; transform: scale(.3); transform-origin: center;
  transition: opacity .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.bh-screen .ssx-dot-l { left: 40%; top: 72.5%; }
.bh-screen .ssx-dot-r { left: 59%; top: 72.5%; }
.bh-screen .ssx.s-dot .ssx-dot { opacity: 1; transform: scale(1); }
/* right sparkle mirrored so it points inward like the left one */
.bh-screen .ssx-dot-r { transform: scaleX(-1) scale(.3); }
.bh-screen .ssx.s-dot .ssx-dot-r { transform: scaleX(-1) scale(1); }
/* reduced motion: hold the finished frame, no transitions */
@media (prefers-reduced-motion: reduce) {
  .bh-screen .ssx-cam { transition: none; }
  .bh-screen .ssx-win, .bh-screen .ssx-dot { transition: none; opacity: 1; }
  .bh-screen .ssx-win { transform: none; }
  .bh-screen .ssx-dot { transform: scale(1); }
  .bh-screen .ssx-dot-r { transform: scaleX(-1) scale(1); }
}

/* ---- Team management card: 3 characters, role badges pop in one by one ---- */
/* Baked art (characters) is erased from bento-grid3.png; only the baked title +
   description remain. Characters + badges are rebuilt as live DOM. Clip to the
   real card rect (pixel-scanned bh-team cell). Positions are % of the hotspot. */
.bh-team .tmx {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  clip-path: inset(0.4% 0.22% 6.43% 1.55% round 16px);
}
.bh-team .tmx-char { position: absolute; height: auto; image-rendering: pixelated; }
.bh-team .tmx-char-l { left: 13.5%; top: 17.5%; width: 22.1%; }
.bh-team .tmx-char-c { left: 37.4%; top: 14.3%; width: 26.5%; z-index: 2; }
.bh-team .tmx-char-r { left: 67.9%; top: 21.4%; width: 17.7%; }
.bh-team .tmx-badge {
  position: absolute; height: auto; image-rendering: pixelated; z-index: 3;
  opacity: 0; transform: translateY(4px) scale(.5); transform-origin: center bottom;
  transition: opacity .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.bh-team .tmx-owner  { left: 41.4%; top: 6.1%; width: 18.6%; }
.bh-team .tmx-admin  { left: 17.7%; top: 9.6%; width: 13.7%; }
.bh-team .tmx-member { left: 69%;   top: 9.6%; width: 15.5%; }
.bh-team .tmx.b-owner  .tmx-owner,
.bh-team .tmx.b-admin  .tmx-admin,
.bh-team .tmx.b-member .tmx-member { opacity: 1; transform: translateY(0) scale(1); }
/* reduced motion: hold the finished frame (all badges shown) */
@media (prefers-reduced-motion: reduce) {
  .bh-team .tmx-badge { transition: none; opacity: 1; transform: none; }
}

/* ---- Space builder card: drag a sofa from the palette into the room ---- */
/* Baked art keeps the Decoration panel (right) + title/description; the left
   room zone is erased in bento-grid4.png and rebuilt live: faint room grid +
   sofa (drops in) + a cursor that moves from the palette to the room. */
.bh-builder .sbx {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  clip-path: inset(0.4% 0.11% 6.43% 0.11% round 16px);
}
.bh-builder .sbx-grid { position: absolute; left: 40.2%; top: 14.1%; width: 15.8%; height: auto; opacity: .85; }
/* green highlight that flashes on the target cell when the sofa lands */
.bh-builder .sbx-glow {
  position: absolute; left: 41.5%; top: 22%; width: 13%; aspect-ratio: 1; z-index: 1;
  border-radius: 10px; opacity: 0;
  background: radial-gradient(closest-side, rgba(88,214,141,.28), rgba(88,214,141,0));
  box-shadow: inset 0 0 0 2px rgba(88,214,141,.55);
}
/* the sofa is "carried" by the cursor: it travels from the palette into the room,
   growing as it is placed. left/top/width all transition together for a drag feel */
.bh-builder .sbx-sofa {
  position: absolute; left: 61%; top: 61%; width: 5%; height: auto; z-index: 2;
  image-rendering: pixelated; opacity: 0; transform-origin: center bottom;
  transition: left .8s cubic-bezier(.45,.05,.2,1), top .8s cubic-bezier(.45,.05,.2,1),
              width .8s cubic-bezier(.34,1.3,.5,1), opacity .3s ease, transform .3s ease;
}
.bh-builder .sbx-cursor {
  position: absolute; left: 66%; top: 66%; width: 4%; aspect-ratio: 44.34 / 61; height: auto; z-index: 3;
  opacity: 0; transform-origin: top left;
  transition: left .8s cubic-bezier(.45,.05,.2,1), top .8s cubic-bezier(.45,.05,.2,1), opacity .35s ease;
}
/* grab: cursor + sofa appear at the palette, cursor gives a little click dip */
.bh-builder .sbx.p2 .sbx-cursor { opacity: 1; left: 66%; top: 66%; animation: sbClick .45s ease .05s; }
.bh-builder .sbx.p2 .sbx-sofa   { opacity: 1; left: 61%; top: 61%; width: 5%; transform: scale(.94); }
/* drop: cursor + sofa glide to the room, sofa grows into the cell, glow flashes */
.bh-builder .sbx.p3 .sbx-cursor { opacity: 1; left: 50.2%; top: 44.5%; }
.bh-builder .sbx.p3 .sbx-sofa   { opacity: 1; left: 43.7%; top: 25.3%; width: 8.7%; transform: scale(1); }
.bh-builder .sbx.p3 .sbx-glow   { animation: sbGlow .9s ease .55s; }
@keyframes sbClick { 0%,100% { transform: scale(1); } 45% { transform: scale(.8); } }
@keyframes sbGlow  {
  0%   { opacity: 0; transform: scale(.85); }
  35%  { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1); }
}
/* reduced motion: hold the finished frame (sofa placed, cursor in the room) */
@media (prefers-reduced-motion: reduce) {
  .bh-builder .sbx-cursor, .bh-builder .sbx-sofa { transition: none; animation: none; opacity: 1; transform: none; }
  .bh-builder .sbx-cursor { left: 50.2%; top: 44.5%; }
  .bh-builder .sbx-sofa   { left: 43.7%; top: 25.3%; width: 8.7%; }
  .bh-builder .sbx-glow   { animation: none; opacity: 0; }
}

/* touch / small screens: no hover, drop the interactive layer */
@media (hover: none), (max-width: 767px) {
  .bento-hot { display: none; }
}

/* ===== Steps ===== */
.steps { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step-card { display: flex; flex-direction: column; }
.step-illus {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  aspect-ratio: 421 / 486; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.step-illus img { display: block; }
.step-card h3 { font-size: 15px; font-weight: 600; margin-top: 20px; }
.step-card p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ===== How-it-works animated step stages ===== */
.hw { position: relative; display: block; }
.hw > * { position: absolute; }
.hw img { image-rendering: pixelated; }
.hw-grad { background: linear-gradient(137deg, #c7fdde 6%, #3fed88 52%, #4cdc89 96%); }

/* ---- Step 1: + button -> pill -> maps rise -> select -> success ---- */
.hw1-btn {
  left: 3.7%; top: 40.9%; height: 18.1%; width: 20.9%;
  display: flex; align-items: center; justify-content: center; gap: 0; overflow: hidden;
  border-radius: 18px; color: #fff; font: 600 clamp(12px,1.5vw,17px)/1 var(--font);
  background: linear-gradient(137deg, #c7fdde 6%, #3fed88 52%, #4cdc89 96%);
  box-shadow: 0 10px 18px rgba(88,214,141,.35);
  opacity: 0; transform: scale(.5); z-index: 4;
  transition: width .38s cubic-bezier(.34,1.4,.5,1), padding .5s ease, gap .4s ease,
              opacity .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.hw1-plus { position: relative; flex: 0 0 auto; width: 34%; aspect-ratio: 1; }
.hw1-plus::before, .hw1-plus::after { content: ""; position: absolute; background: #fff; border-radius: 3px; }
.hw1-plus::before { left: 50%; top: 22%; width: 13%; height: 56%; transform: translateX(-50%); }
.hw1-plus::after  { top: 50%; left: 22%; height: 13%; width: 56%; transform: translateY(-50%); }
.hw1-label { white-space: nowrap; max-width: 0; overflow: hidden; opacity: 0; transition: opacity .25s ease .05s, max-width .35s ease; }
.hw1[data-stage="0"] .hw1-btn, .hw1[data-stage="1"] .hw1-btn { opacity: 1; transform: scale(1); }
.hw1[data-stage="1"] .hw1-btn { width: 92.6%; gap: 6%; padding: 0 7%; justify-content: flex-start; }
.hw1[data-stage="1"] .hw1-plus { width: 15%; }
.hw1[data-stage="1"] .hw1-label { max-width: 80%; opacity: 1; }

.hw1-maps { left: 3.8%; top: 5%; width: 92.4%; height: 90%; overflow: hidden; border-radius: 14px; opacity: 0; transition: opacity .45s ease; z-index: 2; }
.hw1-strip { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; gap: 7%; transform: translateY(72%); transition: transform 1.35s cubic-bezier(.32,.72,.28,1); }
.hw1-strip img { width: 100%; display: block; border-radius: 12px; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(20,24,40,.12); }
.hw1[data-stage="2"] .hw1-maps, .hw1[data-stage="3"] .hw1-maps { opacity: 1; }
.hw1[data-stage="2"] .hw1-strip, .hw1[data-stage="3"] .hw1-strip { transform: translateY(-56%); }
.hw1-pick { transition: border-color .3s ease, box-shadow .3s ease; }
.hw1[data-stage="3"] .hw1-pick { border-color: var(--green) !important; box-shadow: 0 0 0 3px var(--green), 0 8px 18px rgba(88,214,141,.35) !important; }

.hw1-success { left: 0; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5%; opacity: 0; transition: opacity .4s ease; z-index: 5; pointer-events: none; }
.hw1-cf { width: 15%; opacity: 0; transform: scale(.4) rotate(-12deg); transition: opacity .3s ease, transform .45s cubic-bezier(.34,1.56,.64,1); }
.hw1-badge { background: linear-gradient(137deg, #c7fdde 6%, #3fed88 52%, #4cdc89 96%); color: #fff; font: 600 clamp(13px,1.7vw,19px)/1 var(--font); padding: .7em 1.2em; border-radius: 14px; box-shadow: 0 8px 16px rgba(88,214,141,.35); }
.hw1[data-stage="4"] .hw1-success { opacity: 1; }
.hw1[data-stage="4"] .hw1-cf { opacity: 1; transform: scale(1) rotate(0); }

/* ---- Step 2: invite button -> pill -> couch scene + teammates ---- */
.hw2-btn {
  left: 7%; top: 40.9%; height: 18.1%; width: 20.9%;
  display: flex; align-items: center; justify-content: center; gap: 0; overflow: hidden;
  border-radius: 18px; color: #fff; font: 600 clamp(12px,1.5vw,17px)/1 var(--font);
  background: linear-gradient(137deg, #c7fdde 6%, #3fed88 52%, #4cdc89 96%);
  box-shadow: 0 10px 18px rgba(88,214,141,.35);
  opacity: 0; transform: scale(.5); z-index: 6;
  transition: width .38s cubic-bezier(.34,1.4,.5,1), padding .5s ease, gap .4s ease, left .5s ease,
              opacity .3s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.hw2-ic { flex: 0 0 auto; width: 32%; aspect-ratio: 1; display: grid; place-items: center; }
.hw2-ic img { width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.hw2-label { white-space: nowrap; max-width: 0; overflow: hidden; opacity: 0; transition: opacity .25s ease .05s, max-width .35s ease; }
.hw2[data-stage="0"] .hw2-btn, .hw2[data-stage="1"] .hw2-btn { opacity: 1; transform: scale(1); }
.hw2[data-stage="1"] .hw2-btn { left: 7%; width: 85%; gap: 5%; padding: 0 7%; justify-content: flex-start; }
.hw2[data-stage="1"] .hw2-ic { width: 15%; }
.hw2[data-stage="1"] .hw2-label { max-width: 80%; opacity: 1; }

.hw2-scene { left: 0; top: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s ease; z-index: 2; }
.hw2[data-stage="2"] .hw2-scene, .hw2[data-stage="3"] .hw2-scene, .hw2[data-stage="4"] .hw2-scene { opacity: 1; }
.hw2-couch { position: absolute; left: 5.7%; top: 36.6%; width: 87%; }
.hw2-p { position: absolute; opacity: 0; transform: translateY(12px) scale(.82); transform-origin: bottom center;
  transition: opacity .35s ease, transform .45s cubic-bezier(.34,1.56,.64,1); }
.hw2-p img { width: 100%; display: block; }
.hw2-p1 { left: 12.3%; top: 29.8%; width: 21.1%; }
.hw2-p2 { left: 70%;   top: 29.8%; width: 24.9%; }
.hw2-p3 { left: 56.8%; top: 67%;   width: 21.8%; z-index: 3; }
.hw2-emote { position: absolute; top: -24%; left: -16%; width: 52%; height: auto; image-rendering: auto; z-index: 4; filter: drop-shadow(0 3px 5px rgba(20,24,40,.16)); }
.hw2-emote-r { left: auto; right: -16%; }
.hw2[data-stage="2"] .hw2-p1, .hw2[data-stage="3"] .hw2-p1, .hw2[data-stage="4"] .hw2-p1,
.hw2[data-stage="3"] .hw2-p2, .hw2[data-stage="4"] .hw2-p2,
.hw2[data-stage="4"] .hw2-p3 { opacity: 1; transform: translateY(0) scale(1); }

/* ---- Step 3: desk + host -> two teammates -> confetti ---- */
.hw3-desk  { left: 9.5%;  top: 35.6%; width: 81%;  z-index: 3; }
.hw3-left  { left: 9.7%;  top: 32.7%; width: 24%;  z-index: 2; opacity: 0; transform: translateY(14px) scale(.85); transform-origin: bottom center;
  transition: opacity .35s ease, transform .45s cubic-bezier(.34,1.56,.64,1); }
.hw3-right { left: 65.8%; top: 32.7%; width: 24%;  z-index: 2; opacity: 0; transform: translateY(14px) scale(.85); transform-origin: bottom center;
  transition: opacity .35s ease .12s, transform .45s cubic-bezier(.34,1.56,.64,1) .12s; }
.hw3[data-stage="1"] .hw3-left, .hw3[data-stage="2"] .hw3-left,
.hw3[data-stage="1"] .hw3-right, .hw3[data-stage="2"] .hw3-right { opacity: 1; transform: translateY(0) scale(1); }
.hw3-cf { width: 13%; z-index: 5; opacity: 0; transform: scale(.3) translateY(12px);
  transition: opacity .3s ease, transform .5s cubic-bezier(.34,1.56,.64,1); }
.hw3-cf1 { left: 42%; top: 11%; }
.hw3-cf2 { left: 15%; top: 6%;  transition-delay: .1s; }
.hw3-cf3 { left: 66%; top: 6%;  transition-delay: .2s; }
.hw3[data-stage="2"] .hw3-cf { opacity: 1; transform: scale(1) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .hw * { transition: none !important; }
}

/* ===== Tabs ===== */
.tabs { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 36px; }
@media (min-width: 768px) { .tabs { grid-template-columns: repeat(3, 1fr); gap: 0; border-bottom: 1px solid var(--border); } }
.tab { text-align: left; padding: 20px 24px; border-radius: var(--r-md); border: 1px solid var(--border); background: #fff; position: relative; }
@media (min-width: 768px) { .tab { border: none; border-radius: 0; padding: 20px 28px 24px; } }
.tab-title { display: block; font-size: 18px; font-weight: 600; color: var(--muted); }
.tab-desc { display: block; margin-top: 6px; color: var(--muted-2); font-size: 15px; }
.tab.is-active .tab-title { color: var(--green); }
/* progress-bar underline: fills over the auto-advance interval, click to skip */
.tab-bar {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--border); border-radius: 3px; overflow: hidden;
}
@media (max-width: 767px) { .tab-bar { left: 12px; right: 12px; bottom: 0; border-radius: 0 0 var(--r-md) var(--r-md); } }
.tab-bar > i {
  display: block; height: 100%; width: 0; background: var(--green);
  border-radius: 3px; transform-origin: left center;
}
.tab-preview { margin-top: 24px; background: var(--surface-2); border-radius: var(--r-sm); aspect-ratio: 1360 / 545; }

/* ===== Testimonials ===== */
.trust { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 24px; }
.trust-avatars { display: flex; }
.trust-avatars img { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; margin-left: -10px; }
.trust-avatars img:first-child { margin-left: 0; }
.trust span { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.book-demo { margin-top: 22px; }

.testi-row { margin-top: 24px; }
.testi-row + .testi-row { margin-top: 16px; }
.testi-row .marquee-track { gap: 24px; animation-duration: 60s; }
.testi-row.track-right .marquee-track, .testi-row .track-right { animation-direction: reverse; }
.testi-card {
  flex: 0 0 380px; width: 380px; text-align: left;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: 24px; box-shadow: var(--shadow-soft);
}
.testi-card .stars { display: flex; gap: 3px; color: var(--star); }
.testi-card .quote { margin: 16px 0 20px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.testi-person { display: flex; align-items: center; gap: 12px; }
.testi-person img { width: 44px; height: 44px; border-radius: 50%; }
.testi-person b { font-size: 15px; color: var(--ink-2); display: block; }
.testi-person span { font-size: 13px; color: var(--muted); }

/* ===== Pricing ===== */
.billing-toggle { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; font-size: 15px; font-weight: 500; }
.billing-toggle .muted { color: var(--muted-2); }
.switch { width: 30px; height: 18px; border-radius: var(--r-pill); background: var(--green); position: relative; padding: 2px; }
.switch i { display: block; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .2s; transform: translateX(12px); }
.save-badge { background: var(--badge); color: #1b6aa3; border-radius: var(--r-pill); padding: 3px 10px; font-size: 13px; font-weight: 600; }

.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 40px; text-align: left; }
@media (min-width: 900px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; } }
.plan { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--r-md); padding: 32px; }
.plan-featured {
  background: linear-gradient(180deg, #e7fbf0 0%, #fff 42%);
  border-color: #bfeccd; box-shadow: var(--shadow-card);
}
@media (min-width: 900px) { .plan-featured { margin-top: -14px; padding-bottom: 40px; } }
.best { position: absolute; top: 18px; right: 18px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 4px 10px; font-size: 13px; font-weight: 600; }
.plan-head h3 { font-size: 26px; font-weight: 600; color: var(--ink); }
.plan-desc { color: var(--muted); font-size: 15px; margin-top: 6px; }
.plan-startat { color: var(--muted); font-size: 15px; margin-top: 28px; }
.plan-price { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; }
.plan-price .cur { font-size: 28px; font-weight: 700; color: var(--ink); }
.plan-price .amount { font-size: 40px; font-weight: 700; color: var(--ink); }
.plan-price .per { font-size: 13px; font-weight: 500; color: var(--muted); line-height: 1.3; align-self: center; }
.plan-cta { width: 100%; margin-top: 22px; }
.feat-title { font-weight: 600; font-size: 15px; margin-top: 26px; }
.feat-list { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 12px; }
.feat-list li { position: relative; padding-left: 26px; font-size: 15px; color: var(--ink-2); }
.feat-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2358d68d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* ===== FAQ ===== */
.faq { margin-top: 30px; text-align: left; }
.faq details { border-bottom: 1px solid var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 4px; font-size: 17px; font-weight: 600; color: var(--ink-2);
}
.faq summary::-webkit-details-marker { display: none; }
.faq .pm { position: relative; width: 18px; height: 18px; flex: 0 0 18px; }
.faq .pm::before, .faq .pm::after { content: ""; position: absolute; background: var(--ink-2); border-radius: 2px; transition: .2s; }
.faq .pm::before { left: 0; top: 8px; width: 18px; height: 2px; }
.faq .pm::after { left: 8px; top: 0; width: 2px; height: 18px; }
.faq details[open] .pm::after { transform: rotate(90deg); opacity: 0; }
.faq details p { padding: 0 4px 22px; color: var(--muted); font-size: 15px; max-width: 900px; }

/* ===== CTA ===== */
.cta { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .cta { grid-template-columns: 1fr 1fr; } }
.cta-left { background: var(--cta-bg); display: flex; align-items: center; padding: 56px 20px; }
.cta-copy { max-width: 620px; margin-left: auto; width: 100%; padding: 0 12px; }
@media (min-width: 1024px) { .cta-left { padding: 90px 40px; } .cta-copy { padding-right: 40px; } }
.cta-copy h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; color: var(--ink); line-height: 1.12; }
.cta-copy p { color: var(--muted); font-size: 16px; margin-top: 20px; }
.cta-copy .hero-cta { justify-content: flex-start; }
.cta-right { background: #dfe6f0; min-height: 320px; }
.cta-right img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Footer ===== */
.site-footer { background: var(--footer-bg); color: var(--footer-muted); position: relative; overflow: hidden; padding-top: 64px; }
.footer-top { display: grid; grid-template-columns: 1fr; gap: 40px; padding-bottom: 40px; }
@media (min-width: 900px) { .footer-top { grid-template-columns: 1.4fr 2fr; } }
.footer-brand img { height: 40px; width: auto; }
.footer-brand p { margin-top: 20px; max-width: 400px; font-size: 15px; line-height: 1.6; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols h4 { color: var(--footer-ink); font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.footer-cols a { display: block; padding: 6px 0; font-size: 15px; color: var(--footer-muted); }
.footer-cols a:hover { color: var(--footer-ink); }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,.1); }
.footer-bottom { display: flex; flex-direction: column; gap: 20px; padding: 24px 0 40px; font-size: 15px; }
@media (min-width: 640px) { .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.socials { display: flex; gap: 18px; color: var(--footer-ink); }
.socials a:hover { color: var(--green); }
.footer-letters { width: 100%; max-width: 1200px; margin: 0 auto; display: block; opacity: .9;
  -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }

/* ============================================================
   ANIMATION + INTERACTION LAYER
   ============================================================ */

/* --- scroll reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* --- hero entrance (runs on load) --- */
.hero-sub, .hero .hero-cta { opacity: 0; animation: heroIn .8s cubic-bezier(.22,.61,.36,1) forwards; }
.hero-sub      { animation-delay: .95s; }
.hero .hero-cta{ animation-delay: 1.1s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* --- hero title: per-word blur reveal --- */
.hero h1 .word {
  display: inline-block; opacity: 0;
  transform: translateY(34px) rotate(4deg); filter: blur(12px);
  animation: wordIn .8s cubic-bezier(.22,.61,.36,1) forwards;
  animation-delay: calc(var(--i, 0) * .13s);
}
@keyframes wordIn {
  from { opacity: 0; transform: translateY(34px) rotate(4deg); filter: blur(12px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* --- animated gradient highlight --- */
.hero h1 mark.hl {
  position: relative; color: #fff; padding: 2px 14px; border-radius: 10px;
  background: linear-gradient(100deg, #8b5cf6, #a77efc, #b79bff);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: wordIn .8s cubic-bezier(.34,1.56,.64,1) forwards;
  animation-delay: calc(var(--i, 0) * .13s);
}
.hero h1 mark.hl .hl-in {
  display: inline-block;
  animation: hlFloat 4.5s ease-in-out 1s infinite;
}
/* glow behind the highlight */
.hero h1 mark.hl::before {
  content: ""; position: absolute; inset: -6px -2px;
  background: var(--purple); border-radius: 14px; z-index: -1;
  filter: blur(22px); opacity: 0;
  animation: hlGlow 4.5s ease-in-out 1s infinite;
}
@keyframes hlFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-7px) rotate(-1.5deg); } }
@keyframes hlGlow  { 0%,100% { opacity: .35; } 50% { opacity: .7; } }

/* --- floating memoji tags --- */
@media (min-width: 1024px) {
  .tag { opacity: 0; animation: tagPop .6s cubic-bezier(.34,1.56,.64,1) forwards; }
  .tag-lucas { animation-delay: .6s; }
  .tag-sam   { animation-delay: .8s; }
  .tag-lucas.float { animation: tagPop .6s cubic-bezier(.34,1.56,.64,1) forwards, floatY 5s ease-in-out .6s infinite; }
  .tag-sam.float   { animation: tagPop .6s cubic-bezier(.34,1.56,.64,1) forwards, floatY 6s ease-in-out .8s infinite; }
}
@keyframes tagPop { from { opacity: 0; transform: translateY(14px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* --- header scroll state --- */
.site-header { transition: box-shadow .25s ease, background .25s ease; }
.site-header.scrolled { box-shadow: 0 6px 24px rgba(20,24,40,.07); }

/* --- nav link underline --- */
.main-nav a { position: relative; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--green); border-radius: 2px; transition: width .22s ease;
}
.main-nav a:hover::after { width: 100%; }

/* --- button micro-interactions --- */
.btn { transition: transform .15s ease, box-shadow .2s ease, background .15s ease, border-color .15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary:hover { box-shadow: 0 8px 20px rgba(88,214,141,.35); }
.btn-outline:hover, .btn-ghost:hover { box-shadow: var(--shadow-soft); }
.btn-dark:hover { box-shadow: 0 8px 20px rgba(0,0,0,.25); }

/* --- capsule pulse dot --- */
.capsule .dot { position: relative; }
.capsule .dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--green); animation: pulse 2s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3); opacity: 0; } }

/* --- card hover lifts --- */
.step-card, .plan, .testi-card { transition: transform .28s cubic-bezier(.22,.61,.36,1), box-shadow .28s ease, border-color .28s ease; }
.step-card:hover { transform: translateY(-6px); }
.step-card:hover .step-illus { border-color: var(--green); box-shadow: var(--shadow-card); }
.step-illus { transition: border-color .28s ease, box-shadow .28s ease; }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); border-color: var(--green); }
@media (min-width: 900px) { .plan-featured:hover { transform: translateY(-20px); } }
.testi-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }

/* --- trust avatars hover spread --- */
.trust-avatars img { transition: transform .25s ease; }
.trust:hover .trust-avatars img { margin-left: -4px; }
.trust:hover .trust-avatars img:first-child { margin-left: 0; }

/* --- marquee pause on hover --- */
.marquee:hover .marquee-track { animation-play-state: paused; }

/* --- tabs --- */
.tab { transition: background .2s ease, transform .15s ease; }
.tab:hover { background: var(--surface); }
.tab-preview {
  position: relative; overflow: hidden;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  transition: background .4s ease;
}
.tab-preview .tp-label {
  font-size: clamp(20px, 4vw, 40px); font-weight: 600; color: var(--muted-2);
  opacity: 0; transform: translateY(12px) scale(.98);
  transition: opacity .4s ease, transform .4s ease; text-align: center; padding: 20px;
}
.tab-preview .tp-label.show { opacity: 1; transform: none; }
.tab-preview::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
  transform: translateX(-100%); transition: transform .6s ease;
}
.tab-preview.flash::before { transform: translateX(100%); }
.tab-preview::before { z-index: 2; }
/* per-tab preview panels (Virtual office map / Chat / Avatar) — cross-fade */
.tab-preview .tp-img,
.tab-preview .tp-panel {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .4s ease; z-index: 0;
}
.tab-preview .tp-img.is-active,
.tab-preview .tp-panel.is-active { opacity: 1; z-index: 1; }

/* ===== Virtual office map — live walkers overlay ===== */
.vo-map { position: relative; width: 100%; height: 100%; overflow: hidden; }
.vo-map-bg { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; image-rendering: pixelated; display: block; }
.vo-actors {
  position: absolute; left: 0; top: 0; width: 1360px; height: 545px;
  transform-origin: 0 0; transform: scale(var(--voscale, 1)); pointer-events: none;
}
.vo-actor {
  position: absolute; left: 0; top: 0; width: 54px; height: 54px;
  background-repeat: no-repeat; background-size: 216px 216px; image-rendering: pixelated;
  transform: translate(-200px, -200px); will-change: transform;
}
.vo-actor .vo-tag {
  position: absolute; left: 50%; bottom: 100%; margin-bottom: 1px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 2px 8px; font-size: 10px; font-weight: 600; color: var(--ink-2);
  box-shadow: 0 4px 12px rgba(20, 24, 40, .12);
  transition: opacity .2s ease;
}
.vo-actor .vo-tag::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 2px rgba(88, 214, 141, .22); flex: 0 0 auto;
  animation: wtag-pulse 2s ease-in-out infinite;
}
.vo-actor.inchat .vo-tag { opacity: 0; }
.vo-actor .vo-bubble {
  position: absolute; left: 50%; bottom: 96%; transform: translateX(-50%) translateY(6px) scale(.9);
  max-width: 180px; width: max-content; text-align: center;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 5px 10px; font-size: 11px; font-weight: 500; line-height: 1.35; color: var(--ink-2);
  box-shadow: var(--shadow-soft); opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease; z-index: 20;
}
.vo-actor .vo-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #fff;
}
.vo-actor .vo-bubble.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
@media (max-width: 767px) {
  .vo-actor .vo-tag { display: none; }
  .vo-actor .vo-bubble { font-size: 11px; padding: 4px 8px; max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { .vo-actor .vo-tag::before { animation: none; } }

/* ===== Chat tab — 3-beat animated scene =====
   Everything is authored in a fixed 1360x545 design canvas and scaled to the
   rendered width via --csscale (set in chat-scene.js), so proportions match
   Figma at every breakpoint. */
.chat-panel { background: #10151d; }
.chat-scene {
  position: absolute; left: 0; top: 0; width: 1360px; height: 545px;
  transform-origin: 0 0; transform: scale(var(--csscale, 1));
  --cs-nav: #242b32; --cs-bg: #10151d; --cs-bg2: #1a2231; --cs-line: #262f3f;
  --cs-tx: #e8edf4; --cs-tx2: #8b95a7; --cs-grn: #58d68b; --cs-red: #ef4d4d;
  font-family: inherit; color: var(--cs-tx); overflow: hidden;
}

/* layer A — office map + walkers (own stacking context so actor z-index can't
   escape above the chat UI; fades out when the chat windows take over) */
.cs-stage { position: absolute; inset: 0; z-index: 1; transition: opacity .5s ease; }
.chat-scene[data-beat="3"] .cs-stage { opacity: 0; }
.cs-map { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.cs-actors { position: absolute; left: 0; top: 0; width: 1360px; height: 545px; transform: none; pointer-events: none; }

/* dark app sidebar — real Figma icons (assets/sb-*.svg) */
.cs-rail {
  background: var(--cs-nav); display: flex; flex-direction: column; align-items: center;
  justify-content: space-between; padding: 16px 0; width: 54px;
}
.cs-rail-grp { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.cs-rail-main { position: absolute; left: 0; top: 0; bottom: 0; z-index: 5;
  transform: translateX(-100%); transition: transform .55s cubic-bezier(.22,.9,.3,1); box-shadow: 6px 0 22px rgba(0,0,0,.28); }
.chat-scene[data-beat="1"] .cs-rail-main,
.chat-scene[data-beat="2"] .cs-rail-main { transform: translateX(0); }
.cs-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.cs-div { width: 24px; height: 1px; background: rgba(255,255,255,.14); }
.cs-ic { position: relative; width: 40px; height: 40px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; }
.cs-ic img { width: 24px; height: 24px; opacity: .58; }
.cs-ic.is-chat { background: rgba(88,214,141,.1); }
.cs-ic.is-chat img { opacity: 1; }
.cs-me { width: 40px; height: 40px; object-fit: contain; image-rendering: pixelated; }
.cs-badge {
  position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--cs-red); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--cs-nav);
  transform: scale(0); transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.cs-badge-mini { transform: scale(1); }
.chat-scene[data-beat="2"] .cs-rail-main .cs-badge { transform: scale(1); }

/* layer C — chat UI windows */
.cs-ui {
  position: absolute; inset: 0; display: flex; z-index: 8;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
}
.chat-scene[data-beat="3"] .cs-ui { opacity: 1; transform: none; }
.cs-win { width: 680px; height: 545px; display: flex; overflow: hidden; background: var(--cs-bg); border-left: 1px solid var(--cs-line); }
.cs-win:first-child { border-left: 0; }
.cs-rail-mini { width: 46px; padding: 12px 0; }
.cs-rail-mini .cs-rail-grp { gap: 13px; }
.cs-rail-mini .cs-logo { width: 30px; height: 30px; border-radius: 8px; }
.cs-rail-mini .cs-ic { width: 32px; height: 32px; }
.cs-rail-mini .cs-ic img { width: 20px; height: 20px; }
.cs-rail-mini .cs-me { width: 30px; height: 30px; }
.cs-rail-mini .cs-badge { font-size: 9px; min-width: 14px; height: 14px; }
/* half view — office map peek on the right */
.cs-half { position: relative; }
.cs-half-map { flex: 0 0 226px; overflow: hidden; border-left: 1px solid var(--cs-line); }
.cs-half-map img { width: 460px; height: 100%; object-fit: cover; object-position: left center; image-rendering: pixelated; }

/* half view — single channel */
.cs-chan { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cs-chead { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--cs-line); }
.cs-hash { width: 26px; height: 26px; border-radius: 8px; background: #2b3446; color: var(--cs-tx2);
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.cs-chead b { font-size: 14px; display: block; }
.cs-chead small { font-size: 11px; color: var(--cs-tx2); }

/* full view — list rail + conversation */
.cs-list { width: 300px; flex: 0 0 300px; background: var(--cs-bg2); display: flex; flex-direction: column;
  border-right: 1px solid var(--cs-line); overflow: hidden; }
.cs-lhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.cs-lhead b { font-size: 18px; }
.cs-plus { width: 26px; height: 26px; border-radius: 8px; background: var(--cs-grn); color: #06381f;
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cs-search { margin: 4px 14px 10px; padding: 8px 12px; border-radius: 9px; background: #121826;
  color: var(--cs-tx2); font-size: 12px; }
.cs-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; font-size: 12.5px; color: var(--cs-tx); }
.cs-grp { padding: 8px 16px 4px; font-size: 11px; color: var(--cs-tx2); }
.cs-item { display: flex; align-items: center; gap: 9px; padding: 7px 14px; }
.cs-item.is-active { background: #223047; border-left: 2px solid var(--cs-grn); }
.cs-item img { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.cs-item > div { min-width: 0; flex: 1; }
.cs-item b { font-size: 12.5px; font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-item small { font-size: 11px; color: var(--cs-tx2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-time { font-size: 10px; color: var(--cs-tx2); }
.cs-pill { background: var(--cs-red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 9px; min-width: 16px; height: 16px; padding: 0 4px; display: flex; align-items: center; justify-content: center; }
.cs-conv { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cs-convhead { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--cs-line); }
.cs-convhead img { width: 30px; height: 30px; border-radius: 50%; }
.cs-convhead b { font-size: 13px; display: block; }
.cs-convhead small { font-size: 11px; color: var(--cs-grn); }

/* message list + typewriter */
.cs-msgs { flex: 1; overflow: hidden; padding: 10px 6px; display: flex; flex-direction: column; gap: 12px; }
.cs-m { display: flex; gap: 9px; padding: 0 12px; }
.cs-m .cs-av { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.cs-m .cs-body { min-width: 0; }
.cs-m .cs-hd { display: flex; align-items: baseline; gap: 8px; }
.cs-m .cs-hd b { font-size: 12.5px; }
.cs-m .cs-hd time { font-size: 10px; color: var(--cs-tx2); }
.cs-m .cs-tx { font-size: 12.5px; line-height: 1.45; color: #c7cede; white-space: pre-wrap; }
.cs-m .cs-tx .cs-caret { display: inline-block; width: 1px; margin-left: 1px; border-right: 1.5px solid var(--cs-grn);
  animation: cs-blink 1s step-end infinite; }
@keyframes cs-blink { 50% { opacity: 0; } }
.cs-m.enter { animation: cs-msg-in .28s ease both; }
@keyframes cs-msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cs-react { display: flex; gap: 6px; margin-top: 6px; }
.cs-react span { font-size: 10px; background: #1c2534; border: 1px solid var(--cs-line); border-radius: 10px; padding: 1px 6px; color: var(--cs-tx2); }

/* typing indicator row */
.cs-typing { display: flex; align-items: center; gap: 9px; padding: 2px 12px; min-height: 20px; opacity: 0; transition: opacity .2s ease; }
.cs-typing.show { opacity: 1; }
.cs-typing .cs-avs { display: flex; }
.cs-typing .cs-avs img { width: 18px; height: 18px; border-radius: 50%; margin-left: -6px; border: 1.5px solid var(--cs-bg); }
.cs-typing .cs-avs img:first-child { margin-left: 0; }
.cs-typing .cs-tt { font-size: 11.5px; color: var(--cs-tx2); }
.cs-typing .cs-tt b { color: #b9c1d1; font-weight: 600; }
.cs-dots { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.cs-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--cs-tx2); animation: cs-typing 1.2s infinite ease-in-out; }
.cs-dots i:nth-child(2) { animation-delay: .18s; }
.cs-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes cs-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-3px); opacity: 1; } }

.cs-input { margin: 8px 12px 12px; padding: 10px 14px; border-radius: 11px; background: #121826;
  border: 1px solid var(--cs-line); color: var(--cs-tx2); font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .cs-rail-main, .cs-ui, .cs-badge { transition: none; }
  .cs-dots i, .cs-m .cs-tx .cs-caret { animation: none; }
}

/* ===== Avatar tab — one avatar walks left→right, swaps at mark points ===== */
.avatar-panel { background: #efe7e1; }
.av-scene {
  position: absolute; left: 0; top: 0; width: 1360px; height: 545px;
  transform-origin: 0 0; transform: scale(var(--avscale, 1)); overflow: hidden;
}
.av-room { position: absolute; left: 16px; top: 16px; width: 1328px; height: 513px;
  object-fit: cover; image-rendering: pixelated; }
.av-actor {
  position: absolute; left: 0; top: 0; width: 170px; height: 170px;
  background-repeat: no-repeat; background-size: 680px 680px; image-rendering: pixelated;
  transform: translate(-300px, -300px); will-change: transform; z-index: 2;
}
/* swap "pop": a quick squash-stretch bounce + a soft ring flash */
.av-actor.av-pop { animation: av-pop .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes av-pop {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.7); }
  100% { filter: brightness(1); }
}
.av-ring {
  position: absolute; left: 0; top: 0; width: 120px; height: 120px; border-radius: 50%;
  border: 3px solid var(--green); transform: translate(-300px, -300px) scale(.4);
  opacity: 0; pointer-events: none; z-index: 1;
}
.av-ring.go { animation: av-ring .55s ease-out; }
@keyframes av-ring {
  0% { opacity: .7; transform: translate(var(--rx), var(--ry)) scale(.4); }
  100% { opacity: 0; transform: translate(var(--rx), var(--ry)) scale(1.5); }
}
@media (prefers-reduced-motion: reduce) {
  .av-actor.av-pop { animation: none; }
  .av-ring.go { animation: none; }
}

/* --- FAQ smooth --- */
.faq details { transition: background .2s ease; }
.faq summary:hover { color: var(--green); }
.faq details[open] { background: rgba(88,214,141,.04); border-radius: var(--r-sm); }
.faq .pm::before, .faq .pm::after { transition: transform .25s ease, opacity .25s ease, background .2s ease; }
.faq summary:hover .pm::before, .faq summary:hover .pm::after { background: var(--green); }

/* --- billing switch --- */
.switch { transition: background .25s ease; }
.switch:not(.is-on) { background: var(--border-strong); }
.switch:not(.is-on) i { transform: translateX(0); }
.plan-price .amount, .plan-price .cur { transition: opacity .25s ease; }
.plan-price.swap .amount, .plan-price.swap .cur { opacity: 0; }
.save-badge { transition: opacity .25s ease, transform .25s ease; }
.save-badge.hide { opacity: 0; transform: scale(.9); }

/* --- lang toggle --- */
.lang { transition: background .2s ease, color .2s ease, box-shadow .2s ease; }

/* --- back to top --- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green); color: var(--green-ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card);
  opacity: 0; transform: translateY(16px) scale(.8); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--green-hover); transform: translateY(-3px); }

/* --- reduced motion: disable it all --- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
  .hero h1, .hero h1 .word, .hero h1 mark.hl, .hero h1 mark.hl .hl-in,
  .hero-sub, .hero .hero-cta, .tag { opacity: 1 !important; animation: none !important; transform: none !important; filter: none !important; }
  .hero h1 mark.hl::before, .hero h1::after { display: none; }
  .capsule .dot::after { animation: none; }
  .btn:hover, .step-card:hover, .plan:hover, .testi-card:hover, .plan-featured:hover { transform: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

/* ============ PLAN PAGE — hero ============ */
.plan-hero { text-align: center; }
.plan-hero-title { font-size: clamp(34px, 6vw, 56px); font-weight: 700; color: var(--ink); line-height: 1.1; }
.plan-hero .section-sub { margin: 16px auto 0; max-width: 720px; }

/* ============ PLAN PAGE — compare table ============ */
#compare .section-sub { margin: 12px auto 0; }
/* NOTE: no overflow on .cmp-scroll/.cmp at desktop, so thead can stick to the
   viewport. Horizontal scroll (which needs overflow) is re-enabled at ≤760px,
   where the sticky header is intentionally released. */
.cmp-scroll { margin-top: 40px; }
.cmp {
  width: 100%; min-width: 720px; border-collapse: collapse;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  text-align: left; font-size: 15px;
}
.cmp th, .cmp td { padding: 16px 22px; vertical-align: middle; }
/* header row — sticks below the site-header (64px tall) while the table is in view */
.cmp thead th {
  position: sticky; top: 64px; z-index: 20;
  background: var(--surface); vertical-align: top;
  box-shadow: inset 0 -1px 0 var(--border), 0 6px 14px rgba(20, 24, 40, .05);
}
.cmp thead th.cmp-featured { background: #eaf9f0; }   /* opaque so rows don't show through */
.cmp thead th:first-child { border-top-left-radius: var(--r-lg); }
.cmp thead th:last-child  { border-top-right-radius: var(--r-lg); }
.cmp tbody tr:last-child td:first-child { border-bottom-left-radius: var(--r-lg); }
.cmp tbody tr:last-child td:last-child  { border-bottom-right-radius: var(--r-lg); }
.cmp-corner { width: 40%; }
.cmp-plan { width: 20%; text-align: center; }
.cmp-plan-name { display: block; font-size: 20px; font-weight: 600; color: var(--ink); text-align: left; margin-bottom: 12px; }
.cmp-btn { width: 100%; justify-content: center; font-size: 14px; padding: 9px 12px; }
/* body */
.cmp tbody tr { border-bottom: 1px solid var(--border); }
.cmp tbody tr:last-child { border-bottom: 0; }
.cmp td:not(.cmp-feat):not([colspan]) { text-align: center; color: var(--muted); }
.cmp-feat { color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.cmp-info {
  font-style: normal; font-size: 11px; font-weight: 600; line-height: 15px; text-align: center;
  width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-strong);
  color: var(--muted-2); flex: 0 0 16px;
}
/* group header rows */
.cmp-group td { font-size: 18px; font-weight: 600; color: var(--ink); padding-top: 26px; padding-bottom: 14px; background: #fff; }
/* pro column highlight */
.cmp .cmp-featured { background: rgba(88, 214, 141, .12); }
.cmp .cmp-hl { background: rgba(88, 214, 141, .06); color: var(--ink-2); }
/* check / dash marks */
.cmp .ck { color: var(--green-hover); font-weight: 700; font-size: 17px; }
.cmp .dash { color: var(--muted-2); }

/* mobile: table scrolls horizontally in its own box → sticky header released */
@media (max-width: 760px) {
  .cmp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r-lg); }
  .cmp thead th { position: static; top: auto; box-shadow: inset 0 -1px 0 var(--border); }
}
@media (max-width: 700px) {
  .cmp th, .cmp td { padding: 13px 16px; font-size: 14px; }
  .cmp-plan-name { font-size: 17px; }
}
