/* ==========================================================================
   Hero stage: a looping "design editor" animation. Fixed 1000x560 scene, scaled to fit.
   ========================================================================== */
.hero-stage { margin-top: clamp(2.5rem, 5vw, 4rem); position: relative; }
.hero-stage::before {
  content: ""; position: absolute; inset: -6% -4% -10%;
  background: radial-gradient(60% 55% at 50% 40%, rgba(143, 211, 176, .16), transparent 70%),
              radial-gradient(40% 40% at 85% 70%, rgba(217, 178, 106, .10), transparent 70%);
  pointer-events: none; z-index: 0;
}
.stage { position: relative; z-index: 1; margin: 0; }
.stage-fit {
  position: relative; width: 100%; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--line-2); background: #0a0f0d;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.st {
  position: absolute; left: 0; top: 0; width: 1000px; height: 560px; transform-origin: 0 0;
  font-family: var(--sans); color: #cfd8d2; font-size: 11px; line-height: 1.3; user-select: none;
  --ease: cubic-bezier(.6, 0, .3, 1);
}
.st * { box-sizing: border-box; }

/* chrome */
.st-top { position: absolute; left: 0; top: 0; right: 0; height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: #0d1411; border-bottom: 1px solid #1c2823; }
.st-dots { display: flex; gap: 6px; margin-right: 10px; } .st-dots i { width: 10px; height: 10px; border-radius: 50%; background: #26332d; }
.st-file { font-weight: 600; color: #e9e6dc; } .st-file em { font-style: normal; font-weight: 400; color: #7d8a83; }
.st-sp { flex: 1; }
.st-av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #0a0f0d; margin-left: -6px; border: 2px solid #0d1411; }
.st-av.a1 { background: #8fd3b0; } .st-av.a2 { background: #d9b26a; opacity: 0; transition: opacity .4s; } .st-av.a2.on { opacity: 1; }
.st-share { background: #8fd3b0; color: #0a0f0d; font-weight: 700; border-radius: 6px; padding: 5px 11px; margin-left: 8px; }
.st-zoom { color: #7d8a83; margin-left: 6px; }
.st-ready { position: absolute; right: 120px; top: 9px; display: flex; gap: 6px; align-items: center; font-weight: 600; color: #8fd3b0; background: rgba(143, 211, 176, .12); border-radius: 99px; padding: 4px 10px; opacity: 0; transform: translateY(-4px); transition: all .5s; }
.st-ready.on { opacity: 1; transform: none; }

.st-tools { position: absolute; left: 0; top: 40px; bottom: 0; width: 48px; background: #0d1411; border-right: 1px solid #1c2823; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 12px; }
.st-tool { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #7d8a83; transition: background .25s, color .25s; }
.st-tool.on { background: #8fd3b0; color: #0a0f0d; }
.st-tool svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.st-layers { position: absolute; left: 48px; top: 40px; bottom: 0; width: 170px; background: #0d1411; border-right: 1px solid #1c2823; padding: 14px 10px; }
.st-layers p, .st-props p { margin: 0 0 10px; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #5f6d66; font-weight: 600; }
.st-layers ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.st-layers li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; opacity: 0; transform: translateX(-6px); transition: opacity .35s, transform .35s, background .25s; white-space: nowrap; }
.st-layers li::before { content: ""; width: 9px; height: 9px; border-radius: 2px; border: 1.5px solid #5f6d66; flex: none; }
.st-layers li.f::before { border-radius: 1px; border-style: dashed; }
.st-layers li.c { margin-left: 14px; }
.st-layers li.on { opacity: 1; transform: none; }
.st-layers li.act { background: rgba(143, 211, 176, .14); color: #e9e6dc; }
.st-layers li.act::before { border-color: #8fd3b0; }

.st-props { position: absolute; right: 0; top: 40px; bottom: 0; width: 190px; background: #0d1411; border-left: 1px solid #1c2823; padding: 14px 14px; }
.st-pr { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid #16201b; color: #7d8a83; }
.st-pr b { color: #e9e6dc; font-weight: 500; font-variant-numeric: tabular-nums; }
.st-sw { display: inline-block; width: 13px; height: 13px; border-radius: 3px; margin-right: 7px; vertical-align: -2px; border: 1px solid rgba(255, 255, 255, .2); transition: background .5s; }
.st-pal { display: flex; gap: 6px; margin: 10px 0 2px; }
.st-pal i { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid transparent; transition: border-color .25s, transform .25s; }
.st-pal i.pick { border-color: #fff; transform: scale(1.12); }

/* canvas */
.st-canvas { position: absolute; left: 218px; top: 40px; width: 592px; height: 520px; overflow: hidden; background: #0a0f0d; transition: opacity .8s; }
.st.fade .st-canvas { opacity: 0; }
.st-grid { position: absolute; inset: 0; background-image: radial-gradient(#1b2823 1.2px, transparent 1.2px); background-size: 22px 22px; }
.st-flabel { position: absolute; top: -17px; left: 0; color: #7d8a83; font-weight: 500; opacity: 0; transition: opacity .4s; }
.on > .st-flabel, .st-frame.on .st-flabel { opacity: 1; }

.st-frame { position: absolute; width: 0; height: 0; border: 1px solid transparent; overflow: visible; transition: background .6s; }
.st-frame.draw { width: var(--w); height: var(--h); border-color: #8fd3b0; transition: width 1.1s var(--ease), height 1.1s var(--ease), background .6s, border-color .6s; }
.st-frame.filled { background: #f4f7f5; border-color: transparent; }
.st-frame.sel::after { content: ""; position: absolute; inset: -4px; border: 1px solid #8fd3b0; pointer-events: none; opacity: 0; transition: opacity .3s; }
.st-frame.draw.sel::after { opacity: 1; }
.st-clip { position: absolute; inset: 0; overflow: hidden; border-radius: 0; }
.st-phone { left: 40px; top: 44px; --w: 200px; --h: 440px; }
.st-phone.filled { border-radius: 22px; } .st-phone .st-clip { border-radius: 21px; }
.st-desk { left: 300px; top: 120px; --w: 270px; --h: 175px; }
.st-desk.filled { border-radius: 8px; background: #f4f7f5; } .st-desk .st-clip { border-radius: 7px; }

.it { position: absolute; opacity: 0; transform: translateY(8px) scale(.97); transition: opacity .45s, transform .45s var(--ease), background .6s; }
.it.on { opacity: 1; transform: none; }
.st-dim { position: absolute; font-weight: 700; color: #0a0f0d; background: #8fd3b0; border-radius: 4px; padding: 2px 6px; font-size: 10px; left: 50%; bottom: -26px; transform: translateX(-50%); white-space: nowrap; opacity: 0; transition: opacity .3s; }
.st-frame.draw .st-dim { opacity: 1; } .st-frame.filled .st-dim { opacity: 0; transition-delay: .4s; }

/* phone content (all coordinates inside the 200x420 frame) */
.p-av { left: 12px; top: 16px; width: 24px; height: 24px; border-radius: 50%; background: #1f8f68; }
.p-hd { left: 44px; top: 17px; font-size: 11px; font-weight: 700; color: #0f1a15; white-space: nowrap; min-height: 14px; }
.p-hd small { display: block; font-weight: 400; font-size: 8px; color: #7b8780; }
.p-bell { right: 12px; top: 17px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 1px solid #e0e7e3; }
.p-bal { left: 12px; top: 56px; width: 176px; height: 104px; border-radius: 14px; background: #cfd6d2; overflow: hidden; }
.p-bal.green { background: linear-gradient(145deg, #14674c, #0b3b2c); }
.p-bal .t { position: absolute; inset: 0; padding: 12px; color: #fff; opacity: 0; transition: opacity .6s .25s; }
.p-bal.green .t { opacity: 1; }
.p-bal .t span { display: block; font-size: 8px; opacity: .75; } .p-bal .t strong { display: block; font-size: 21px; letter-spacing: -.02em; margin-top: 2px; min-height: 26px; }
.p-bal .glow { position: absolute; right: -30px; top: -34px; width: 110px; height: 110px; border-radius: 50%; background: rgba(143, 211, 176, .18); }
.p-fee { position: absolute; left: 12px; bottom: 10px; background: rgba(143, 211, 176, .22); color: #8fd3b0; font-size: 8px; font-weight: 700; padding: 3px 8px; border-radius: 99px; opacity: 0; transform: translateY(6px); transition: all .5s; }
.p-fee.on { opacity: 1; transform: none; }
.p-act { top: 172px; width: 54px; height: 54px; border-radius: 14px; background: #fff; box-shadow: 0 1px 0 #e0e7e3; }
.p-act i { position: absolute; left: 14px; top: 9px; width: 26px; height: 26px; border-radius: 9px; background: rgba(31, 143, 104, .16); }
.p-act b { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 8px; color: #0f1a15; }
.p-row { left: 12px; width: 176px; height: 38px; }
.p-row i { position: absolute; left: 0; top: 4px; width: 28px; height: 28px; border-radius: 50%; }
.p-row b { position: absolute; left: 36px; top: 6px; font-size: 9px; color: #0f1a15; } .p-row s { position: absolute; left: 36px; top: 19px; width: 60px; height: 5px; border-radius: 3px; background: #dde4e0; text-decoration: none; }
.p-row em { position: absolute; right: 0; top: 10px; font-size: 9px; font-weight: 700; font-style: normal; color: #0f1a15; }
.p-tab { left: 0; right: 0; bottom: 0; height: 36px; background: #fff; border-top: 1px solid #e6ece8; display: flex; justify-content: space-around; align-items: center; }
.p-tab i { width: 14px; height: 14px; border-radius: 5px; background: #cfd6d2; } .p-tab i:first-child { background: #1f8f68; }

/* desktop content (inside 270x175) */
.d-side { left: 0; top: 0; bottom: 0; width: 52px; background: #0b3b2c; }
.d-side i { position: absolute; left: 14px; width: 24px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .35); } .d-side i:first-child { background: #8fd3b0; }
.d-title { left: 66px; top: 12px; font-size: 11px; font-weight: 700; color: #0f1a15; white-space: nowrap; }
.d-card { left: 66px; top: 36px; width: 196px; height: 50px; border-radius: 9px; background: linear-gradient(145deg, #14674c, #0b3b2c); color: #fff; padding: 8px 11px; }
.d-card span { display: block; font-size: 7px; opacity: .75; } .d-card strong { font-size: 15px; letter-spacing: -.02em; }
.d-row { left: 66px; width: 196px; height: 22px; border-top: 1px solid #dde4e0; }
.d-row i { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #d5dfd9; }
.d-row b { position: absolute; left: 18px; top: 7px; width: 54px; height: 5px; border-radius: 3px; background: #c5cfc9; }
.d-row u { position: absolute; left: 98px; top: 4px; font-size: 7px; font-weight: 700; text-decoration: none; padding: 2px 6px; border-radius: 99px; }
.d-row em { position: absolute; right: 0; top: 6px; font-size: 8px; font-weight: 700; font-style: normal; color: #0f1a15; }

/* comment pin, link, test card */
.st-pin { position: absolute; left: 216px; top: 124px; z-index: 6; opacity: 0; transform: scale(.6); transition: opacity .35s, transform .45s cubic-bezier(.3, 1.6, .5, 1); transform-origin: 0 100%; }
.st-pin.on { opacity: 1; transform: none; }
.st-pin .dot { width: 24px; height: 24px; border-radius: 50% 50% 50% 4px; background: #d9b26a; color: #0a0f0d; font-weight: 800; display: grid; place-items: center; font-size: 11px; transition: background .4s; }
.st-pin.done .dot { background: #8fd3b0; }
.st-pin .bub { position: absolute; left: 14px; top: -86px; width: 156px; background: #17211c; border: 1px solid #2a3a32; border-radius: 10px 10px 10px 2px; padding: 8px 10px; color: #e9e6dc; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .7); transition: opacity .4s; }
.st-pin .bub b { display: block; color: #d9b26a; font-size: 9px; margin-bottom: 2px; } .st-pin.done .bub b { color: #8fd3b0; }
.st-pin.done .bub { opacity: .55; }
.st-link { position: absolute; left: 0; top: 0; width: 592px; height: 520px; pointer-events: none; overflow: visible; }
.st-link path { fill: none; stroke: #8fd3b0; stroke-width: 2; stroke-dasharray: 4 5; stroke-dashoffset: 0; opacity: 0; }
.st-link.on path { opacity: 1; animation: stDraw 1s var(--ease) both; }
.st-link circle { fill: #8fd3b0; opacity: 0; transition: opacity .3s .8s; } .st-link.on circle { opacity: 1; }
@keyframes stDraw { from { stroke-dasharray: 300 300; stroke-dashoffset: 300; } to { stroke-dasharray: 4 5; stroke-dashoffset: 0; } }
.st-chip { position: absolute; background: #17211c; border: 1px solid #2a3a32; color: #cfd8d2; border-radius: 99px; padding: 4px 10px; font-weight: 600; font-size: 10px; opacity: 0; transition: opacity .4s .6s; white-space: nowrap; }
.st-chip.on { opacity: 1; }
.st-test { position: absolute; left: 300px; top: 318px; width: 270px; background: #101815; border: 1px solid #25342d; border-radius: 12px; padding: 14px 16px; opacity: 0; transform: translateY(10px); transition: all .6s var(--ease); }
.st-test.on { opacity: 1; transform: none; }
.st-test small { color: #7d8a83; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.st-test strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 30px; color: #8fd3b0; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.st-test p { margin: 4px 0 0; color: #9aa59e; font-size: 10px; }
.st-test .bar { height: 5px; border-radius: 3px; background: #1c2823; margin-top: 10px; overflow: hidden; } .st-test .bar i { display: block; height: 100%; width: 0; background: #8fd3b0; transition: width 1.2s var(--ease) .3s; } .st-test.on .bar i { width: 82%; }

/* cursors */
.st-cur { position: absolute; left: 0; top: 0; z-index: 20; transform: translate(520px, 440px); transition: transform var(--d, 900ms) var(--ease), opacity .3s; pointer-events: none; }
.st-cur svg { width: 18px; height: 18px; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.st-cur span { position: absolute; left: 14px; top: 16px; white-space: nowrap; font-weight: 700; font-size: 10px; border-radius: 4px 9px 9px 9px; padding: 3px 8px; color: #0a0f0d; }
.st-cur.me svg { fill: #8fd3b0; } .st-cur.me span { background: #8fd3b0; }
.st-cur.other { opacity: 0; } .st-cur.other.on { opacity: 1; } .st-cur.other svg { fill: #d9b26a; } .st-cur.other span { background: #d9b26a; }
.st-cur::after { content: ""; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; opacity: 0; }
.st-cur.me { color: #8fd3b0; } .st-cur.other { color: #d9b26a; }
.st-cur.click::after { animation: stClick .5s ease-out; }
@keyframes stClick { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }

/* caption row */
.stage-cap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .85rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .02em; color: var(--muted); }
.stage-cap .live { display: inline-flex; align-items: center; gap: .5rem; }
.stage-cap .live::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--verified); box-shadow: 0 0 0 0 rgba(143, 211, 176, .5); animation: stPulse 2s infinite; }
.stage.is-paused .stage-cap .live::before, .stage.is-static .stage-cap .live::before { animation: none; background: var(--muted); }
@keyframes stPulse { 70% { box-shadow: 0 0 0 .5rem rgba(143, 211, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(143, 211, 176, 0); } }
.stage-toggle { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: .3em; cursor: pointer; }
.stage-toggle:hover { color: var(--text); }

/* static fallback (reduced motion / no JS): show the finished scene */
.stage.is-static .st *, .stage.is-static .st { transition: none !important; animation: none !important; }
@media (max-width: 40rem) { .stage-cap .hint { display: none; } }

.p-hd b { display: block; min-height: 14px; }
.st-chip { left: 246px; top: 236px; }

/* ---- phone refinements: real tab bar, avatars, action icons ---- */
.st svg { display: block; }
.st-av { overflow: hidden; padding: 0; } .st-av svg { width: 100%; height: 100%; }
.p-av { background: none; } .p-av svg { width: 100%; height: 100%; }
.p-bell { display: grid; place-items: center; color: #0f1a15; } .p-bell svg { width: 13px; height: 13px; }
.p-act { top: 170px; height: 52px; color: #14674c; }
.p-act::before { content: ""; position: absolute; left: 12px; top: 7px; width: 30px; height: 26px; border-radius: 10px; background: rgba(31, 143, 104, .14); }
.p-act svg { position: absolute; left: 18px; top: 10px; width: 18px; height: 18px; }
.p-act b { bottom: 5px; }
.p-pay { left: 12px; top: 232px; width: 176px; height: 56px; }
.p-pay em { position: absolute; left: 0; top: 0; font-style: normal; font-size: 8px; font-weight: 700; color: #0f1a15; }
.p-pay .pp { position: absolute; left: 0; right: 0; top: 14px; display: flex; justify-content: space-between; }
.p-pay .pp span { width: 30px; text-align: center; font-size: 0; }
.p-pay .pp svg { width: 28px; height: 28px; margin: 0 auto; }
.p-pay .pp b { display: block; font-size: 7px; font-weight: 600; color: #3b4741; margin-top: 3px; }
.p-pay .add u { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto; border-radius: 50%; border: 1.3px dashed #9fb1a8; color: #6b7c73; text-decoration: none; font-size: 14px; font-weight: 400; line-height: 1; }
.p-row { height: 34px; }
.p-row .av { position: absolute; left: 0; top: 3px; width: 28px; height: 28px; } .p-row .av svg { width: 100%; height: 100%; }
.p-row b { top: 5px; } .p-row s { top: 18px; } .p-row em { top: 9px; }
.p-tab { height: 48px; background: #fff; border-top: 1px solid #e6ece8; align-items: flex-start; padding: 6px 6px 0; justify-content: space-between; }
.p-tab .tb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #9aa6a0; }
.p-tab .tb svg { width: 15px; height: 15px; } .p-tab .tb b { font-size: 7px; font-weight: 600; }
.p-tab .tb.on { color: #1f8f68; }
.p-hi { position: absolute; left: 50%; bottom: 4px; width: 56px; height: 3px; border-radius: 2px; background: #0f1a15; transform: translateX(-50%); opacity: .85; }
.d-side .d-me { position: absolute; left: 14px; bottom: 10px; width: 24px; height: 24px; } .d-me svg { width: 100%; height: 100%; }
.d-user { right: 10px; top: 8px; width: 20px; height: 20px; } .d-user svg { width: 100%; height: 100%; }
.d-row .av { position: absolute; left: 0; top: 4px; width: 14px; height: 14px; } .d-row .av svg { width: 100%; height: 100%; }
.d-row b { left: 20px; }

/* ---- hero layout: copy on the left, the animation behind it on the right ---- */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.hero-copy { position: relative; z-index: 2; display: block; width: 100%; }
.hero-side { max-width: 31rem; margin-top: 1.6rem; }
.hero-side .lede { margin-top: 0; }
.hero-stage { padding-inline: var(--gutter); margin-top: 2.5rem; pointer-events: none; }
.stage-toggle { pointer-events: auto; }
@media (min-width: 64rem) {
  .hero { min-height: calc(min(66vw, 70rem) * .56 + 11rem); padding-block: 4.5rem; }
  .hero h1 { max-width: 12.5ch; }
  .hero-stage {
    position: absolute; right: 0; top: clamp(2.5rem, 4.5vw, 4rem); width: min(66vw, 70rem); margin: 0; padding: 0; z-index: 1;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .3) 9%, #000 30%);
            mask-image: linear-gradient(90deg, transparent 0, rgba(0, 0, 0, .3) 9%, #000 30%);
  }
  .hero-stage::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 6%, transparent 32%); mask-image: linear-gradient(90deg, #000 0, #000 6%, transparent 32%); }
  .stage-fit { border-radius: 16px 0 0 16px; border-right: 0; }
  .stage-cap { justify-content: flex-end; padding-right: var(--gutter); } .stage-cap .live, .stage-cap .hint { display: none; }
}
