/* ============================================================
   Tundo — grunt-style landing (warm / cream / copper)
   Compiled Tailwind (tailwind.css) handles utility styling; this
   file covers the marquee, cards, chat bubbles, phone wave, focus + RTL.
   ============================================================ */

html { scroll-behavior: smooth; overflow-x: clip; }
body { -webkit-font-smoothing: antialiased; overflow-x: clip; }
* { min-width: 0; }

/* ---- Arabic / RTL ---- */
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", Inter, sans-serif; }
html[dir="rtl"] .logo-track { animation-direction: reverse; }

/* ---- Chat bubbles ---- */
.bubble {
  border-radius: 16px;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 100%;
}
.bubble-cust {
  background: #fff3ea;            /* soft copper tint */
  border: 1px solid #f9d9c4;
  color: #7a3d1c;
}
.bubble-agent {
  background: #eef4ff;            /* soft blue tint */
  border: 1px solid #d8e4fb;
  color: #1e3a66;
}

/* ---- Logo / industry marquee ---- */
.logo-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.logo-track {
  display: flex; gap: 3.5rem; width: max-content;
  align-items: center;
  animation: scroll-x 32s linear infinite;
}
.logo-pill {
  color: rgba(15, 20, 34, 0.32);
  font-weight: 800; font-size: 1.35rem;
  letter-spacing: -0.01em; white-space: nowrap;
}
@keyframes scroll-x { to { transform: translateX(-50%); } }

/* ---- Feature cards ---- */
.feature-card {
  border-radius: 20px; padding: 1.6rem;
  background: #fff;
  border: 1px solid rgba(15, 20, 34, 0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15,20,34,0.08); }
.feature-icon {
  display: inline-flex; width: 44px; height: 44px;
  align-items: center; justify-content: center;
  margin-bottom: 1rem;
  background: rgba(244, 123, 63, 0.1); color: #f47b3f; border-radius: 13px;
}
.feature-icon svg { width: 22px; height: 22px; }

/* ---- FAQ accordion ---- */
.faq summary::-webkit-details-marker { display: none; }
.faq[open] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .2s ease; }

/* ---- Phone "listening" wave ---- */
.wave {
  width: 3px; height: 8px; border-radius: 3px;
  background: #f47b3f;
  animation: wave 1s ease-in-out infinite;
}
.wave:nth-child(2){ animation-delay:.1s } .wave:nth-child(3){ animation-delay:.2s }
.wave:nth-child(4){ animation-delay:.3s } .wave:nth-child(5){ animation-delay:.4s }
.wave:nth-child(6){ animation-delay:.5s } .wave:nth-child(7){ animation-delay:.6s }
@keyframes wave { 0%,100%{ height:8px; opacity:.5 } 50%{ height:26px; opacity:1 } }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- Focus ---- */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid #f47b3f; outline-offset: 3px; border-radius: 8px;
}

/* ---- Hero call loop (floating, not a panel) ---- */
.livedot { width: 7px; height: 7px; border-radius: 999px; background: #10b981; display: inline-block; animation: livedot 1.4s ease-in-out infinite; }
@keyframes livedot { 0%,100%{ opacity: 1 } 50%{ opacity: .35 } }
.steplabel { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 700; color: rgba(15,20,34,.5); }
.steplabel .ic { width: 14px; height: 14px; opacity: .7; }
.connector { display: flex; align-items: center; justify-content: center; gap: .4rem; font-size: .72rem; font-weight: 600; color: #c2682f; }
.connector .ic { width: 15px; height: 15px; }
.callfeed {
  height: 250px; overflow: hidden;
  display: flex; flex-direction: column; gap: 1rem;
  /* reserve bottom space so the newest message scrolls in ABOVE the macOS dock /
     device home bar instead of getting clipped at the very bottom edge */
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  scroll-behavior: smooth; transition: opacity .35s ease;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 100%);
}
.callfeed .bubble { max-width: 92%; box-shadow: 0 8px 22px rgba(15,20,34,.07); }
.js .popmsg:not(.shown) { display: none; }
.popmsg.shown { animation: popin .4s cubic-bezier(.2,.7,.3,1); }
@keyframes popin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .logo-track, .wave, .livedot { animation: none; }
  .callfeed { height: auto; scroll-behavior: auto; -webkit-mask-image: none; mask-image: none; }
  .popmsg.shown { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===== Connector: two-phase translating sweep -> resolve =====
   Single-line, height-stable inside the fixed-height #callfeed.
   State is driven by data-phase ("translating" | "translated") set by the
   reveal loop, and data-dir ("to-en" | "to-ar") authored in the markup.
   The progress rail is absolutely positioned so it never grows the row,
   keeping scrollHeight identical across both phases (no follow-scroll jump). */

.connector { position: relative; }

/* --- icon cell: arrow and check stacked in one fixed 15px box, crossfade --- */
.connector .conn-ico {
  position: relative; display: inline-flex; flex: none;
  width: 15px; height: 15px; align-items: center; justify-content: center;
}
.connector .conn-ico .ic {
  position: absolute; inset: 0; width: 15px; height: 15px;
  transition: opacity .3s ease, transform .3s cubic-bezier(.2,.8,.3,1.4);
}
.connector .ic-check { opacity: 0; transform: scale(.6); }
.connector[data-phase="translated"] .ic-arrow { opacity: 0; }
.connector[data-phase="translated"] .ic-check { opacity: 1; transform: scale(1); }

/* --- label cell: both phase labels share one grid cell, opacity crossfade.
   No display:none -> no reflow. Longer of EN/AR defines a stable width. --- */
.connector .conn-labels { display: inline-grid; }
.connector .conn-lbl {
  grid-area: 1 / 1; white-space: nowrap;
  transition: opacity .3s ease;
}
.connector .conn-done { opacity: 0; }
.connector[data-phase="translated"] .conn-doing { opacity: 0; }
.connector[data-phase="translated"] .conn-done { opacity: 1; }

/* --- progress rail: absolute, lives inside the connector's existing line-box
   (rides in the bottom gap whitespace), so it adds NO height --- */
.connector .conn-rail {
  position: absolute; left: 50%; bottom: -6px;
  width: 84px; max-width: 64%; height: 1.5px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: rgba(194, 104, 47, .16);      /* faint copper track */
  overflow: hidden; pointer-events: none;
  opacity: 0; transition: opacity .25s ease;
}
.connector[data-phase="translating"] .conn-rail { opacity: 1; }
.connector[data-phase="translated"]  .conn-rail { opacity: 0; }   /* sweep clears on resolve */

/* Phase A: a copper gleam SWEEPS out from the CENTER to both sides at the same
   time (like a broom sweeping left & right), oscillating over the faint track.
   This is a sweep, not a progress/loading fill. */
.connector .conn-fill { position: absolute; inset: 0; overflow: hidden; border-radius: 2px; }
.connector .conn-fill::before,
.connector .conn-fill::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  left: 50%; opacity: 0; border-radius: 2px;
}
.connector .conn-fill::before { background: linear-gradient(90deg, transparent, #f47b3f); } /* left-going gleam */
.connector .conn-fill::after  { background: linear-gradient(90deg, #f47b3f, transparent); } /* right-going gleam */
.connector[data-phase="translating"] .conn-fill::before { animation: conn-sweep-l 850ms ease-in-out infinite; }
.connector[data-phase="translating"] .conn-fill::after  { animation: conn-sweep-r 850ms ease-in-out infinite; }
@keyframes conn-sweep-l { 0%,100% { transform: translateX(-50%); opacity: .15 } 50% { transform: translateX(-145%); opacity: 1 } }
@keyframes conn-sweep-r { 0%,100% { transform: translateX(-50%); opacity: .15 } 50% { transform: translateX(45%);   opacity: 1 } }

/* gentle arrow pulse while translating, calm and copper */
.connector[data-phase="translating"] .ic-arrow { animation: conn-pulse 1100ms ease-in-out infinite; }
@keyframes conn-pulse { 0%,100% { opacity: .6 } 50% { opacity: 1 } }

/* --- RTL: the feed mirrors under html[dir="rtl"]; flip the fill origin per dir
   so to-en still flows toward the agent and to-ar toward the customer.
   Only the fill origin is mirrored; text is never flipped. --- */
html[dir="rtl"] .connector[data-dir="to-en"] .conn-fill { transform-origin: right center; }
html[dir="rtl"] .connector[data-dir="to-ar"] .conn-fill { transform-origin: left center; }

/* --- reduced motion: no sweep, no pulse; resolved label + check, instantly.
   Never paint the transient "is translating…" text. --- */
@media (prefers-reduced-motion: reduce) {
  .connector .conn-rail { display: none; }
  .connector .ic-arrow { animation: none; }
  .connector .conn-fill { animation: none; transition: none; }
  .connector .conn-lbl { transition: none; }
  .connector .conn-doing { opacity: 0 !important; }
  .connector .conn-done { opacity: 1 !important; }
  .connector .ic-arrow { opacity: 0 !important; }
  .connector .ic-check { opacity: 1 !important; transform: none !important; }
}

/* ===== Button hovers: simple color change only (no shadow, no lift) ===== */
a.font-semibold.rounded-full,
button.font-semibold.rounded-full {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
/* Orange (primary): deeper copper */
a.bg-orange.font-semibold.rounded-full:hover,
button.bg-orange.font-semibold.rounded-full:hover { background-color: #e8651f; }
/* Ink (dark): lifts to a lighter charcoal */
a.bg-ink.font-semibold.rounded-full:hover,
button.bg-ink.font-semibold.rounded-full:hover { background-color: #2a3346; }
/* Ghost (outline): warms to a cream tint with copper border + text */
a.bg-white.font-semibold.rounded-full:hover,
button.bg-white.font-semibold.rounded-full:hover {
  background-color: #fff4ea;
  border-color: #f0b288;
  color: #c2682f;
}
/* Language toggle: subtle hover on the inactive option */
.lang-btn:not([aria-pressed="true"]):hover { background-color: rgba(15, 20, 34, .06); }

/* ===== Bottom safe area: keep the floating widget clear of the macOS dock / device home bar ===== */
#chatWidget { bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
body { padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ============================================================
   Hero demo video: "see it in action" cue + browser-framed
   poster that peeks (bottom cropped) and opens in a lightbox.
   ============================================================ */

/* ---- Hand-drawn marker cue ---- */
.hero-cue { display: flex; flex-direction: column; align-items: center; gap: .1rem; margin-bottom: .25rem; transform: rotate(-3deg); }
.hero-cue-text {
  font-family: "Caveat", ui-rounded, cursive;
  font-size: 1.7rem; line-height: 1; font-weight: 700;
  color: #ea6a2a;
}
.hero-cue-arrow { width: 58px; height: 48px; overflow: visible; }
.hero-cue-path, .hero-cue-head { stroke-dasharray: 120; stroke-dashoffset: 120; }
.reveal.in .hero-cue-path { animation: cue-draw .85s ease .2s forwards; }
.reveal.in .hero-cue-head { animation: cue-draw .35s ease 1s forwards; }
@keyframes cue-draw { to { stroke-dashoffset: 0; } }

/* ---- Peek wrapper: crop the bottom + soft fade so the frame rises out of the page ---- */
/* Two layers, on purpose:
   - .hero-video-peek (OUTER): carries the rounded corners + drop shadow. It is
     NOT clipped and NOT masked, so the shadow follows the radius cleanly (no
     square corners) and nothing crops it.
   - .hero-video-clip (INNER): does the cropping (max-height + overflow) and the
     soft bottom fade (mask). The border lives here so the mask tapers it off at
     the bottom. Shadow must NOT live here — a mask would clip it to the box. */
.hero-video-peek {
  position: relative;
  max-width: 880px; margin: 0 auto;
  border-radius: 16px 16px 0 0;
  /* top + left + right lift only — negative Y offset and spread keep the
     shadow off the bottom so it doesn't puddle onto the next (white) section */
  box-shadow: 0 -8px 36px -6px rgba(15, 20, 34, .15);
  transition: box-shadow .25s ease;
}
.hero-video-peek:hover { box-shadow: 0 -10px 44px -6px rgba(15, 20, 34, .18); }

.hero-video-clip {
  position: relative;
  border-radius: 16px 16px 0 0;
  border: 1px solid rgba(15, 20, 34, .08);
  border-bottom: 0;
  overflow: hidden;
  /* Hard crop (no mask fade): the frame runs solid to this height and is cut
     off, so the bottom edge can sit flush on the hero/next-section fold. */
  max-height: 250px;
}
@media (min-width: 768px) { .hero-video-clip { max-height: 330px; } }

/* ---- The video frame (also the play button); no chrome, no own border/shadow ---- */
.browser-frame {
  display: block; width: 100%; padding: 0; cursor: pointer;
  -webkit-appearance: none; appearance: none; text-align: left;
  background: #fff; border: 0;
}
.bf-screen { position: relative; display: block; background: #0f1422; }
.bf-poster { display: block; width: 100%; height: auto; }

/* Mac window buttons, floating over the video (no chrome bar) */
.bf-dots { position: absolute; top: 15px; left: 16px; z-index: 3; display: flex; gap: 8px; }
.bf-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; box-shadow: 0 1px 2px rgba(0, 0, 0, .22); }
.bf-red { background: #ff5f57; } .bf-amber { background: #febc2e; } .bf-green { background: #28c840; }

/* play button */
.bf-play {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%;
  background: #f47b3f; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 34px rgba(244, 123, 63, .55);
  transition: transform .2s ease, background-color .2s ease;
}
.bf-play svg { width: 30px; height: 30px; margin-left: 4px; }
.bf-play::after {
  content: ""; position: absolute; inset: -7px; border-radius: 50%;
  border: 2px solid rgba(244, 123, 63, .55); animation: bf-pulse 2.1s ease-out infinite;
}
.browser-frame:hover .bf-play, .browser-frame:focus-visible .bf-play { transform: translate(-50%, -50%) scale(1.09); background: #ea6a2a; }
@keyframes bf-pulse { 0% { transform: scale(.85); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }

.bf-cap {
  position: absolute; left: 50%; top: calc(40% + 58px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: #fff;
  background: rgba(15, 20, 34, .55); backdrop-filter: blur(4px);
  border-radius: 999px; padding: 5px 12px;
}

/* ---- Lightbox ---- */
.demo-modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 5vw; }
.demo-modal[hidden] { display: none; }
.demo-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 20, 34, .74); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: modal-fade .2s ease; }
.demo-modal-card { position: relative; width: min(980px, 100%); animation: modal-pop .28s cubic-bezier(.2, .7, .3, 1); }
.demo-modal-frame { position: relative; border-radius: 16px; overflow: hidden; background: #000; box-shadow: 0 30px 90px rgba(0, 0, 0, .55); }
.demo-modal-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000; }
.demo-modal-close {
  position: absolute; top: -16px; right: -16px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: #0f1422; border: 1px solid rgba(15, 20, 34, .08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .3); cursor: pointer;
  transition: transform .15s ease, background-color .15s ease;
}
.demo-modal-close:hover { transform: scale(1.06); background: #fff4ea; color: #c2682f; }
@media (max-width: 640px) { .demo-modal-close { top: -52px; right: 0; } }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-cue-path, .hero-cue-head { stroke-dashoffset: 0; animation: none; }
  .bf-play::after { animation: none; }
  .browser-frame:hover { transform: none; }
  .demo-modal-backdrop, .demo-modal-card { animation: none; }
}

/* ============================================================
   "How it works" two-part animation
   Part 1: dashboard sign-up -> companion number.
   Part 2: crossfade to the phone, add Tundo to a live call.
   The call UI is the product demo (tundo-demo-2) ported to DOM:
   authored at the demo's native 388x842 and scaled by --s so it
   matches the video pixel-for-pixel inside the site's phone frame.
   States are toggled by script.js; CSS does all the motion.
   ============================================================ */

.hiw-stage {
  --s: 0.69;                 /* native 388x842 -> ~268x581 screen */
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 604px;
  margin: 0 auto;
}

/* the two views share the stage and crossfade in place */
.hiw-dash, .hiw-phone {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .55s ease, transform .55s ease;
}
.hiw-phone { opacity: 0; transform: scale(.96); pointer-events: none; }
.hiw-stage.is-phone .hiw-dash  { opacity: 0; transform: scale(.985); pointer-events: none; }
.hiw-stage.is-phone .hiw-phone { opacity: 1; transform: none; pointer-events: auto; }

/* ---- left-column step highlight (synced to the animation) ---- */
.hiw-step-badge { transition: background-color .3s ease, box-shadow .3s ease, transform .3s ease; }
.hiw-step.hiw-step-on .hiw-step-badge {
  background-color: #f47b3f;
  box-shadow: 0 0 0 4px rgba(244,123,63,.18);
  transform: scale(1.06);
}

/* =================== PART 1 — DASHBOARD =================== */
.hiw-win {
  width: min(316px, 100%);
  background: #fff; border-radius: 18px;
  border: 1px solid #ece3d6;
  box-shadow: 0 24px 60px -28px rgba(60,40,15,.35), 0 4px 14px -8px rgba(60,40,15,.2);
  overflow: hidden;
}
.hiw-winbar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #f6efe6; border-bottom: 1px solid #efe6d8; }
.hiw-tl { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.hiw-tl-r { background: #ff5f57; } .hiw-tl-y { background: #febc2e; } .hiw-tl-g { background: #28c840; }
.hiw-url { margin-left: 10px; font-size: 12px; color: #9a8f7e; background: #fff; border: 1px solid #efe6d8; border-radius: 7px; padding: 3px 12px; flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hiw-winbody { position: relative; padding: 22px 24px; height: 296px; }
.hiw-brand { display: flex; align-items: center; gap: 9px; }
.hiw-brandmark { width: 26px; height: 26px; }
.hiw-brandname { font-size: 19px; font-weight: 800; letter-spacing: -.5px; color: #0f1422; }

.hiw-form, .hiw-done { position: absolute; left: 24px; right: 24px; top: 80px; transition: opacity .45s ease, transform .45s ease; }
.hiw-form-h { font-size: 17px; font-weight: 700; color: #0f1422; }
.hiw-field {
  margin-top: 14px; height: 44px; border: 1.5px solid #e7ddcf; border-radius: 11px;
  background: #fbf7f1; display: flex; align-items: center; padding: 0 14px;
  font-size: 15px; color: #0f1422;
}
.hiw-typed { white-space: pre; }
.hiw-caret { width: 1.5px; height: 18px; background: #f47b3f; margin-left: 1px; flex: none; }
.hiw-dash:not(.done) .hiw-caret { animation: hiw-blink 1.05s step-end infinite; }
.hiw-cta {
  margin-top: 14px; height: 44px; border-radius: 11px; background: #f47b3f; color: #fff;
  font-weight: 700; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hiw-cta svg { width: 18px; height: 18px; }
.hiw-dash.cta-press .hiw-cta { background: #ea6a2a; animation: hiw-ctapress .35s ease; }

.hiw-done { opacity: 0; transform: translateY(10px); pointer-events: none; }
.hiw-dash.done .hiw-form { opacity: 0; transform: translateY(-10px); pointer-events: none; }
.hiw-dash.done .hiw-done { opacity: 1; transform: none; }
.hiw-done-check { width: 46px; height: 46px; border-radius: 50%; background: #22a85a; display: flex; align-items: center; justify-content: center; }
.hiw-done-check svg { width: 24px; height: 24px; }
.hiw-dash.done .hiw-done-check { animation: hiw-pop .45s cubic-bezier(.2,.8,.3,1.4) both; }
.hiw-done-h { margin-top: 14px; font-size: 18px; font-weight: 800; color: #0f1422; }
.hiw-numcard { margin-top: 14px; border: 1px solid #f3dcc8; background: #fff6ef; border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.hiw-dash.done .hiw-numcard { animation: hiw-pop .5s cubic-bezier(.2,.8,.3,1.2) .18s both; }
.hiw-numlbl { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #c2682f; }
.hiw-num { font-size: 20px; font-weight: 800; color: #0f1422; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.hiw-numhint { margin-top: 14px; font-size: 13px; font-weight: 600; color: #6b6256; display: flex; align-items: center; gap: 6px; }
.hiw-numhint svg { width: 15px; height: 15px; }

/* =================== PART 2 — PHONE =================== */
.hiw-screen {
  position: relative;
  width: calc(388px * var(--s) + 20px);
  height: calc(842px * var(--s) + 20px);
  border: 10px solid #0f1422;
  border-radius: 44px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,20,34,.04), 0 14px 40px rgba(15,20,34,.16);
}
.hiw-call {
  position: absolute; top: 0; left: 0;
  width: 388px; height: 842px;
  transform: scale(var(--s)); transform-origin: top left;
  background: #000; color: #f5f6f7;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  display: flex; flex-direction: column;
}
.hiw-doodle { position: absolute; inset: 0; width: 388px; height: 842px; z-index: 0; }

.hiw-island { position: absolute; top: 13px; left: 50%; transform: translateX(-50%); width: 126px; height: 36px; background: #000; border-radius: 20px; z-index: 40; display: flex; align-items: center; justify-content: center; }
.hiw-island-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff9f43; box-shadow: 0 0 8px #ff9f43; }

.hiw-statbar { position: relative; z-index: 30; height: 62px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; }
.hiw-stat-l { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 17px; }
.hiw-stat-l svg { width: 15px; height: 15px; }
.hiw-stat-r { display: flex; align-items: center; gap: 6px; }
.ic-signal { width: 18px; height: 13px; } .ic-wifi { width: 17px; height: 13px; }
.hiw-batt { position: relative; width: 25px; height: 13px; border: 1.4px solid rgba(255,255,255,.5); border-radius: 4px; flex: none; }
.hiw-batt::before { content: ""; position: absolute; left: 1.4px; top: 1.4px; bottom: 1.4px; width: 46%; background: #ffcc33; border-radius: 1.5px; }
.hiw-batt::after { content: ""; position: absolute; right: -3px; top: 3.5px; width: 2px; height: 5px; background: rgba(255,255,255,.5); border-radius: 0 2px 2px 0; }

.hiw-head { position: relative; z-index: 20; flex: none; display: flex; align-items: flex-start; justify-content: space-between; padding: 6px 22px 16px; }
.hiw-head-mid { text-align: center; flex: 1; position: relative; }
.hiw-titles { position: relative; height: 32px; }
.hiw-title { position: absolute; left: 0; right: 0; font-weight: 700; font-size: 25px; letter-spacing: -.4px; transition: opacity .2s ease; }
/* sequential crossfade: "Carlos" fades out first, then "Carlos & Tundo" fades in
   (delayed) — avoids a doubled/ghosted centered title mid-transition. */
.hiw-title-2 { opacity: 0; transition-delay: .2s; }
.hiw-call.cs-grid .hiw-title-1 { opacity: 0; }
.hiw-call.cs-grid .hiw-title-2 { opacity: 1; }
.hiw-timer { color: #8d8d92; font-size: 15px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hiw-head-r { display: flex; gap: 10px; }
.hiw-circ { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: #dadbe0; flex: none; }
.hiw-circ svg { width: 21px; height: 21px; }
.hiw-call.cs-tap .hiw-addbtn { animation: hiw-tap .42s ease; }

.hiw-bodyarea { flex: 1; position: relative; min-height: 0; }
.hiw-grid { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; padding: 12px 16px 16px; }

.hiw-tile {
  position: relative; background: #1c1c1e; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; border: 1.5px solid rgba(255,255,255,.10);
  transition: opacity .42s ease, transform .42s ease, border-color .3s ease, box-shadow .3s ease, filter .4s ease;
}
.hiw-tile[data-accent="carlos"] { --acc: #5b9bf0; }
.hiw-tile[data-accent="you"]    { --acc: #72dd82; }
.hiw-tile[data-accent="tundo"]  { --acc: #f47b3f; }
.hiw-tile-carlos, .hiw-tile-you { opacity: 0; transform: scale(.9); }
.hiw-call.cs-grid .hiw-tile-carlos { opacity: 1; transform: none; }
.hiw-call.cs-grid .hiw-tile-you    { opacity: 1; transform: none; transition-delay: .06s; }
.hiw-tile-tundo { grid-column: 1 / 3; opacity: 0; transform: scale(.85); filter: saturate(.3) brightness(.75); }
.hiw-call.cs-tundo-pending .hiw-tile-tundo { opacity: .5; transform: none; }
.hiw-call.cs-tundo-active  .hiw-tile-tundo { opacity: 1; transform: none; filter: none; animation: hiw-tundopulse .9s ease-out; }

.hiw-tile.speaking { border-color: var(--acc); box-shadow: 0 0 26px -8px var(--acc); }

.hiw-av { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; opacity: .6; transition: opacity .3s ease; }
.hiw-tile.speaking .hiw-av { opacity: 1; }
.hiw-av-carlos { background: linear-gradient(145deg,#5b6b8c,#36415c); color: #eef1f6; font-size: 34px; font-weight: 600; }
.hiw-av-you    { background: radial-gradient(circle at 50% 38%,#3a9d6a,#226b46); }
.hiw-av-you svg { width: 38px; height: 38px; }
.hiw-av-tundo  { background: linear-gradient(145deg,#f9a063,#ea6a2a); color: #fff; font-size: 36px; font-weight: 700; }

.hiw-wave { display: flex; align-items: center; gap: 3.5px; height: 22px; margin-top: 12px; }
.hiw-wave i { width: 4px; height: 20px; border-radius: 4px; background: var(--acc); transform: scaleY(.06); transform-origin: center; opacity: .35; }
.hiw-tile.speaking .hiw-wave i { opacity: 1; animation: hiw-bar .8s ease-in-out infinite; }
.hiw-tile.speaking .hiw-wave i:nth-child(1) { animation-duration: .72s; animation-delay: -.62s; }
.hiw-tile.speaking .hiw-wave i:nth-child(2) { animation-duration: .58s; animation-delay: -.30s; }
.hiw-tile.speaking .hiw-wave i:nth-child(3) { animation-duration: .90s; animation-delay: -.12s; }
.hiw-tile.speaking .hiw-wave i:nth-child(4) { animation-duration: .64s; animation-delay: -.44s; }
.hiw-tile.speaking .hiw-wave i:nth-child(5) { animation-duration: .82s; animation-delay: -.08s; }
.hiw-tile.speaking .hiw-wave i:nth-child(6) { animation-duration: .55s; animation-delay: -.36s; }
.hiw-tile.speaking .hiw-wave i:nth-child(7) { animation-duration: .94s; animation-delay: -.20s; }
.hiw-tile.speaking .hiw-wave i:nth-child(8) { animation-duration: .68s; animation-delay: -.50s; }

.hiw-name { margin-top: 9px; font-weight: 600; font-size: 18px; color: var(--acc); opacity: .85; }
.hiw-tile.speaking .hiw-name { opacity: 1; }

.hiw-tile-top { position: absolute; top: 14px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; color: rgba(255,255,255,.5); }
.hiw-tile-top svg:first-child { width: 18px; height: 18px; }
.hiw-tile-top svg:last-child { width: 15px; height: 15px; }

.hiw-badge { position: absolute; top: 12px; left: 12px; z-index: 5; display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: #2a1200; background: #f47b3f; border: 1px solid #f47b3f; opacity: 0; transition: opacity .3s ease; }
.hiw-badge svg { width: 13px; height: 13px; }
.hiw-call.cs-tundo-active .hiw-badge { opacity: 1; }
.hiw-ring { margin-top: 3px; font-size: 13px; font-weight: 500; color: #8d8d92; opacity: 0; }
.hiw-call.cs-tundo-pending:not(.cs-tundo-active) .hiw-ring { opacity: 1; }

/* 1:1 hero (centered Carlos), docks to the top-left tile on reflow */
.hiw-hero { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(2.2); transition: transform .55s cubic-bezier(.4,0,.2,1), opacity .45s ease; pointer-events: none; }
.hiw-hero .hiw-av { opacity: 1; }
.hiw-call:not(.cs-grid) .hiw-hero .hiw-av { animation: hiw-heroglow 3s ease-in-out infinite; }
.hiw-call.cs-grid .hiw-hero { opacity: 0; transform: translate(-50%,-50%) translate(-91px,-175px) scale(1); }

.hiw-ctrls { position: relative; z-index: 20; flex: none; margin: 14px 14px 22px; padding: 12px 16px; border-radius: 40px; background: rgba(28,28,30,.92); display: flex; align-items: center; justify-content: space-between; }
.hiw-ctrl { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.12); color: #fff; }
.hiw-ctrl svg { width: 25px; height: 25px; }
.hiw-ctrl-end { background: #ff3b30; }

.hiw-toast { position: absolute; top: 160px; left: 0; right: 0; margin: 0 auto; width: max-content; z-index: 55; display: flex; align-items: center; padding: 0 18px; height: 36px; border-radius: 18px; background: rgba(52,55,58,.94); border: 1px solid #48494D; color: #C8CDD2; font-size: 14px; font-weight: 500; letter-spacing: .1px; opacity: 0; transition: opacity .3s ease; }
.hiw-call.cs-toast .hiw-toast { opacity: 1; }

/* ===== "Add people" sheet ===== */
.hiw-sheet { position: absolute; inset: 0; z-index: 60; background: #0E0F10; color: #fff; display: flex; flex-direction: column; overflow: hidden; transform: translateY(100%); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.hiw-call.cs-sheet .hiw-sheet { transform: translateY(0); }

.hiw-sh-stat { height: 44px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 26px; }
.hiw-sh-stat > span:first-child { font-weight: 700; font-size: 16px; }
.hiw-sh-stat-r { display: flex; align-items: center; gap: 6px; }
.hiw-sh-stat-r svg { width: 17px; height: 12px; }
.hiw-sh-stat .hiw-batt { width: 23px; height: 12px; border-width: 1.3px; border-radius: 3px; }
.hiw-sh-stat .hiw-batt::before { background: #fff; }
.hiw-sh-stat .hiw-batt::after { display: none; }   /* demo sheet battery has no terminal nub */

.hiw-sh-head { position: relative; flex: none; padding: 10px 0 6px; text-align: center; }
.hiw-sh-title { font-size: 17px; font-weight: 700; display: block; }
.hiw-sh-count { font-size: 12px; color: #8A8F94; margin-top: 2px; display: block; font-variant-numeric: tabular-nums; }
.hiw-sh-close { position: absolute; right: 16px; top: 8px; width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.10); display: flex; align-items: center; justify-content: center; }
.hiw-sh-close svg { width: 14px; height: 14px; }

.hiw-tray { height: 0; opacity: 0; overflow: hidden; flex: none; margin: 0 16px; transition: height .35s cubic-bezier(.2,.8,.2,1), opacity .3s ease, margin .35s ease; }
.hiw-call.cs-sheet-sel .hiw-tray { height: 84px; opacity: 1; margin: 10px 16px 0; }
.hiw-tray-inner { background: #1C1D1F; border-radius: 12px; height: 84px; display: flex; align-items: center; padding: 0 16px; }
.hiw-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hiw-chip-av { position: relative; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(145deg,#f9a063,#ea6a2a); color: #fff; font-weight: 700; font-size: 22px; display: flex; align-items: center; justify-content: center; }
.hiw-chip-x { position: absolute; top: -2px; right: -2px; width: 18px; height: 18px; border-radius: 50%; background: #3A3A3C; border: 2px solid #1C1D1F; display: flex; align-items: center; justify-content: center; }
.hiw-chip-x svg { width: 8px; height: 8px; }
.hiw-chip-name { font-size: 12px; color: #fff; }

.hiw-sh-search { margin: 10px 16px 0; height: 40px; border-radius: 11px; background: #1C1D1F; display: flex; align-items: center; gap: 8px; padding: 0 12px; flex: none; color: #8A8F94; font-size: 16px; }
.hiw-sh-search svg { width: 16px; height: 16px; flex: none; }

.hiw-sh-list { flex: 1; min-height: 0; overflow: hidden; position: relative; }
.hiw-sec { color: #8A8F94; font-size: 14px; font-weight: 500; padding: 18px 16px 8px; }
.hiw-sh-card { margin: 0 16px; background: #161719; border-radius: 12px; overflow: hidden; }
.hiw-row { position: relative; display: flex; align-items: center; height: 64px; padding-left: 16px; padding-right: 14px; }
.hiw-row:not(.hiw-row-last)::after { content: ""; position: absolute; left: 72px; right: 0; bottom: 0; height: 1px; background: #232427; }
.hiw-av40 { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; font-size: 14px; overflow: hidden; }
.hiw-av40 svg { width: 25px; height: 25px; }
.hiw-av40.hiw-av-tundo { font-size: 18px; }
.hiw-av-slate { background: #2C3A4A; }
.hiw-row-txt { flex: 1; min-width: 0; margin-left: 12px; display: flex; flex-direction: column; }
.hiw-row-name { color: #fff; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hiw-row-sub { color: #8A8F94; font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hiw-chk { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid #34373A; flex: none; display: flex; align-items: center; justify-content: center; transition: background .2s ease, border-color .2s ease; }
.hiw-chk svg { width: 14px; height: 14px; opacity: 0; transition: opacity .15s ease; }
.hiw-call.cs-sheet-sel .hiw-row-tundo .hiw-chk { background: #25D366; border-color: #25D366; }
.hiw-call.cs-sheet-sel .hiw-row-tundo .hiw-chk svg { opacity: 1; }

/* alphabet index spreads A–Z+# down the list (demo: top:250 -> bottom:70 over the
   native 842 screen). 27 glyphs over ~522px ≈ 19.3px line-height. */
.hiw-alpha { position: absolute; right: 5px; top: 250px; color: #25D366; font-size: 9px; font-weight: 600; line-height: 19.3px; text-align: center; }

.hiw-addcall { position: absolute; left: 16px; right: 16px; bottom: 18px; height: 50px; border-radius: 25px; background: #25D366; display: flex; align-items: center; justify-content: center; gap: 8px; color: #0A0A0A; font-weight: 700; font-size: 17px; box-shadow: 0 8px 24px -12px rgba(37,211,102,.5); transform: translateY(80px); opacity: 0; transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s ease, background .15s ease; }
.hiw-addcall svg { width: 20px; height: 20px; }
.hiw-call.cs-sheet-sel .hiw-addcall { transform: none; opacity: 1; }
.hiw-call.cs-sheet-add .hiw-addcall { background: #2EE670; animation: hiw-addpress .35s ease; }

/* ---- keyframes ---- */
@keyframes hiw-blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
@keyframes hiw-pop { 0% { opacity: 0; transform: translateY(8px) scale(.96); } 100% { opacity: 1; transform: none; } }
@keyframes hiw-ctapress { 0% { transform: scale(1); } 45% { transform: scale(.96); } 100% { transform: scale(1); } }
@keyframes hiw-tap { 0% { transform: scale(1); box-shadow: none; } 35% { transform: scale(.86); box-shadow: 0 0 18px 2px rgba(244,123,63,.75); } 100% { transform: scale(1); box-shadow: none; } }
@keyframes hiw-addpress { 0% { transform: scale(1); } 40% { transform: scale(.95); } 100% { transform: scale(1); } }
@keyframes hiw-bar { 0%,100% { transform: scaleY(.28); } 50% { transform: scaleY(1); } }
@keyframes hiw-heroglow { 0%,100% { box-shadow: 0 0 18px 2px rgba(91,155,240,0); } 50% { box-shadow: 0 0 34px 7px rgba(91,155,240,.33); } }
@keyframes hiw-tundopulse { 0% { box-shadow: 0 0 0 0 rgba(244,123,63,0); } 30% { box-shadow: 0 0 26px 6px rgba(244,123,63,.55); } 100% { box-shadow: 0 0 0 0 rgba(244,123,63,0); } }

/* ---- reduced motion: hold the joined call, no looping animation ---- */
@media (prefers-reduced-motion: reduce) {
  .hiw-dash, .hiw-phone { transition: none; }
  .hiw-caret, .hiw-wave i, .hiw-hero .hiw-av { animation: none !important; }
  .hiw-call.cs-tundo-active .hiw-tile-tundo { animation: none; }
}
