:root{
  --ink:#1e2a5a; --muted:#5f6b8a; --line:#e6e9f2; --bg:#fbf7ef; --card:#ffffff;
  --accent:#ff5a36; --accent-dk:#e0431f; --accent-ink:#fff; --ring:#3a6cf4; --ok:#1c8a4b; --sun:#ffd166; --sky:#cfe9ff;
  --radius:20px; --shadow:0 10px 30px rgba(29,43,83,.10);
  --fw:300px; --fh:392px;   /* one animation frame on the stage (server frame 360x470) */
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0}
html{overflow-x:hidden;scroll-behavior:smooth}
body{background:var(--bg);color:var(--ink);overflow-x:hidden;font:16px/1.5 "Nunito",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;-webkit-text-size-adjust:100%}
h1,h2,h3,.brand,.pose,.teambtn,.cta,.steps button,.bubble,.tile-letter,.step3 .ico{font-family:"Fredoka","Nunito",system-ui,sans-serif}
.wrap{max-width:1120px;margin:0 auto;padding:0 16px}
button{font:inherit;color:inherit}
a{color:inherit}

/* ---------- header */
.top{background:var(--ink);color:#fff;position:sticky;top:0;z-index:20}
.top .wrap{display:flex;align-items:center;justify-content:space-between;height:56px}
.brand{color:#fff;text-decoration:none;font-weight:600;font-size:18px;display:flex;align-items:center;gap:10px}
.brand-mark{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--sun);color:var(--ink);font-weight:700}
.topnav{display:flex;align-items:center;gap:18px;font-weight:700;font-size:15px}
.topnav a{color:#fff;text-decoration:none;opacity:.85}
.topnav a:hover{opacity:1}
.lang{border:1px solid rgba(255,255,255,.35);background:transparent;color:#fff;border-radius:999px;padding:5px 12px;font-weight:700;cursor:pointer}
@media (max-width:520px){ .topnav a{display:none} }

/* ---------- layout */
.studio{display:grid;grid-template-columns:minmax(0,460px) minmax(0,1fr);gap:28px;padding-top:22px;padding-bottom:48px;align-items:start}
@media (max-width:900px){ .studio{display:block;padding-top:8px} .panel{margin-top:10px} }

/* ---------- stage */
.stage{position:sticky;top:72px}
.stage-card{position:relative;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);background:#cfe8ff;min-height:500px}
.sky{position:absolute;inset:0;background:radial-gradient(120% 80% at 50% 0%,#ffffff 0%,#d8ecff 45%,#b9dcff 100%)}
.sky::before{content:"";position:absolute;left:8%;top:12%;width:110px;height:34px;border-radius:40px;background:#fff;opacity:.85;box-shadow:140px 40px 0 -6px #fff,300px -10px 0 -2px #fff}
.ground{position:absolute;left:-10%;right:-10%;bottom:-40px;height:110px;border-radius:50% 50% 0 0;background:linear-gradient(#bfe3a8,#a9d58f)}
/* episode scenery behind the hero: two plates, the visible one fades in (JS sizes them so the plate's ground line meets the feet) */
.scenery{position:absolute;inset:0;overflow:hidden}
.plate{position:absolute;left:0;top:0;opacity:0;transition:opacity 1.2s ease;will-change:opacity;pointer-events:none;max-width:none}
.plate.on{opacity:1}
.rig{position:absolute;inset:0;width:100%;height:100%;z-index:2;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.hero-wrap{position:relative;height:490px;display:flex;align-items:flex-end;justify-content:center}
.hero{width:var(--fw);height:var(--fh);background-repeat:no-repeat;background-size:calc(var(--n,12) * 100%) 100%;background-position:0 0;margin-bottom:26px}
.team{position:absolute;left:0;right:0;bottom:64px;margin:0 auto;width:100%;max-width:520px;height:auto}
.spinner{position:absolute;right:12px;top:12px;width:22px;height:22px;border:3px solid rgba(29,43,83,.15);border-top-color:var(--ring);border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.bubble{position:absolute;left:50%;top:14px;transform:translateX(-50%);z-index:3;background:#fff;border-radius:999px;padding:8px 10px 8px 16px;font-weight:600;font-size:17px;color:var(--ink);box-shadow:0 6px 18px rgba(29,43,83,.15);display:flex;align-items:center;gap:8px;max-width:92%;white-space:nowrap;overflow:hidden}
.bubble::after{content:"";position:absolute;left:50%;bottom:-8px;margin-left:-8px;border:8px solid transparent;border-top-color:#fff;border-bottom:0}
.say{border:0;background:var(--sun);border-radius:999px;width:30px;height:30px;cursor:pointer;font-size:15px;display:grid;place-items:center}
.say[disabled]{opacity:.4;cursor:default}
.say.playing{animation:pulse .6s ease-in-out infinite alternate}
@keyframes pulse{to{transform:scale(1.15)}}
.stage-tools{position:absolute;left:0;right:0;bottom:0;z-index:3;display:flex;justify-content:space-between;align-items:center;padding:10px 10px;gap:8px;background:linear-gradient(transparent,rgba(255,255,255,.55))}
.poses{display:flex;gap:6px}
.pose,.teambtn{border:0;border-radius:999px;padding:8px 12px;background:#fff;box-shadow:0 2px 8px rgba(29,43,83,.12);cursor:pointer;font-weight:600;font-size:14px}
.pose[aria-pressed="true"],.teambtn[aria-pressed="true"]{background:var(--ink);color:#fff}
.hint{color:var(--muted);font-size:14px;margin:10px 0 0;text-align:center}
@media (max-width:900px){
  .stage{position:sticky;top:56px;z-index:10;background:var(--bg);padding:6px 0}
  .stage-card{min-height:0}
  .hero-wrap{height:270px}
  :root{--fw:150px;--fh:196px}
  .hero{margin-bottom:16px}
  .team{max-width:320px;bottom:60px}
  .hint{display:none}
  .bubble{font-size:15px;top:8px}
  .stage-tools{padding:6px 6px;gap:4px}
  .poses{gap:4px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .pose,.teambtn{padding:6px 8px;font-size:12px;white-space:nowrap;flex:0 0 auto}
}

/* ---------- panel + steps */
.panel{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px 20px 20px;min-width:0;max-width:100%}
.step{min-width:0}
.presets,.thumbs,.swatches,.chips{max-width:100%}
@media (max-width:900px){ .panel{padding:14px 14px 16px} }
.promise h1{font-size:clamp(26px,3.4vw,36px);line-height:1.12;margin:2px 0 8px;font-weight:700}
.promise .lede{margin-bottom:16px}
.steps{display:flex;gap:6px;margin:0 0 14px;overflow-x:auto;padding-bottom:4px;-webkit-overflow-scrolling:touch}
.steps button{flex:0 0 auto;border:0;background:#f0f2f8;border-radius:999px;padding:7px 12px;font-weight:600;font-size:14px;cursor:pointer;color:var(--muted);display:flex;align-items:center;gap:6px}
.steps button::before{content:attr(data-n);display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#dfe3ee;color:var(--ink);font-size:12px}
.steps button.done::before{content:"✓";background:var(--ok);color:#fff}
.steps button[aria-current="step"]{background:var(--ink);color:#fff}
.steps button[aria-current="step"]::before{background:var(--sun);color:var(--ink)}
.panel h2{font-size:24px;margin:2px 0 4px;font-weight:700}
.panel h3{font-size:18px;margin:24px 0 8px}
.lede{color:var(--muted);margin:0 0 14px}
.field{display:block;margin:0 0 8px}
.field span{display:block;font-weight:800;font-size:14px;margin-bottom:6px}
.field input{width:100%;padding:12px 14px;border:2px solid var(--line);border-radius:14px;background:#fff;font-size:18px;color:var(--ink);font-weight:700}
.field.big input{font-size:24px;padding:14px 16px}
.field input:focus-visible{outline:0;border-color:var(--ring)}
.err{color:#b3261e;font-size:14px;margin:4px 0 0}
.ok{color:var(--ok);font-size:14px;margin:8px 0 0;word-break:break-all}
fieldset{border:0;padding:14px 0 0;margin:0;min-width:0;max-width:100%}   /* iOS: fieldset defaults to min-width:min-content and pushes the page wider than the phone */
legend{font-weight:800;font-size:14px;padding:0}
.sub{display:block;font-weight:700;font-size:13px;color:var(--muted);margin-top:10px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:520px){ .two{grid-template-columns:1fr} }
.swatches{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.sw{width:38px;height:38px;border-radius:50%;border:3px solid #fff;cursor:pointer;padding:0;box-shadow:0 0 0 1px var(--line);position:relative}
.sw[aria-pressed="true"]{box-shadow:0 0 0 3px var(--ring)}
.sw[aria-pressed="true"]::after{content:"✓";position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-weight:900;text-shadow:0 1px 2px rgba(0,0,0,.6)}
.sw:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.chip{border:2px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;cursor:pointer;font-size:14px;font-weight:700}
.chip[aria-pressed="true"]{background:var(--ink);color:#fff;border-color:var(--ink)}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:8px;margin-top:10px}
.thumbs.small{grid-template-columns:repeat(auto-fill,minmax(76px,1fr))}
.thumb{border:2px solid var(--line);background:linear-gradient(#f3f6fc,#e9eefb);border-radius:14px;padding:4px 4px 6px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:2px}
.thumb img{width:100%;aspect-ratio:1/1;height:auto;border-radius:10px;background:transparent}
.thumb span{font-size:12px;font-weight:700;color:var(--muted);line-height:1.1;text-align:center}
.thumb[aria-pressed="true"]{border-color:var(--ring);box-shadow:0 0 0 2px var(--ring)}
.thumb[aria-pressed="true"] span{color:var(--ink)}
.presets{display:flex;gap:8px;margin-top:10px;overflow-x:auto;padding:2px 2px 6px;-webkit-overflow-scrolling:touch}
.preset{flex:0 0 auto;border:2px solid var(--line);background:linear-gradient(#f3f6fc,#e9eefb);border-radius:14px;padding:4px;cursor:pointer}
.preset img,.preset canvas{display:block;width:76px;height:92px;object-fit:cover;object-position:50% 0;border-radius:10px}
.thumb canvas{display:block;width:100%;aspect-ratio:1/1;height:auto;border-radius:10px}
.preset[aria-pressed="true"]{border-color:var(--ring);box-shadow:0 0 0 2px var(--ring)}
.ghost{border:2px solid var(--line);background:#fff;border-radius:999px;padding:10px 16px;font-weight:800;cursor:pointer;margin-top:10px;text-decoration:none;display:inline-block}
.ghost:hover{border-color:#c9d1e2}
.ghost.wa{border-color:#25d366;color:#128c4a}
.cta{background:var(--accent);color:var(--accent-ink);border:0;border-radius:14px;padding:14px 22px;font-size:18px;font-weight:700;cursor:pointer;box-shadow:0 8px 18px rgba(255,90,54,.3)}
.cta:hover{filter:brightness(1.05)}
.cta[disabled]{opacity:.5;cursor:default;box-shadow:none}
.cta.big{font-size:20px;padding:16px 26px}
.navrow{display:flex;justify-content:space-between;gap:10px;margin-top:22px;padding-top:16px;border-top:1px solid var(--line)}
.navrow .ghost{margin-top:0}
.products{display:grid;gap:8px}
.product{display:flex;align-items:center;gap:12px;border:2px solid var(--line);border-radius:14px;padding:10px 12px;cursor:pointer}
.product input{accent-color:var(--accent);width:18px;height:18px}
.product span{flex:1;display:flex;flex-direction:column}
.product small{color:var(--muted)}
.product em{font-style:normal;font-weight:800;font-size:18px}
.product.best{border-color:var(--sun);background:#fffaea}
.product:has(input:checked){border-color:var(--ring);box-shadow:0 0 0 2px var(--ring)}
#checkout{width:100%;margin-top:12px}
.privacy{color:var(--muted);font-size:13px;margin:12px 0 0}

/* ---------- sample */
.sample{margin:4px 0 6px}
.sample-shell{position:relative;aspect-ratio:16/9;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,#1e2a5a,#3a6cf4);display:grid;place-items:center;color:#fff}
.sample-shell video{width:100%;height:100%;display:block;background:#000}
.sample-idle{text-align:center;padding:16px}
.sample-idle .fine{color:rgba(255,255,255,.8);font-size:13px;margin:10px 0 0}
.sample-wait{text-align:center;padding:16px}
.sample-wait p{margin:12px 0 0;font-weight:700}
.loader{display:flex;gap:8px;justify-content:center}
.loader span{width:12px;height:12px;border-radius:50%;background:var(--sun);animation:bounce .9s infinite ease-in-out}
.loader span:nth-child(2){animation-delay:.15s}.loader span:nth-child(3){animation-delay:.3s}
@keyframes bounce{0%,80%,100%{transform:translateY(0)}40%{transform:translateY(-10px)}}
.share{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.share .ghost{margin-top:0}

/* ---------- watch grid */
.watch{background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:56px 0}
.section-head{max-width:64ch;margin-bottom:22px}
.section-head h2{font-size:clamp(22px,3vw,30px);margin:0 0 8px}
.section-head .sub{display:block;margin:0;color:var(--muted);font-weight:500;font-size:16px}
.eyebrow{display:inline-block;font-weight:800;letter-spacing:.08em;text-transform:uppercase;font-size:12px;color:var(--accent-dk);margin-bottom:6px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:14px}
.tile{position:relative;display:block;border-radius:16px;overflow:hidden;background:var(--bg);text-decoration:none;box-shadow:var(--shadow);border:1px solid var(--line);transition:transform .15s ease}
.tile:hover{transform:translateY(-3px)}
.tile .thumb{aspect-ratio:16/9;width:100%;object-fit:cover;display:block;background:var(--sky);border:0;border-radius:0;padding:0}
.tile-letter{position:absolute;top:8px;left:8px;width:36px;height:36px;border-radius:10px;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:20px;font-weight:700;box-shadow:0 3px 0 var(--accent-dk)}
.tile-body{display:block;padding:10px 12px 12px}
.tile-body b{display:block;font-size:14px;line-height:1.25}
.tile.soon{box-shadow:none;background:repeating-linear-gradient(135deg,#fff,#fff 10px,#fbf3e6 10px,#fbf3e6 20px)}
.tile.soon .thumb{display:grid;place-items:center;background:transparent}
.tile.soon .thumb span{font-family:"Fredoka",sans-serif;font-size:44px;color:#d9cbb6;font-weight:700}
.tile.soon .tile-letter{background:#c9bda9;box-shadow:0 3px 0 #b3a58f}
.tile.soon .tile-body b{color:var(--muted);font-weight:700}
.play{position:absolute;right:8px;top:8px;width:30px;height:30px;border-radius:50%;background:rgba(255,255,255,.92);display:grid;place-items:center}
.play svg{width:14px;height:14px;margin-left:2px}
.center{text-align:center;margin:22px 0 0}

/* ---------- how */
.how{padding:56px 0}
.steps3{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.step3{background:#fff;border-radius:var(--radius);padding:18px 18px 16px;border:1px solid var(--line)}
.step3 .ico{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;margin-bottom:10px;font-size:20px;font-weight:700;background:var(--sun);color:var(--ink)}
.step3 b{display:block;font-size:17px;margin-bottom:4px}
.step3 p{margin:0;color:var(--muted);font-size:15px}

/* ---------- footer */
footer{padding:28px 0 40px;border-top:1px solid var(--line);color:var(--muted);font-size:14px}
footer .wrap{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px}
footer a{text-decoration:none;font-weight:700;color:var(--ink)}

/* ---------- toast + confetti */
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:var(--ink);color:#fff;padding:10px 16px;border-radius:999px;font-weight:700;z-index:50;box-shadow:var(--shadow)}
#confetti{position:fixed;inset:0;pointer-events:none;z-index:40}
@media (prefers-reduced-motion:reduce){ html{scroll-behavior:auto} .tile:hover{transform:none} .loader span{animation:none} }

/* ---------- feedback (friends and family round) */
.feedback{margin-top:14px;padding:14px;border:2px dashed var(--line);border-radius:16px}
.feedback b{display:block;margin-bottom:8px}
.stars{display:flex;gap:4px;margin-bottom:8px}
.stars button{border:0;background:transparent;font-size:28px;line-height:1;color:#d9cbb6;cursor:pointer;padding:0 2px}
.stars button[aria-checked="true"],.stars button.lit{color:var(--sun)}
.feedback textarea{width:100%;border:2px solid var(--line);border-radius:12px;padding:10px 12px;font:inherit;font-size:15px;resize:vertical}
.feedback .row{display:flex;align-items:center;gap:12px;margin-top:8px}
.feedback .row .ghost{margin-top:0}

/* ---------- queue mode (static site: the hero is drawn live by rig.js on the #rig canvas) */
.team.static{max-height:66%;width:auto;max-width:92%;left:50%;right:auto;transform:translateX(-50%);bottom:52px}
.stage-card.queue .hero-wrap{height:520px;pointer-events:none}
.stage-card.queue .hero,.stage-card.queue .team{display:none}
@media (max-width:900px){ .stage-card.queue .hero-wrap{height:300px} }
