/* Motivoo · Built for teams —— 滚动驱动的协作组装动效
   视觉与分镜来源：Figma「Motivoo视频模型」→ 首页
     380:808 (11) 空框 → 380:836 (5) Built → 380:857 (6) for
     → 380:879 (7) teams → 380:907 (8) 选中 → 380:958 (9) 终态
   分镜里每个光标的落点都在自己那块字的右下角，「起始点」箭头标的是
   字块 + 光标整体从哪飞进来（对照 vizcom 实录：Jordan 拖 for、Jesse 拖 te…）
     终态同 380:147；副标题与按钮同 380:103
   舞台按 Figma 原尺寸 1130×506 绝对定位，整体 transform:scale(--s) 适配窗口，
   所以下面所有 px 都可以直接和设计稿对号入座。
   位置/透明度这类随滚动变化的量全部由 JS 按进度 p 写入，CSS 只负责静态外观。 */

:root{
  --page:#edf4e4;
  --w60:rgba(31,82,62,.64);
  --w40:rgba(31,82,62,.42);

  /* 设计稿字体 LINE Seed Sans 非系统字体，此处降级，字号字重以本文件为准 */
  --font-en:"LINE Seed Sans","Helvetica Neue",Arial,"PingFang SC",
            -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;

  --ease:cubic-bezier(.4,0,.2,1);

  --stage-w:1130px;
  --stage-h:506px;
  --s:1;                 /* 舞台缩放比，由 JS 按窗口尺寸写入 */
}

*{box-sizing:border-box;margin:0;padding:0;}
body{
  background:var(--page);
  color:#205442;
  font-family:var(--font-en);
  -webkit-font-smoothing:antialiased;
}

/* ---- 滚动轨道：轨道提供行程，.pin 钉住一屏 ---- */
.track{height:420vh;}
.pin{
  position:sticky;top:0;
  height:100vh;
  display:flex;align-items:center;justify-content:center;
  /* 光标是从画布外飞进来的，不裁的话页面能横向滚出去一截。
     裁在 .pin 上而不是 html 上：html 用 overflow 会影响 sticky，而且实测拦不住 */
  overflow:clip;
}
.sect{display:flex;flex-direction:column;align-items:center;}

/* 缩放后的舞台不再占原始高度，用外壳按实际高度占位 */
.stage-fit{
  width:calc(var(--stage-w) * var(--s));
  height:calc(var(--stage-h) * var(--s));
}
.stage{
  position:relative;
  width:var(--stage-w);height:var(--stage-h);
  transform:scale(var(--s));transform-origin:top left;
}

/* ---- 画布网格：Figma 稿里没有，取自 vizcom 参考，删掉 .grid 一行即可回到设计稿 ---- */
.grid{
  position:absolute;left:7px;top:8px;width:1115px;height:492px;
  background-image:
    linear-gradient(to right,rgba(69,126,82,.10) 1px,transparent 1px),
    linear-gradient(to bottom,rgba(69,126,82,.10) 1px,transparent 1px);
  background-size:111px 98px;   /* 整数格避免 1px 细线被亚像素抹掉 */
  -webkit-mask-image:radial-gradient(115% 125% at 50% 50%,#000 40%,transparent 100%);
          mask-image:radial-gradient(115% 125% at 50% 50%,#000 40%,transparent 100%);
}

/* ---- 选中框：虚线边 + 四角控制点（Figma 380:150 ~ 380:154） ---- */
.frame{position:absolute;left:7px;top:8px;width:1115px;height:492px;}
.handle{position:absolute;width:16px;height:16px;background:#fff;}
.handle.tl{left:0;top:0;}
.handle.tr{left:1114px;top:0;}
.handle.br{left:1114px;top:490px;}
.handle.bl{left:0;top:490px;}

/* ---- 文本选区 + 标题（Figma 380:155 / 380:148 / 380:149） ---- */
.sel{
  position:absolute;left:474px;top:245px;width:665px;height:183px;
  background:rgba(99,161,97,.12);
}

/* left/top/font-size 均为 Figma 原值；--base-fix 是渲染差异的基线补偿，包含两部分：
   1) LINE Seed Sans 行盒 1.32em，降级到 Arial 只有 1.12em；
   2) 字块是 inline-block，行盒基线对齐规则和纯文本不同。
   实测把两行基线对到 Figma 导出图的 207 / 384，改字体后需要重新量。 */
.hl{position:absolute;font-weight:700;color:#205442;white-space:pre;}
.hl-1{--base-fix:5px;left:137px;top:calc(60px + var(--base-fix));font-size:140px;line-height:185px;}
.hl-2{--base-fix:6px;left:453px;top:calc(216px + var(--base-fix));font-size:160px;line-height:212px;}

.frag{display:inline-block;white-space:pre;will-change:transform;}

/* ---- 选区两端的手柄（Figma 380:156 / 380:159，右侧为垂直翻转）----
   起始位置都放在选区左端，扫选过程中右手柄跟着选区右缘走 */
.caret{position:absolute;width:29px;height:201px;left:462px;}
.caret svg{display:block;width:29px;height:201px;}
.caret-a{top:227px;}
.caret-b{top:245px;}

/* ---- 协作光标（Figma 380:162 / 380:167 / 380:177 / 380:182） ---- */
.cur{position:absolute;left:0;top:0;width:0;height:0;will-change:transform;}
.cur svg{position:absolute;left:0;top:0;display:block;width:28px;height:31px;}
.cur b{
  position:absolute;left:23px;top:20px;
  display:block;padding:6px 10px;border-radius:6px;
  font-size:20px;line-height:26px;font-weight:700;white-space:nowrap;
  background:var(--c);color:var(--t);
}

/* ---- 副标题与按钮（Figma 380:103） ---- */
.tail{display:flex;flex-direction:column;align-items:center;}
.sub{
  margin-top:30px;
  font-size:20px;line-height:26px;color:var(--w60);text-align:center;
}
.cta{
  margin-top:32px;
  display:flex;align-items:center;justify-content:center;
  height:38px;padding:6px 32px 6px 34px;
  background:#205c46;color:#fff;border-radius:8px;text-decoration:none;
  font-size:16px;line-height:26px;
  transition:transform .2s var(--ease),opacity .2s var(--ease);
}
.cta:hover{transform:translateY(-1px);opacity:.88;}

/* 滚动提示：Figma 里没有，纯粹因为起始态是一个空框，
   不给提示的话页面看着像没加载出来。不需要就删掉 .cue 那一行 */
.cue{
  position:absolute;bottom:44px;
  font-size:13px;letter-spacing:.14em;text-transform:uppercase;color:var(--w40);
}

/* 关掉动态效果时直接显示终态，不跟滚动 */
@media (prefers-reduced-motion:reduce){
  .track{height:100vh;}
  .cue{display:none;}
}

/* 窄屏下舞台已经整体缩小，正文保持原字号更易读，只收一下间距 */
@media (max-width:640px){
  .sub{font-size:16px;margin-top:22px;}
  .cue{bottom:24px;}
}

/* 数联风动场景纹理：无人机、供应链、医疗 AI */
.stage{overflow:visible}
.stage:before{content:"✦  DRONE     ▦  SUPPLY     +  CARE";position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding-bottom:18px;color:rgba(54,112,70,.42);font-size:16px;letter-spacing:.22em;font-weight:600;z-index:-1;background:radial-gradient(circle at 18% 24%,rgba(129,184,107,.22) 0 34px,transparent 35px),radial-gradient(circle at 83% 26%,rgba(106,166,104,.18) 0 42px,transparent 43px),radial-gradient(circle at 76% 78%,rgba(137,185,106,.2) 0 48px,transparent 49px);}
.stage:after{content:"";position:absolute;width:70%;height:70%;left:15%;top:15%;border:1px solid rgba(101,157,94,.18);border-radius:50%;transform:rotate(-14deg);z-index:-2;box-shadow:0 0 0 40px rgba(118,175,105,.045),0 0 0 90px rgba(118,175,105,.035);}
.grid{opacity:.55}
.hl{color:#205442}
.cur b{box-shadow:0 5px 14px rgba(55,105,56,.12)}
