/* Hero demo: iPhone + iMessage thread. Light mode only. */
.hero-grid{grid-template-columns:.95fr 1.05fr;gap:56px}
@media (min-width:901px){.hero{padding-top:28px}}
.ph-stage{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px 0 6px}
.ph-stage::before{content:"";position:absolute;inset:4% -4% 8%;border-radius:40px;background:radial-gradient(closest-side,rgba(var(--stripe-rgb),.10),transparent 75%);z-index:-1}
.iph{--w:300px;width:var(--w);height:calc(var(--w)*2.1333);flex:none;margin:0;position:relative;border-radius:calc(var(--w)*.17);background:#0b0b0c;padding:calc(var(--w)*.035);
  box-shadow:0 0 0 1.5px #2a2a2d inset,0 0 0 3px #1a1a1c,0 60px 90px -40px rgba(var(--deep-rgb),.45),0 18px 30px -18px rgba(0,0,0,.35);
  font-family:-apple-system,"SF Pro Text","Inter",system-ui,sans-serif;font-size:calc(var(--w)*.0475);line-height:1.28;letter-spacing:-.01em;color:#000}
.iph::after{content:"";position:absolute;right:-3px;top:28%;width:3px;height:13%;border-radius:0 2px 2px 0;background:#1d1d1f}
.iph-screen{position:relative;height:100%;border-radius:calc(var(--w)*.135);overflow:hidden;background:#fff;display:flex;flex-direction:column;isolation:isolate}
.iph-status{position:relative;height:calc(var(--w)*.15);display:flex;align-items:center;justify-content:space-between;padding:calc(var(--w)*.012) calc(var(--w)*.075) 0 calc(var(--w)*.09);font-weight:600;font-size:calc(var(--w)*.05);flex:none}
.iph-status .di{position:absolute;left:50%;top:calc(var(--w)*.035);transform:translateX(-50%);width:32%;height:calc(var(--w)*.095);border-radius:99px;background:#000}
.iph-status .ic{display:flex;gap:calc(var(--w)*.016);align-items:center}
.iph-status svg{height:calc(var(--w)*.036);width:auto;fill:#000;color:#000}
.iph-status svg.bat{height:calc(var(--w)*.042)}
.iph-head{flex:none;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;padding:0 calc(var(--w)*.045) calc(var(--w)*.025);border-bottom:.5px solid rgba(0,0,0,.12);background:rgba(249,249,249,.94)}
.iph-head .back{width:calc(var(--w)*.035);color:#0A7AFF}
.iph-head .cam{width:calc(var(--w)*.075);color:#0A7AFF;justify-self:end}
.iph-head .who{display:flex;flex-direction:column;align-items:center;gap:calc(var(--w)*.01)}
.iph-head .who img{width:calc(var(--w)*.15);height:calc(var(--w)*.15);border-radius:50%;object-fit:cover}
.iph-head .who span{font-size:calc(var(--w)*.037);text-transform:none;letter-spacing:0;font-weight:400;font-family:inherit;display:flex;align-items:center;gap:2px;color:#000}
.iph-head .who span svg{width:calc(var(--w)*.022);color:#8e8e93}
.iph-thread{flex:1 1 0;min-height:0;overflow:hidden;position:relative}
.ph-col{position:absolute;left:0;right:0;bottom:0}
.ph-stage.anim .ph-col{top:0;bottom:auto;will-change:transform;transition:transform .5s cubic-bezier(.22,.8,.25,1)}
.ph-col{display:flex;flex-direction:column;padding:calc(var(--w)*.03) calc(var(--w)*.035) calc(var(--w)*.025);gap:calc(var(--w)*.008)}
.ph-stamp{text-align:center;color:#8e8e93;font-size:calc(var(--w)*.034);margin:2px 0 calc(var(--w)*.06)}
.ph-stamp b{font-weight:600}
.pm{max-width:80%;white-space:normal;padding:calc(var(--w)*.022) calc(var(--w)*.04);border-radius:calc(var(--w)*.06);word-wrap:break-word;position:relative}
.pm.me{align-self:flex-end;background:var(--bubble);color:#fff}
.pm.them{align-self:flex-start;background:#E9E9EB;color:#000}
.pm.them+.pm.me,.pm.me+.pm.them,.pm.me+.ph-receipt+.pm.them{margin-top:calc(var(--w)*.025)}
.pm.vid-b{padding:0;background:#000;overflow:visible;border-radius:calc(var(--w)*.06)}
.pm.vid-b video{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.pm.sw{width:38%;aspect-ratio:9/16}
.pm.sw.land{width:62%;aspect-ratio:16/9}
.pm.pre{white-space:pre-line}
.pm.bd{width:58%;aspect-ratio:9/16;margin-top:calc(var(--w)*.008)}
.pm .tb{position:absolute;left:calc(var(--w)*-.055);top:calc(var(--w)*-.05);width:calc(var(--w)*.1);height:calc(var(--w)*.1);border-radius:50%;background:#E9E9EB;display:grid;place-items:center;font-size:calc(var(--w)*.05);box-shadow:0 0 0 2px #fff;transform:scale(0);transition:transform .35s cubic-bezier(.3,1.6,.5,1)}
.pm .tb.on{transform:scale(1)}
.ph-receipt{align-self:flex-end;color:#8e8e93;font-size:calc(var(--w)*.032);font-weight:500;margin:2px 4px 0}
.ph-typing{align-self:flex-start;display:flex;gap:4px;background:#E9E9EB;border-radius:calc(var(--w)*.06);padding:calc(var(--w)*.035) calc(var(--w)*.04)}
.ph-typing i{width:calc(var(--w)*.024);height:calc(var(--w)*.024);border-radius:50%;background:#8e8e93;opacity:.5;animation:phDot 1.2s infinite}
.ph-typing i:nth-child(2){animation-delay:.18s}.ph-typing i:nth-child(3){animation-delay:.36s}
@keyframes phDot{0%,60%,100%{opacity:.35;transform:none}30%{opacity:.9;transform:translateY(-2px)}}
.iph-input{flex:none;display:flex;align-items:flex-end;gap:calc(var(--w)*.025);padding:calc(var(--w)*.02) calc(var(--w)*.035) calc(var(--w)*.085)}
.iph-input .plus{flex:none;width:calc(var(--w)*.095);height:calc(var(--w)*.095);border-radius:50%;background:#E9E9EB;display:grid;place-items:center;color:#7c7c80}
.iph-input .plus svg{width:45%}
.iph-input .field{flex:1;min-height:calc(var(--w)*.095);border:1px solid #d1d1d6;border-radius:calc(var(--w)*.05);display:flex;flex-wrap:wrap;align-items:center;padding:3px 3px 3px calc(var(--w)*.035);position:relative;gap:4px}
.iph-input .att{display:none;width:100%;padding:3px 0 2px}
.iph-input .att img{width:34%;aspect-ratio:9/16;object-fit:cover;border-radius:calc(var(--w)*.035)}
.iph-input .att.land img{width:45%;aspect-ratio:16/9}
.iph-input .txt{flex:1;color:#000;white-space:pre-wrap;min-height:1em}
.iph-input .txt:empty{display:none}
.iph-input .txt.caret::after{content:"";display:inline-block;width:1.5px;height:1.05em;background:#0A7AFF;vertical-align:-2px;margin-left:1px}
.iph-input .ph{flex:1;color:#b0b0b5}
.iph-input .send{flex:none;margin-left:auto;width:calc(var(--w)*.075);height:calc(var(--w)*.075);border-radius:50%;background:#0A7AFF;display:grid;place-items:center;transform:scale(0);transition:transform .2s var(--ease)}
.iph-input .send svg{width:62%}
.iph-input.has .send{transform:scale(1)}
.iph-input.has-att .att{display:block}
.iph-home{position:absolute;left:50%;bottom:calc(var(--w)*.02);transform:translateX(-50%);width:36%;height:4px;border-radius:9px;background:#000}
.ph-note{margin-top:18px;font-size:13px;color:var(--muted);display:flex;align-items:center;gap:8px}
/* animation states (JS adds .on). Without JS or with reduced motion the final thread is shown. */
.js .ph-stage.anim .ph-col>[data-k]{display:none}
.js .ph-stage.anim .ph-col>[data-k].on{display:block;animation:phPop .34s cubic-bezier(.25,1.35,.5,1) both}
.js .ph-stage.anim .ph-col>.vid-b[data-k].on{display:block}
.js .ph-stage.anim .ph-typing{display:none}
.js .ph-stage.anim .ph-typing.on{display:flex;animation:phPop .25s ease both}
.ph-stage:not(.anim) .ph-typing{display:none}
.ph-stage:not(.anim) .pm .tb{transform:scale(1)}
.ph-stage:not(.anim) .ph-receipt{display:none}
@keyframes phPop{from{opacity:0;transform:translateY(8px) scale(.94)}to{opacity:1;transform:none}}
.ph-col>.pm.me.on{transform-origin:100% 100%}.ph-col>.pm.them.on{transform-origin:0 100%}
@media (prefers-reduced-motion:reduce){.ph-typing i{animation:none}}
@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr;gap:28px}
  .ph-stage{order:-1;padding-top:4px}
  .hero-copy{text-align:center}.hero .cta-row{justify-content:center}.hero-sub{margin-left:auto;margin-right:auto}
}
@media (max-width:560px){
  .hero{padding-top:10px}
  .iph{--w:224px}
  .hero .hero-top{display:none}
  .hero-grid{gap:18px}
  .hero-copy{display:flex;flex-direction:column;align-items:center}
  .hero .cta-row{margin-top:18px;order:2}
  .hero-sub{order:3}
  .hero-title{font-size:44px}
  .hero-sub{font-size:17px;margin-top:16px}
  .ph-note{margin-top:12px}
  .hero-copy .hero-icon{display:none}
}
/* first paint (before hero.js runs): empty thread with the swing already attached in the input bar */
.hanim .ph-stage:not(.anim) .ph-col>[data-k]{display:none}
.hanim .ph-stage:not(.anim) .ph-col{top:0;bottom:auto}
.hanim .ph-stage:not(.anim) .iph-input .att{display:block}
.hanim .ph-stage:not(.anim) .iph-input .ph{display:none}
.hanim .ph-stage:not(.anim) .iph-input .send{transform:scale(1)}
