.call-demo {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: clamp(24px, 4.5vw, 72px);
  padding: clamp(36px, 5vw, 80px) max(var(--col), calc((100% - 1280px) / 2));
  border-top: 1px solid var(--line);
  background: var(--paper);
  scroll-margin-top: 82px;
}
.call-demo-copy { min-width: 0; }
.call-demo h2 { font-size: clamp(34px, 4vw, 61px); line-height: 1.02; letter-spacing: -.065em; font-weight: 400; text-wrap: balance; }
.call-demo-copy > p:not(.quickstart-kicker) { font-size: 14px; line-height: 1.65; color: #68635d; max-width: 35ch; margin-top: 15px; }
.call-demo-reply { margin-top: 23px; padding-top: 15px; border-top: 1px solid var(--line); min-height: 110px; max-width: 37ch; }
.call-demo-reply > p:first-child { color: #9b4c34; font-size: 10px; margin-bottom: 7px; }
.call-demo-reply > p:last-child { font-size: 15px; line-height: 1.55; }
.call-demo-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  padding: clamp(23px, 3vw, 44px) 10px;
  border: 1px solid #14141429;
  background:
    radial-gradient(ellipse at 50% 61%, #d1b3a354, transparent 65%),
    radial-gradient(#b7a79668 1px, transparent 1px) 0 0 / 16px 16px,
    #f3eee7;
}

/* Hardware, glass, and controls are separate layers so the screen can change states. */
.call-demo-phone {
  position: relative;
  z-index: 1;
  width: min(77%, clamp(185px, 22vw, 262px));
  aspect-ratio: 100 / 208;
  padding: 6px;
  border: 1px solid #645c59;
  border-radius: 16.8% / 8.1%;
  background: linear-gradient(123deg, #eee9e3 1%, #756b65 13%, #b8aea7 28%, #38312f 47%, #a0958d 66%, #e3d7cf 80%, #524846 98%);
  box-shadow: inset 0 0 0 1px #ffffff65, 0 24px 45px -23px #4d3228b3, 0 8px 14px -8px #2b211d99;
  container-type: inline-size;
}
.call-demo-phone::before, .call-demo-phone::after, .call-demo-volume, .call-demo-volume::after {
  content: "";
  position: absolute;
  width: 2px;
  border-radius: 2px 0 0 2px;
  background: linear-gradient(#a79b94, #574b48 36%, #91847b 84%, #403936);
}
.call-demo-phone::before { left: -3px; top: 18%; height: 4%; }
.call-demo-phone::after { right: -3px; top: 29%; height: 10%; transform: scaleX(-1); }
.call-demo-volume { left: -3px; top: 27%; height: 7%; }
.call-demo-volume::after { left: 0; top: 143%; height: 100%; }
.call-demo-screen {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  justify-items: center;
  height: 100%;
  overflow: hidden;
  border: 3px solid #171415;
  border-radius: 15.6% / 7.5%;
  color: #fff8f1;
  text-align: center;
  background: #1a1517;
}
.call-demo-screen::before, .call-demo-screen::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
}
.call-demo-screen::before {
  background: radial-gradient(ellipse at 6% 8%, #75616b, #493e4d 32%, transparent 70%),
    radial-gradient(ellipse at 103% 56%, #674039, transparent 63%), linear-gradient(163deg, #453641, #211b23 70%);
  opacity: .9;
  transition: opacity 440ms ease;
}
.call-demo-screen::after {
  background: radial-gradient(ellipse at 76% 21%, #895341, transparent 62%),
    radial-gradient(ellipse at 5% 44%, #773d3b, transparent 65%), linear-gradient(160deg, #382735, #1c191f 72%);
  opacity: 0;
  transition: opacity 500ms ease;
}
.call-demo[data-state="dialing"] .call-demo-screen::before { opacity: 1; }
.call-demo[data-state="connected"] .call-demo-screen::after { opacity: 1; }
.call-demo[data-state="ended"] .call-demo-screen::before { opacity: .52; }
.call-demo-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 10%;
  height: 43px;
  font-size: clamp(9px, 5.2cqw, 12px);
  font-weight: 650;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.call-demo-signal { width: 16cqw; }
.call-demo-island {
  position: absolute;
  top: 8px;
  left: 50%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 2px;
  width: 33cqw;
  height: 8.8cqw;
  border-radius: 99px;
  padding-left: 10%;
  transform: translateX(-50%);
  background: #080809;
  box-shadow: inset 0 -1px 1px #ffffff1e;
}
.call-demo-island::after {
  content: "";
  position: absolute;
  right: 9%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: radial-gradient(circle at 60% 40%, #38404d, #15171d 54%, #0a0a0f);
}
.call-demo-island i {
  width: 2px;
  height: 7px;
  border-radius: 3px;
  background: #ffaa88;
  opacity: 0;
}
.call-demo[data-state="connected"] .call-demo-island i {
  opacity: 1;
  animation: call-demo-wave 550ms var(--island-delay, 0ms) ease-in-out infinite alternate;
}
.call-demo-island i:nth-child(2) { --island-delay: -180ms; }
.call-demo-island i:nth-child(3) { --island-delay: -310ms; }
.call-demo-island i:nth-child(4) { --island-delay: -100ms; }

.call-demo-caller {
  align-self: start;
  display: grid;
  justify-items: center;
  width: 100%;
  padding: clamp(19px, 17cqw, 45px) 5% 0;
}
.call-demo-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 30cqw;
  aspect-ratio: 1;
  border: 1px solid #fff5e957;
  border-radius: 50%;
  color: #fff0e5;
  background: radial-gradient(circle at 46% 12%, #e5b5a456, transparent 58%), linear-gradient(150deg, #986c6c, #554456);
  box-shadow: inset 0 1px 0 #fff6ea35, 0 9px 20px #24192455;
  font-size: clamp(19px, 10.5cqw, 29px);
  font-weight: 500;
  letter-spacing: -.07em;
}
.call-demo-avatar::before, .call-demo-avatar::after {
  position: absolute;
  inset: -1px;
  content: "";
  border: 1px solid #ffc8a8;
  border-radius: 50%;
  opacity: 0;
}
.call-demo[data-state="dialing"] .call-demo-avatar::before,
.call-demo[data-state="dialing"] .call-demo-avatar::after { animation: call-demo-ring 1.35s ease-out infinite; }
.call-demo[data-state="dialing"] .call-demo-avatar::after { animation-delay: .45s; }
.call-demo-contact {
  margin-top: clamp(12px, 7cqw, 20px);
  font-size: clamp(17px, 9.9cqw, 26px);
  line-height: 1.1;
  font-weight: 540;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.call-demo-readout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 7px;
  color: #f1d8ce;
  font-size: clamp(10px, 5.5cqw, 13px);
  line-height: 1.35;
}
.call-demo-time { font-variant-numeric: tabular-nums; }
.call-demo[data-state="idle"] :is(.call-demo-time, .call-demo-separator),
.call-demo[data-state="dialing"] :is(.call-demo-time, .call-demo-separator) { display: none; }
.call-demo-controls {
  display: grid;
  justify-items: center;
  padding-bottom: clamp(13px, 7cqw, 22px);
}
.call-demo-mute {
  min-height: 44px;
  border-radius: 9px;
  padding-inline: 8px;
  color: #f1d8ce;
  background: transparent;
  font: 400 clamp(10px, 5cqw, 13px)/1.2 var(--sans);
}
.call-demo-mute:hover { color: #fff8f1; text-decoration: underline; }
.call-demo-mute:focus-visible { outline: 2px solid #ffd8bd; outline-offset: -2px; }
.call-demo-mute:disabled { opacity: .5; cursor: default; }
.call-demo-audio-status:not(:empty) {
  margin-top: 8px;
  color: #68635d;
  font-size: 12px;
  line-height: 1.5;
}
.call-demo-controls noscript { font-size: 10px; }
.call-demo-button {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 78px;
  border-radius: 12px;
  padding: 2px 6px;
  color: #fffaf5;
  background: transparent;
  font: 500 clamp(11px, 5.7cqw, 14px)/1.2 var(--sans);
}
.call-demo-button-icon {
  display: grid;
  place-items: center;
  width: clamp(44px, 24cqw, 59px);
  aspect-ratio: 1;
  border: 1px solid #ffffff42;
  border-radius: 50%;
  background: #795a6c;
  box-shadow: 0 6px 15px #17101755, inset 0 1px 0 #ffffff3a;
  transition: transform 150ms ease, background-color 240ms ease;
}
.call-demo-button:hover .call-demo-button-icon { transform: scale(1.06); }
.call-demo-button:active .call-demo-button-icon { transform: scale(.92); }
.call-demo-button:disabled { opacity: .5; cursor: default; }
.call-demo-button:focus-visible { outline: 2px solid #ffd8bd; outline-offset: 2px; }
.call-demo-replay, .call-demo[data-state="ended"] .call-demo-handset { display: none; }
.call-demo[data-state="ended"] .call-demo-replay { display: block; }

.call-demo:is([data-state="dialing"], [data-state="connected"]) .call-demo-button-icon { background: #c72c3c; }
.call-demo:is([data-state="dialing"], [data-state="connected"]) .call-demo-handset { transform: rotate(136deg); }
.call-demo-home {
  position: absolute;
  bottom: 6px;
  width: 40%;
  height: 3px;
  border-radius: 10px;
  background: #fffaf0ad;
}

.call-demo-wave {
  position: absolute;
  inset: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.call-demo-wave::before { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1px solid #b46c5049; }
.call-demo-wave i {
  width: clamp(1px, .38vw, 5px);
  height: var(--amplitude);
  border-radius: 5px;
  background: #b76a4e;
  opacity: .46;
  transform: scaleY(.06);
  transition: opacity 360ms ease, background-color 260ms ease;
}
.call-demo[data-state="dialing"] .call-demo-wave i { animation: call-demo-wave 1.35s var(--offset) ease-out infinite; opacity: .65; }
.call-demo[data-state="connected"] .call-demo-wave i {
  animation: call-demo-wave var(--pace) var(--offset) ease-in-out infinite alternate;
  opacity: .91;
}
.call-demo[data-speaker="desk"] .call-demo-wave i { background: #815b72; }
.call-demo[data-speaker="ovoz"] .call-demo-wave i:nth-child(n+31),
.call-demo[data-speaker="desk"] .call-demo-wave i:nth-child(-n+30) { opacity: .38; }
@keyframes call-demo-wave {
  0%, 100% { transform: scaleY(.17); }
  55% { transform: scaleY(1); }
}
@keyframes call-demo-ring {
  0% { opacity: .65; transform: scale(.98); }
  85%, 100% { opacity: 0; transform: scale(1.6); }
}
@media (max-width: 900px) {
  .call-demo { padding-inline: clamp(16px, 5vw, 50px); }
}
@media (max-width: 650px) {
  .call-demo { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .call-demo-reply { min-height: 86px; margin-top: 15px; }
  .call-demo-phone { width: min(77%, clamp(174px, 54vw, 216px)); }
}
@media (prefers-reduced-motion: reduce) {
  .call-demo *, .call-demo *::before, .call-demo *::after { animation: none !important; transition: none !important; }
  .call-demo:is([data-state="dialing"], [data-state="connected"]) .call-demo-wave i { transform: scaleY(.4); }
}
