/**
 * The call with Santa.
 *
 * It looks like a video call to the North Pole: a night sky, a call window
 * with the place and the state of the call across the top, and the picture in
 * the middle. The widget inside is somebody else's and it is white, so the
 * frame around it is what makes it belong here.
 */

.call-page {
  min-height: 100dvh;
  background:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 72% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 34% 72%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 64%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 52% 34%, #cfe6ff 50%, transparent 51%),
    radial-gradient(ellipse at 50% 0%, rgba(214, 51, 127, 0.22), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(61, 255, 176, 0.1), transparent 55%),
    var(--night, #05070d);
  background-size: 220px 220px, 300px 300px, 260px 260px, 340px 340px, 180px 180px, 100% 100%, 100% 100%, 100% 100%;
}

.call-page .top a.ghost { text-decoration: none; }
.call-page .brand-link { text-decoration: none; color: inherit; }

.call-main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 6px 16px 48px;
  text-align: center;
}

.call-title {
  margin: 4px 0 6px;
  font-size: clamp(26px, 6vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #fff;
}

.call-lede {
  margin: 0 auto 16px;
  max-width: 30rem;
  font-size: 17px;
  line-height: 1.45;
  color: rgba(217, 236, 255, 0.82);
}
.call-lede strong { color: var(--pink-bright, #ff5faf); }

/* ---------------------------------------------------------- the call window */

.call-phone {
  padding: 10px;
  border-radius: 28px;
  background: linear-gradient(180deg, #1d2334, #121726);
  box-shadow:
    0 0 0 1px rgba(217, 236, 255, 0.14),
    0 0 0 6px rgba(214, 51, 127, 0.18),
    0 34px 90px -24px rgba(0, 0, 0, 0.9);
}

.call-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 8px 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.call-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(61, 255, 176, 0.16);
  color: #9dffd8;
}

.call-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* Only once somebody has clicked into the call does it say it is live. */
body[data-state="live"] .call-state { background: #d92b4a; color: #fff; }
body[data-state="live"] .call-dot { animation: call-blink 1.4s ease-in-out infinite; }

.call-timer {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

@keyframes call-blink { 50% { opacity: 0.25; } }

.call-frame {
  position: relative;
  height: min(62dvh, 560px);
  min-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  /* The widget is white, so the wait for it is white too: no flash. */
  background: #fff;
}

.call-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 640px) {
  .call-phone { padding: 8px; border-radius: 24px; }
  .call-frame { height: min(60dvh, 540px); min-height: 380px; border-radius: 18px; }
}

.call-lag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 10px 4px 2px;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(245, 197, 107, 0.16);
  color: #ffe2a6;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  animation: call-lag-in 400ms ease both;
}

@keyframes call-lag-in { from { opacity: 0; transform: translateY(-6px); } }

.call-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; flex: none; }
.call-bars i { width: 3px; border-radius: 1px; background: currentColor; }
.call-bars i:nth-child(1) { height: 25%; }
.call-bars i:nth-child(2) { height: 50%; animation: call-flicker 2.3s steps(1) infinite; }
.call-bars i:nth-child(3) { height: 75%; opacity: 0.25; }
.call-bars i:nth-child(4) { height: 100%; opacity: 0.25; }
@keyframes call-flicker { 40% { opacity: 0.25; } 70% { opacity: 1; } }

/* ------------------------------------------------------- under the call */

.call-tips {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  text-align: left;
}
.call-tips li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 15px;
  line-height: 1.4;
  color: rgba(217, 236, 255, 0.9);
}
.call-tips li span { font-size: 20px; line-height: 1.1; flex: none; }

.call-next {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.call-next-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--pink, #d6337f);
  color: #fff;
  font-size: 15px;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 12px 30px -12px rgba(214, 51, 127, 0.8);
  transition: transform 140ms ease, background 140ms ease;
}
.call-next-card:nth-child(2) { background: #2a3350; box-shadow: none; }
.call-next-card:hover { transform: translateY(-1px); }
.call-next-card > span:first-child { font-size: 28px; flex: none; }

.call-grownups {
  margin-top: 18px;
  padding: 4px 16px;
  border-radius: 16px;
  border: 1px solid rgba(217, 236, 255, 0.16);
  text-align: left;
}
.call-grownups summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: 14.5px;
  font-weight: 700;
  color: rgba(217, 236, 255, 0.9);
  cursor: pointer;
}
.call-grownups ul { margin: 0 0 12px; padding-left: 18px; font-size: 14px; line-height: 1.55; color: rgba(217, 236, 255, 0.8); }
.call-grownups li { margin-bottom: 8px; }
.call-grownups strong { color: #fff; }
.call-grownups a { color: var(--pink-bright, #ff5faf); }

@media (prefers-reduced-motion: reduce) {
  .call-dot, .call-bars i, .call-lag { animation: none !important; }
}

/**
 * **This page scrolls.** The globe's page is exactly one screen and never
 * scrolls, and the shared stylesheet says so; this one is longer than a
 * screen, so it is allowed to.
 */
html:has(body.call-page) { height: auto; overflow: auto; }
body.call-page { height: auto; overflow: visible; }
