/* The call controls of a made-up video call app, alone on black. Every element moved by GSAP (the red shape, the
   handset, the controls, the choices, the ended line) has no transform in the CSS: positions and sizes live here,
   motion lives in the script. The red shape is anchored to the right of its slot and grows to the left. */
:root {
  --page: #000000;            /* the page */
  --bar-top: #1c1d22;         /* the top of the bar */
  --bar-bottom: #0c0d10;      /* the bottom of the bar */
  --ink: #f4f4f6;             /* the time and the icons */
  --muted: #868893;           /* the meeting name */
  --ctl: rgba(255, 255, 255, 0.075); /* the round microphone and camera keys */
  --red: #f0443a;             /* the End call button */
  --red-warm: #ff5b33;        /* the red when the pointer is on it */
  --red-deep: #2a0d0e;        /* the inside of the open pill */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--page);
  color: var(--ink);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 10px;
}

/* ---- the bar ---- */
.bar {
  position: relative;
  width: min(316px, calc(100vw - 20px));
  height: 64px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 22px;
}

.bar__clip {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bar-top), var(--bar-bottom));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    inset 0 -1px 0 rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 2px 4px rgba(0, 0, 0, 0.7),
    0 20px 40px -16px rgba(0, 0, 0, 0.95);
  pointer-events: none;
}
.bar__grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
}
/* the red light the button throws on the bar */
.bar__warmth {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 150px;
  background: radial-gradient(80px 46px at 112px 50%, rgba(240, 68, 58, 0.16), rgba(240, 68, 58, 0) 72%);
  opacity: 0.55;
}

/* ---- the running time ---- */
.time {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  z-index: 1;
}
.time__name {
  font-size: 11px;
  font-weight: 500;
  font-stretch: 96%;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
}
.time__clock {
  display: inline-flex;
  align-self: flex-start;
  font-size: 17px;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.005em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  height: 1.2em;
}
.dg {
  position: relative;
  display: inline-block;
  height: 1.2em;
  overflow: hidden;
}
.dg__in { display: block; }
.dg__in.is-next { position: absolute; left: 0; top: 0; }
.colon { display: inline-block; padding: 0 0.04em; transform: translateY(-0.06em); }

/* ---- the round keys ---- */
.ctl {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--ctl);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
  z-index: 1;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.ctl svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ctl .slash { stroke-dasharray: 1; stroke-dashoffset: 1; }
.ctl[aria-pressed="true"] { background: rgba(255, 255, 255, 0.92); color: #121317; }
.ctl:focus-visible { box-shadow: 0 0 0 2px #000, 0 0 0 3.5px rgba(255, 255, 255, 0.7); }
@media (hover: hover) {
  .ctl:hover { background: rgba(255, 255, 255, 0.13); }
  .ctl[aria-pressed="true"]:hover { background: #ffffff; }
}

/* ---- the red shape ---- */
.slot {
  position: relative;
  flex: none;
  width: 64px;
  height: 44px;
  z-index: 3;
}
.end {
  position: absolute;
  right: 0;
  top: 0;
  width: 64px;
  height: 44px;
  border-radius: 999px;
}
.end__glow {
  position: absolute;
  inset: 2px 6px -2px;
  border-radius: inherit;
  box-shadow: 0 8px 22px -4px rgba(255, 84, 52, 0.75);
  opacity: 0;
  pointer-events: none;
}
.end__red, .end__warm, .end__dark, .end__edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.end__red {
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 88%, #fff), var(--red) 55%, color-mix(in srgb, var(--red) 80%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 4px rgba(0, 0, 0, 0.18), 0 6px 14px -6px rgba(240, 68, 58, 0.65);
}
.end__warm {
  background: linear-gradient(180deg, color-mix(in srgb, var(--red-warm) 86%, #fff), var(--red-warm) 55%, color-mix(in srgb, var(--red-warm) 82%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), inset 0 -2px 4px rgba(0, 0, 0, 0.16);
  opacity: 0;
}
.end__dark {
  background: linear-gradient(180deg, color-mix(in srgb, var(--red-deep) 80%, #5a1a18), var(--red-deep));
  box-shadow: inset 0 0 0 1px rgba(255, 110, 96, 0.2), inset 0 1px 0 rgba(255, 150, 140, 0.14), 0 10px 24px -10px rgba(240, 68, 58, 0.45);
  opacity: 0;
}
.end__edge {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.end__btn {
  position: absolute;
  right: 0;
  top: 0;
  width: 64px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
}
.end__btn:focus-visible { box-shadow: 0 0 0 2px #000, 0 0 0 3.5px rgba(255, 120, 100, 0.9); }
.hs-wrap { display: grid; place-items: center; width: 24px; height: 24px; }
.hs { width: 22px; height: 22px; fill: #ffffff; filter: drop-shadow(0 1px 0.5px rgba(90, 0, 0, 0.35)); }

/* ---- the two choices inside the open pill ---- */
.choices {
  position: absolute;
  inset: 0;
  display: flex;
  gap: 4px;
  padding: 4px;
  visibility: hidden;
}
.choice {
  position: relative;
  height: 36px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 560;
  font-stretch: 96%;
  letter-spacing: 0.005em;
  white-space: nowrap;
  color: #fff;
  cursor: pointer;
  outline: none;
  opacity: 0;
  visibility: hidden;
}
.choice--leave {
  flex: 0.82;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: background-color 0.25s ease;
}
.choice--all {
  flex: 1.18;
  font-weight: 640;
  background: linear-gradient(180deg, color-mix(in srgb, var(--red) 86%, #fff), var(--red) 55%, color-mix(in srgb, var(--red) 82%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 4px 12px -5px rgba(240, 68, 58, 0.8);
}
.choice:focus-visible { box-shadow: 0 0 0 2px var(--red-deep), 0 0 0 3.5px rgba(255, 255, 255, 0.75); }
@media (hover: hover) {
  .choice--leave:hover { background: rgba(255, 255, 255, 0.14); }
  .choice--all:hover { filter: brightness(1.08) saturate(1.05); }
}

/* ---- the line once the call has ended ---- */
.ended {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 560;
  font-stretch: 98%;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  z-index: 2;
}
.ended__hs { width: 18px; height: 18px; fill: var(--red); margin-right: 2px; }
.ended__sep { color: var(--muted); }
.ended__time { color: var(--muted); }

/* ---- the drawn pointer of the autopilot ---- */
.ghost {
  position: fixed;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  pointer-events: none;
  fill: #ffffff;
  stroke: #111216;
  stroke-width: 1.4;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  opacity: 0;
  visibility: hidden;
  z-index: 9;
}
