/* The stage: one sentence, played out under the sunrise. A phone shows the customer's app as
   the agent makes it; four cards around it show the plan, the agent, the checks and the yes.
   The apps on the phone are in apps.css. */

.stage-wrap {
  position: relative;
  margin-top: var(--stage-gap, 176px);
  padding-bottom: var(--space-24);
}
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px minmax(0, 1fr);
  gap: var(--space-12);
  align-items: center;
  text-align: start;
}
.stage-side {
  display: grid;
  gap: var(--space-6);
}
.stage-side.left {
  justify-items: end;
  align-self: start;
  margin-top: var(--space-12);
}
.stage-side.right {
  justify-items: start;
  align-self: end;
  margin-bottom: var(--space-12);
}

/* The cards around the phone */
.float {
  width: min(100%, 284px);
  padding: var(--space-5);
  border: var(--border) solid var(--line-strong);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-overlay);
  transition:
    opacity var(--duration-slow) var(--ease-out),
    transform var(--duration-slow) var(--ease-rise),
    border-color var(--duration-slow) var(--ease-out);
}
.js .float:not(.on) {
  opacity: 0.18;
  transform: translateY(12px) scale(0.98);
}
.float.current {
  border-color: var(--accent-line);
}
.float .eyebrow {
  display: flex;
}
.todo {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  font-size: 15px;
  color: var(--text-muted);
}
.todo li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transition: color var(--duration-base) var(--ease-out);
}
.todo li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition:
    background var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}
.todo li.done {
  color: var(--text-strong);
}
.todo li.done::before {
  border-color: var(--accent);
  background:
    var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.f-agent {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: var(--space-3);
  align-items: center;
}
.av {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-2);
  border: var(--border) solid var(--line);
  color: var(--text-strong);
}
.f-agent b {
  display: block;
  color: var(--text-strong);
  font-weight: var(--weight-medium);
  font-size: 15px;
  line-height: 1.3;
}
.f-agent small {
  color: var(--text-muted);
  font-size: 13px;
}
.working .dot {
  color: var(--accent);
}
.big {
  margin-top: var(--space-3);
  font-size: var(--size-h4);
  letter-spacing: var(--tracking-heading);
  color: var(--text-muted);
}
.big b {
  color: var(--text-strong);
  font-weight: var(--weight-semibold);
  font-variant-numeric: tabular-nums;
}
.meter {
  display: block;
  height: 6px;
  margin-top: var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}
.meter i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--ok);
  transition: width 400ms var(--ease-out);
}
.ticks {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.ticks li {
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  border: var(--border) solid var(--line);
  font-size: 13px;
  color: var(--text-muted);
  transition: all var(--duration-base) var(--ease-out);
}
.ticks li.done {
  border-color: transparent;
  background: var(--ok-tint);
  color: var(--ok);
}
.domain {
  margin-top: var(--space-3);
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-strong);
}
.f-ship .row {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.f-ship.current #approveBtn {
  animation: ask-yes 1600ms var(--ease-out) infinite;
}
@keyframes ask-yes {
  50% {
    box-shadow: var(--glow-accent);
  }
}
.live {
  display: none;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--ok);
  font-weight: var(--weight-medium);
  font-size: 15px;
}
.stage.approved .f-ship .row {
  display: none;
}
.stage.approved .live {
  display: flex;
}

/* The beats under the stage */
.beats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-12);
}
.beats ol {
  display: flex;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-1);
  list-style: none;
  border: var(--border) solid var(--line);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.beats li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: 36px;
  padding: 0 var(--space-4) 0 var(--space-2);
  border-radius: var(--radius-pill);
  font-size: var(--size-small);
  color: var(--text-subtle);
  transition:
    background var(--duration-base) var(--ease-out),
    color var(--duration-base) var(--ease-out);
}
.beats li span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: var(--border) solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 12px;
}
.beats li.done {
  color: var(--text);
}
.beats li.now {
  background: var(--surface-2);
  color: var(--text-strong);
}
.beats li.now span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}
.stage-caption {
  margin-top: var(--space-4);
  font-size: var(--size-small);
  color: var(--text-subtle);
}

/* The phone */
.phone {
  position: relative;
  width: 316px;
  height: 648px;
  padding: 10px;
  border-radius: 52px;
  background: var(--sun-night);
  border: var(--border) solid var(--line-strong);
  box-shadow: var(--shadow-window);
}
.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: #ffffff;
  transition: background var(--duration-slow) var(--ease-out);
}
.ph-status {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
  font-weight: var(--weight-semibold);
  color: var(--ph-ink, #111214);
  transition: color var(--duration-slow) var(--ease-out);
}
.ph-status i {
  width: 96px;
  height: 28px;
  border-radius: var(--radius-pill);
  background: #000000;
}
.ph-bat {
  width: 26px;
  height: 12px;
  border-radius: 4px;
  border: 1.5px solid currentColor;
  background:
    linear-gradient(90deg, currentColor 70%, transparent 70%) 1px 1px / calc(100% - 2px)
    calc(100% - 2px) no-repeat;
}

/* Before the look exists: the outline the agent is filling in. */
.sketch {
  position: absolute;
  inset: 56px 18px 18px;
  display: grid;
  align-content: start;
  gap: 14px;
  transition: opacity var(--duration-slow) var(--ease-out);
}
.sketch i {
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eeeeea 30%, #f7f7f4 50%, #eeeeea 70%) 0 0 / 300% 100%;
  animation: sketch 1400ms linear infinite;
}
.sketch i.w60 {
  width: 60%;
}
.sketch i.w40 {
  width: 40%;
}
.sketch i.tall {
  height: 96px;
  border-radius: 14px;
}
@keyframes sketch {
  to {
    background-position: -150% 0;
  }
}
.stage.drawn .sketch {
  opacity: 0;
}

/* A gentle drift, so the stage feels alive. */
.float.on {
  animation: drift 7s ease-in-out infinite;
}
.stage-side.right .float.on {
  animation-delay: -3.5s;
}
@keyframes drift {
  50% {
    translate: 0 -6px;
  }
}

/* Tablet and phone: the phone first, then the card for the step that's happening. */
@media (max-width: 1080px) {
  .stage {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: var(--space-6);
  }
  .phone {
    order: -1;
  }
  .stage-side,
  .stage-side.left,
  .stage-side.right {
    display: contents;
  }
  .float {
    width: min(100%, 360px);
  }
  .float.on {
    animation: none;
  }
  .js .float:not(.current) {
    display: none;
  }
}
@media (max-width: 720px) {
  .stage-wrap {
    --stage-gap: 120px;
    padding-bottom: var(--space-16);
  }
  .phone {
    width: 292px;
    height: 600px;
  }
  .beats {
    flex-direction: column;
    gap: var(--space-2);
  }
  .beats ol {
    gap: 0;
  }
  .beats li {
    padding: 0 var(--space-2);
    font-size: 13px;
  }
  .beats li:not(.now) {
    font-size: 0;
    gap: 0;
  }
  .beats li:not(.now) span {
    font-size: 12px;
  }
}
