/* =====================================================================
   CENTERA v3 — CALL DEMO ("let it call you") · REVIEW SAMPLE 2026-10-06
   One <section class="cd">, right under the hero scene. A CSS-3D phone rises
   out of the dusk light as you scroll, turns to face you and holds the form.
   No library, no images: the phone is ~20 divs under one perspective camera.

   MODES (set on .cd by call-demo.js)
     .cd--scroll  desktop / landscape tablet: a tall track with a sticky stage;
                  call-demo.js maps scroll progress to the phone's pose vars.
     .cd--flow    phones, short screens: no track; the phone rises once when the
                  section comes into view, then lies flat for typing.
     .cd--still   prefers-reduced-motion or no JS: the final pose, no motion.
   STATES (data-cd-mode on .cd)
     preview  what ships first: a scripted example call; the number field is
              shown switched off (nothing is collected, nothing is dialed).
     sim      review only (?cd=sim): the real-mode screens driven by a local
              script. Labelled "Simulated". Nothing is dialed.
     live     the real engine (/api/call-demo). Off until Haris says GO.
   ===================================================================== */

.cd {
  --cd-violet: #785CFF;
  --cd-violet-soft: #A78BFA;
  --cd-rose: #FF5FA2;
  --cd-rose-soft: #FF9CC7;
  --cd-amber: #FFB65C;
  --cd-amber-soft: #FFD49A;
  --cd-teal: #2DD4BF;
  --cd-teal-soft: #8BF0E1;
  --cd-sky: #5CC8FF;

  /* phone geometry: height follows the screen, width follows height */
  --ph: clamp(520px, calc(100svh - var(--nav-h, 64px) - 120px), 640px);
  --pw: calc(var(--ph) * 0.49);
  --pr: calc(var(--pw) * 0.16);
  --pt: 12px;                    /* thickness */

  /* pose (call-demo.js writes these; defaults = the final pose) */
  --ty: 0px; --rx: 0deg; --ry: -10deg; --rz: 0deg; --s: 1;
  --px: 0deg; --py: 0deg;        /* pointer parallax */
  --glow: 1; --on: 1; --chips: 1; --gl: 0.5;

  position: relative;
  isolation: isolate;
  background: var(--void, #0D0D12);
  color: var(--bone, #F5F5F7);
  overflow: clip;
}
.cd *, .cd *::before, .cd *::after { box-sizing: border-box; }

/* ---------- stage frame ---------- */
.cd-track { position: relative; }
.cd--scroll .cd-track { height: 250vh; }
.cd-sticky { position: relative; min-height: 100svh; display: grid; align-items: center; padding-block: clamp(48px, 7vw, 96px); }
.cd--scroll .cd-sticky { position: sticky; top: var(--nav-h, 64px); height: calc(100svh - var(--nav-h, 64px)); min-height: 600px; padding-block: 24px; }

/* the dusk light: four soft blooms + a floor glow (radial gradients: no blur filter, cheap to paint once) */
.cd-light { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cd-light::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--void, #0D0D12) 0%, rgba(13,13,18,0) 18%, rgba(13,13,18,0) 82%, var(--void, #0D0D12) 100%); z-index: 2; }
.cd-light i { position: absolute; border-radius: 50%; will-change: transform, opacity; transition: opacity .6s ease; }
.cd-l1 { width: 72vmax; height: 72vmax; left: 40%; top: 0%; background: radial-gradient(closest-side, rgba(120,92,255,.7), rgba(120,92,255,0)); opacity: calc(.25 + var(--glow) * .75); transform: translate3d(-50%, calc((1 - var(--glow)) * 12vh), 0); }
.cd-l2 { width: 50vmax; height: 50vmax; left: 72%; top: 30%; background: radial-gradient(closest-side, rgba(255,95,162,.66), rgba(255,95,162,0)); opacity: calc(var(--glow) * .95); transform: translate3d(-50%, calc((1 - var(--glow)) * 18vh), 0); }
.cd-l3 { width: 44vmax; height: 44vmax; left: 22%; top: 50%; background: radial-gradient(closest-side, rgba(255,182,92,.52), rgba(255,182,92,0)); opacity: calc(var(--glow) * .9); transform: translate3d(-50%, calc((1 - var(--glow)) * 22vh), 0); }
.cd-l4 { width: 38vmax; height: 38vmax; left: 90%; top: 4%; background: radial-gradient(closest-side, rgba(45,212,191,.46), rgba(45,212,191,0)); opacity: calc(var(--glow) * .85); transform: translate3d(-50%, 0, 0); }
.cd[data-cd-state="done"] .cd-l4 { opacity: 1; }

/* ---------- layout: copy + stage ---------- */
.cd-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) {
  .cd-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}
.cd-copy { display: flex; flex-direction: column; gap: var(--space-4, 16px); max-width: 560px; }
.cd-copy .kicker { color: var(--cd-rose-soft); }
.cd-copy .kicker::before { background: linear-gradient(90deg, var(--cd-violet), var(--cd-rose), var(--cd-amber)); width: 28px; }
.cd-h { font-size: var(--h2, 2.5rem); line-height: 1.06; letter-spacing: -0.025em; font-weight: 800; }
.cd-h em { font-style: normal; background: linear-gradient(100deg, var(--cd-violet-soft) 0%, var(--cd-rose-soft) 45%, var(--cd-amber-soft) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-sub { margin: 0; }

/* mode-specific copy: both variants live in the markup (bilingual via data-es); CSS shows one */
.cd [data-cd-when] { display: none; }
.cd[data-cd-mode="preview"] [data-cd-when~="preview"],
.cd[data-cd-mode="sim"] [data-cd-when~="sim"],
.cd[data-cd-mode="live"] [data-cd-when~="live"] { display: revert; }
.cd[data-cd-mode="preview"] span[data-cd-when~="preview"],
.cd[data-cd-mode="sim"] span[data-cd-when~="sim"],
.cd[data-cd-mode="live"] span[data-cd-when~="live"] { display: inline; }

.cd-steps { display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; counter-reset: cd; }
.cd-steps li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; color: var(--bone-2, #B4B4B7); font-size: var(--step-0, 1.0625rem); line-height: 1.45; }
.cd-steps li::before { counter-increment: cd; content: counter(cd); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; font-weight: 800; font-size: 15px; color: #0D0D12; }
.cd-steps li:nth-child(1)::before { background: var(--cd-violet-soft); }
.cd-steps li:nth-child(2)::before { background: var(--cd-rose-soft); }
.cd-steps li:nth-child(3)::before { background: var(--cd-amber-soft); }
.cd-fine { margin: 0; font-size: var(--step--1, .95rem); color: var(--muted, #A1A1A8); max-width: 52ch; }
.cd-price { margin: 0; font-weight: 700; color: var(--bone, #F5F5F7); }
.cd-price a { color: var(--cd-violet-soft); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- the 3D stage ---------- */
.cd-stage { position: relative; display: grid; place-items: center; min-height: calc(var(--ph) + 40px); perspective: 1500px; perspective-origin: 50% 35%; }
.cd-rig {
  position: relative;
  transform-style: preserve-3d;
  transform: translate3d(0, var(--ty), 0) rotateX(calc(var(--rx) + var(--py))) rotateY(calc(var(--ry) + var(--px))) rotateZ(var(--rz)) scale(var(--s));
  will-change: transform;
}
.cd--flow .cd-rig, .cd-rig.is-easing { transition: transform 1.2s cubic-bezier(.16, 1, .3, 1); }
.cd-rig.is-flat { transform: none; transform-style: flat; will-change: auto; }

/* floor: coloured spill + contact shadow under the phone */
.cd-floor { position: absolute; left: 50%; bottom: -6px; width: calc(var(--pw) * 1.9); height: 90px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(0,0,0,.65), rgba(0,0,0,0) 70%), radial-gradient(60% 60% at 40% 50%, rgba(120,92,255,.35), rgba(120,92,255,0) 70%), radial-gradient(50% 60% at 65% 50%, rgba(255,95,162,.25), rgba(255,95,162,0) 70%);
  opacity: calc(.3 + var(--on) * .7); }

.cd-phone { position: relative; width: var(--pw); height: var(--ph); transform-style: preserve-3d; }
.cd-rig.is-flat .cd-phone { transform-style: flat; }
/* the side band: stacked rounded slabs read as a solid anodized edge when the phone turns */
.cd-edge { position: absolute; inset: 0; border-radius: var(--pr); transform: translateZ(calc(var(--i) * var(--pt) / -10));
  background: linear-gradient(90deg, #2B2546 0%, #8C78E8 12%, #FF8CC0 34%, #3A2E66 52%, #FFC27A 74%, #9C86FF 90%, #2B2546 100%); }
.cd-edge:nth-child(odd) { filter: brightness(.86); }
.cd-back { position: absolute; inset: 0; border-radius: var(--pr); transform: translateZ(calc(var(--pt) * -1 - 1px)) rotateY(180deg); backface-visibility: hidden; overflow: hidden;
  background: radial-gradient(120% 80% at 20% 10%, #8B6CFF 0%, rgba(139,108,255,0) 55%), radial-gradient(90% 70% at 90% 90%, #FF6FAE 0%, rgba(255,111,174,0) 60%), radial-gradient(70% 50% at 70% 40%, #FFB65C 0%, rgba(255,182,92,0) 60%), #2A1F57;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); }
.cd-back::before { /* camera plateau */ content: ""; position: absolute; left: 9%; top: 4.5%; width: 38%; aspect-ratio: 1; border-radius: 28%; background: rgba(13,13,18,.35); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.cd-back::after { content: ""; position: absolute; left: 15%; top: 8%; width: 13%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #3b3f5c, #07070b 60%); box-shadow: 0 calc(var(--pw) * .13) 0 0 #07070b, inset 0 0 0 2px rgba(255,255,255,.25); }
.cd-mark { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); font-weight: 800; font-size: calc(var(--pw) * .13); letter-spacing: .06em; color: rgba(255,255,255,.92); }
.cd-mark em { font-style: normal; color: var(--cd-amber-soft); }

.cd-front { position: absolute; inset: 0; border-radius: var(--pr); padding: calc(var(--pw) * .035); background: #07070B; transform: translateZ(1px);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.16), inset 0 0 0 5px #1B1830, 0 50px 90px -30px rgba(0,0,0,.85), -30px -20px 120px -30px rgba(120,92,255, calc(var(--on) * .7)), 40px 40px 130px -40px rgba(255,95,162, calc(var(--on) * .55)), 0 70px 120px -60px rgba(255,182,92, calc(var(--on) * .45)); }
.cd-rig.is-flat .cd-front { transform: none; }
.cd-glare { position: absolute; inset: 0; border-radius: var(--pr); pointer-events: none; transform: translateZ(2px);
  background: linear-gradient(115deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.13) 44%, rgba(255,255,255,0) 58%) no-repeat;
  background-size: 260% 100%; background-position: calc(var(--gl) * 100%) 0; mix-blend-mode: screen; }
.cd-rig.is-flat .cd-glare { transform: none; opacity: .35; }

/* the screen */
.cd-screen { position: relative; height: 100%; border-radius: calc(var(--pr) - var(--pw) * .035); overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(140% 60% at 50% -10%, rgba(120,92,255,.35), rgba(120,92,255,0) 60%), radial-gradient(90% 40% at 100% 100%, rgba(255,95,162,.16), rgba(255,95,162,0) 70%), #0E0D16; }
.cd-screen::after { /* power-on veil */ content: ""; position: absolute; inset: 0; background: #050508; opacity: calc(1 - var(--on)); pointer-events: none; transition: opacity .4s ease; z-index: 5; }
.cd-island { position: absolute; left: 50%; top: 10px; z-index: 4; height: 28px; min-width: 92px; padding: 0 12px; border-radius: 99px; transform: translateX(-50%); background: #000; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--bone, #F5F5F7); transition: min-width .4s cubic-bezier(.16,1,.3,1); }
.cd-island-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cd-teal); box-shadow: 0 0 10px var(--cd-teal); display: none; }
.cd-island-t { display: none; font-variant-numeric: tabular-nums; }
.cd[data-cd-state="live"] .cd-island, .cd[data-cd-state="ringing"] .cd-island { min-width: 150px; }
.cd[data-cd-state="live"] .cd-island-dot, .cd[data-cd-state="live"] .cd-island-t { display: inline-block; }
.cd[data-cd-state="ringing"] .cd-island-dot { display: inline-block; background: var(--cd-amber); box-shadow: 0 0 10px var(--cd-amber); animation: cd-blink 1s steps(2) infinite; }

.cd-appbar { display: flex; align-items: center; gap: 8px; padding: 48px 16px 10px; }
.cd[data-cd-state="live"] .cd-appbar { display: none; }
.cd[data-cd-state="live"] .cd-view[data-view="live"] { padding-top: 48px; }
.cd-appbar b { font-size: 15px; font-weight: 700; white-space: nowrap; }
.cd-appbar .cd-tag { white-space: nowrap; }
.cd-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.cd-tag--ai { background: rgba(120,92,255,.22); color: var(--cd-violet-soft); }
.cd-tag--example { color: var(--warn, #FBBF24); border: 1px dashed rgba(251,191,36,.7); align-self: center; }
.cd-tag--sim { margin-left: auto; color: var(--cd-amber-soft); border: 1px dashed rgba(255,212,154,.7); }
.cd-tag--soon { color: var(--cd-teal-soft); background: rgba(45,212,191,.12); }

.cd-views { position: relative; flex: 1; min-height: 0; }
.cd-view { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; padding: 4px 16px 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.cd-view[hidden] { display: none !important; }
.cd-view:focus { outline: none; }
.cd-view-title { font-size: 19px; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
.cd-view p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--bone-2, #B4B4B7); }
.cd-meta { font-size: 13px !important; color: var(--muted, #A1A1A8) !important; }

/* the orb: the AI's face. A rotating conic core inside a soft sphere; talks = breathes */
.cd-orb { position: relative; width: 112px; aspect-ratio: 1; margin: 6px auto 2px; border-radius: 50%; flex: none; }
.cd-orb--sm { width: 34px; margin: 0; }
.cd-orb--lg { width: 150px; }
.cd-orb-core { position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  background: conic-gradient(from 0deg, #785CFF, #FF5FA2, #FFB65C, #2DD4BF, #5CC8FF, #785CFF); animation: cd-spin 9s linear infinite; animation-play-state: var(--cd-play, paused); }
.cd-orb-core::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(255,255,255,.25) 35%, rgba(255,255,255,0) 70%); filter: blur(6px); }
.cd-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 -10px 24px rgba(13,13,18,.55), inset 0 6px 16px rgba(255,255,255,.35), 0 0 40px rgba(120,92,255,.45); }
.cd-orb--sm::after { box-shadow: inset 0 -3px 8px rgba(13,13,18,.55), 0 0 12px rgba(120,92,255,.5); }
.cd-orb.is-talking { animation: cd-breathe .9s ease-in-out infinite alternate; }
.cd-rings { position: absolute; inset: -18px; pointer-events: none; }
.cd-rings i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(167,139,250,.55); opacity: 0; }
.cd[data-cd-state="ringing"] .cd-rings i { animation: cd-ring 1.8s cubic-bezier(.2,.8,.2,1) infinite; animation-play-state: var(--cd-play, paused); }
.cd-rings i:nth-child(2) { animation-delay: .6s !important; border-color: rgba(255,156,199,.5); }
.cd-rings i:nth-child(3) { animation-delay: 1.2s !important; border-color: rgba(255,212,154,.45); }

/* buttons inside the phone (site .btn, phone-sized) */
.cd-view .btn { --btn-h: 48px; width: 100%; font-size: 16px; border-radius: 12px; white-space: normal; text-align: center; }
.cd-play { gap: 10px; }
.cd-play svg { width: 16px; height: 16px; }
.cd-btn-glow { background: linear-gradient(100deg, #6A4DF5 0%, #8E4FE0 50%, #C2459A 100%); color: #fff; box-shadow: 0 14px 34px -14px rgba(255,95,162,.6), 0 10px 30px -14px rgba(120,92,255,.8); }
.cd-btn-glow:hover { filter: brightness(1.08); }

.cd-sep { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #A1A1A8); margin-top: 4px; }
.cd-sep::before, .cd-sep::after { content: ""; flex: 1; height: 1px; background: var(--line, rgba(245,245,247,.12)); }

/* form */
.cd-form { display: flex; flex-direction: column; gap: 10px; }
.cd-field { display: flex; flex-direction: column; gap: 4px; }
.cd-field label, .cd-field .cd-label { font-size: 13px; font-weight: 700; color: var(--bone, #F5F5F7); }
.cd-tel { display: flex; align-items: stretch; height: 46px; border-radius: 12px; background: var(--surface-2, #1C1B27); border: 1px solid var(--line-strong, #6B6A7B); overflow: hidden; }
.cd-tel:focus-within { border-color: var(--cd-violet-soft); box-shadow: 0 0 0 3px rgba(120,92,255,.28); }
.cd-cc { display: flex; align-items: center; gap: 6px; padding: 0 10px; font-weight: 700; font-size: 15px; color: var(--bone-2, #B4B4B7); border-right: 1px solid var(--line-2, rgba(245,245,247,.2)); background: rgba(255,255,255,.03); }
.cd-cc svg { width: 18px; height: 12px; border-radius: 2px; }
.cd-input { flex: 1; min-width: 0; height: 100%; padding: 0 12px; border: 0; background: transparent; font-size: 16px; color: var(--bone, #F5F5F7); }
.cd-input:focus { outline: none; }
.cd-input::placeholder { color: #8A8A93; }
.cd-text { flex: none; height: 46px; border-radius: 12px; background: var(--surface-2, #1C1B27); border: 1px solid var(--line-strong, #6B6A7B); }
.cd-text:focus { border-color: var(--cd-violet-soft); box-shadow: 0 0 0 3px rgba(120,92,255,.28); }
.cd-hint { font-size: 12px; color: var(--muted, #A1A1A8); }
.cd-err { display: none; font-size: 12.5px; font-weight: 600; color: var(--err, #F87171); }
.cd-field.is-bad .cd-err { display: block; }
.cd-field.is-bad .cd-tel, .cd-field.is-bad .cd-text { border-color: var(--err, #F87171); }
.cd-consent { font-weight: 400 !important; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.035); border: 1px solid var(--line, rgba(245,245,247,.12)); cursor: pointer; }
.cd-consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: #6A4DF5; }
.cd-consent span { font-weight: 400; font-size: 12px; line-height: 1.45; color: var(--bone-2, #B4B4B7); }
.cd-field.is-bad .cd-consent { border-color: var(--err, #F87171); }
.cd-turnstile { min-height: 65px; border-radius: 10px; display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted, #A1A1A8); border: 1px dashed var(--line-2, rgba(245,245,247,.2)); padding: 8px; }
.cd-turnstile.has-widget { border: 0; padding: 0; }
.cd-turnstile:not(.has-widget) { min-height: 0; padding: 6px 8px; }
.cd-off { opacity: .55; }
.cd-off .cd-tel { background: rgba(255,255,255,.03); border-style: dashed; }
.cd-off .cd-input { cursor: not-allowed; }

/* ringing */
.cd-ringwrap { position: relative; width: 150px; margin: 18px auto 6px; }
.cd-num { font-size: 22px !important; font-weight: 800; color: var(--bone, #F5F5F7) !important; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.cd-center { text-align: center; }

/* live call */
.cd-livehead { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line, rgba(245,245,247,.12)); }
.cd-livehead > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.cd-livehead b { font-size: 15px; line-height: 1.2; white-space: nowrap; }
.cd-livehead small { font-size: 12px; color: var(--muted, #A1A1A8); }
.cd-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(45,212,191,.14); color: var(--cd-teal-soft); }
.cd-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cd[data-cd-mode="preview"] .cd-pill { background: rgba(251,191,36,.12); color: var(--warn, #FBBF24); }
.cd-cap { height: 4px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.cd-cap i { display: block; height: 100%; width: calc(var(--cap, 0) * 100%); background: linear-gradient(90deg, var(--cd-violet), var(--cd-rose), var(--cd-amber)); transition: width .9s linear; }
.cd-caprow { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted, #A1A1A8); font-variant-numeric: tabular-nums; margin-top: -6px; }
.cd-log { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; margin: 0; list-style: none; scroll-behavior: smooth; }
.cd-line { display: flex; flex-direction: column; gap: 3px; max-width: 88%; align-self: flex-end; align-items: flex-end; animation: cd-in .35s cubic-bezier(.16,1,.3,1) both; }
.cd-line.is-ai { align-self: flex-start; align-items: flex-start; }
.cd-who { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #A1A1A8); }
.cd-line.is-ai .cd-who { color: var(--cd-violet-soft); }
.cd-bub { padding: 9px 12px; border-radius: 16px; font-size: 14px; line-height: 1.42; }
.cd-line.is-ai .cd-bub { background: #22202F; color: var(--bone, #F5F5F7); border-bottom-left-radius: 6px; box-shadow: inset 0 0 0 1px rgba(167,139,250,.22); }
.cd-line:not(.is-ai) .cd-bub { background: linear-gradient(120deg, #6A4DF5, #8E4FE0); color: #fff; border-bottom-right-radius: 6px; }
.cd-typing { display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; border-bottom-left-radius: 6px; background: #22202F; align-self: flex-start; }
.cd-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--cd-violet-soft); animation: cd-dot 1s ease-in-out infinite; }
.cd-typing i:nth-child(2) { animation-delay: .15s; background: var(--cd-rose-soft); }
.cd-typing i:nth-child(3) { animation-delay: .3s; background: var(--cd-amber-soft); }
.cd-livefoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line, rgba(245,245,247,.12)); }
.cd-livefoot p { font-size: 12px !important; }
.cd-livefoot .btn { width: auto; --btn-h: 40px; padding: 0 14px; font-size: 14px; flex: none; }
.cd-end { background: rgba(248,113,113,.16); color: #FFC9C9; border: 1px solid rgba(248,113,113,.45); }
.cd-end:hover { background: rgba(248,113,113,.26); }

/* outcome */
.cd-done-ic { width: 64px; height: 64px; margin: 14px auto 4px; border-radius: 20px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(45,212,191,.28), rgba(92,200,255,.18)); box-shadow: 0 0 40px rgba(45,212,191,.35), inset 0 0 0 1px rgba(139,240,225,.5); color: var(--cd-teal-soft); }
.cd-done-ic svg { width: 30px; height: 30px; }
.cd-outcome { border-radius: 16px; padding: 14px; background: linear-gradient(160deg, rgba(45,212,191,.14), rgba(120,92,255,.12)); border: 1px solid rgba(139,240,225,.35); }
.cd-outcome-k { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cd-teal-soft); }
.cd-outcome-v { font-size: 20px; font-weight: 800; line-height: 1.2; margin-top: 2px; }
.cd-outcome ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.cd-outcome li { display: flex; gap: 8px; font-size: 13.5px; color: var(--bone-2, #B4B4B7); }
.cd-outcome li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--cd-teal); }
.cd-row { display: grid; gap: 8px; }

/* chips floating in the 3D space around the phone */
.cd-chip { position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--bone, #F5F5F7);
  background: rgba(22,21,31,.78); border: 1px solid var(--c, rgba(167,139,250,.5)); box-shadow: 0 18px 40px -18px rgba(0,0,0,.8), 0 0 30px -10px var(--c);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .45s ease;
  opacity: clamp(0, calc((var(--chips) - var(--d)) * 4), 1);
  transform: translateZ(var(--z)) translateY(calc((1 - clamp(0, calc((var(--chips) - var(--d)) * 4), 1)) * 24px)); pointer-events: none; }
.cd-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.cd-chip--1 { --c: rgba(167,139,250,.75); --z: 90px; --d: 0; left: calc(var(--pw) * -0.74); top: 12%; }
.cd-chip--2 { --c: rgba(255,156,199,.75); --z: 130px; --d: .08; right: calc(var(--pw) * -0.72); top: 30%; }
.cd-chip--3 { --c: rgba(255,212,154,.75); --z: 70px; --d: .16; left: calc(var(--pw) * -0.72); top: 62%; }
.cd-chip--4 { --c: rgba(139,240,225,.75); --z: 110px; --d: .24; right: calc(var(--pw) * -0.78); top: 76%; }
/* 2026-10-07: chip 4 says "A person checks every call within 12 hours" (CEO §2); two lines keep it off the phone screen */
.cd-chip--4 > span { white-space: normal; max-width: 13.5em; line-height: 1.3; }
.cd-rig.is-flat .cd-chip { transform: none; }
@media (max-width: 1099px) { .cd-chip { display: none; } }

/* ---------- phones: flow mode ---------- */
@media (max-width: 899px) {
  /* flow mode is not sticky, so the phone may be a little taller than the screen: size it for the thumb, not the fold */
  .cd { --pw: min(320px, calc(100vw - 48px)); --ph: calc(var(--pw) * 2); }
  .cd-sticky { padding-block: 56px 72px; }
  .cd-copy { max-width: none; }
  .cd-stage { min-height: calc(var(--ph) + 24px); }
}
@media (max-width: 380px) { .cd { --pw: calc(100vw - 32px); --ph: calc(var(--pw) * 1.9); } }

/* ---------- reduced motion: final frame, no loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .cd { --ty: 0px !important; --rx: 0deg !important; --ry: 0deg !important; --rz: 0deg !important; --s: 1 !important; --px: 0deg !important; --py: 0deg !important; --glow: 1 !important; --on: 1 !important; --chips: 1 !important; }
  .cd-rig { transition: none !important; }
  .cd-orb-core, .cd-orb.is-talking, .cd-rings i, .cd-typing i, .cd-line, .cd-island-dot { animation: none !important; }
  .cd-cap i, .cd-island, .cd-light i { transition: none !important; }
}

/* ---------- review bar (sample page only; never part of the section) ---------- */
.cd-review { position: fixed; z-index: 60; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: calc(100vw - 24px); padding: 8px 10px; border-radius: 14px; background: rgba(13,13,18,.92); border: 1px dashed rgba(251,191,36,.7); color: var(--bone, #F5F5F7); font-size: 13px; box-shadow: var(--shadow-3, 0 24px 60px -20px rgba(0,0,0,.8)); }
.cd-review b { color: var(--warn, #FBBF24); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.cd-review button { min-height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2, rgba(245,245,247,.2)); background: transparent; font-size: 13px; font-weight: 700; }
@media (max-width: 599px) { .cd-review { left: 8px; right: auto; bottom: 8px; padding: 6px 8px; gap: 6px; font-size: 12px; } .cd-review button { min-height: 32px; padding: 0 10px; font-size: 12px; } }
.cd-review button[aria-pressed="true"] { background: rgba(120,92,255,.25); border-color: var(--cd-violet-soft, #A78BFA); }

@keyframes cd-spin { to { transform: rotate(1turn); } }
@keyframes cd-breathe { from { transform: scale(.96); } to { transform: scale(1.05); } }
@keyframes cd-ring { 0% { transform: scale(.7); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes cd-dot { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-3px); opacity: 1; } }
@keyframes cd-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes cd-blink { 50% { opacity: .2; } }
