/* ==========================================================================
   Quizora AI — shared components used by more than one page
   (stat card, accuracy ring, countdown, status pill, stage illustration)
   ========================================================================== */

/* ---------- Stat card (Figma Component 25 / 31) ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat {
  border-radius: var(--radius-lg); padding: 28px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  transition: transform .25s var(--ease-out);
}
a.stat:hover { transform: translateY(-4px); }
a.stat:hover .link-brand img { transform: translateX(4px); }
.stat__copy { display: flex; flex-direction: column; gap: 8px; min-height: 73px; }
.stat__row { width: 100%; display: flex; align-items: center; justify-content: space-between; }

@container content (max-width: 900px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stats > :first-child { grid-column: 1 / -1; }
}
@container content (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .stat { padding: 24px; }
}

/* ---------- Accuracy ring (52px) — filled by Quizora.fillRing() ---------- */
.acc-ring { transform: rotate(-90deg); }
.acc-ring__arc { transition: stroke-dashoffset 1.6s var(--ease-out); }

/* ---------- Countdown — driven by Quizora.startCountdown() ---------- */
.countdown { display: flex; align-items: center; gap: 6px; }
.countdown__sep { font-family: var(--f-display); font-weight: 700; font-size: 18px; color: var(--accent); animation: dotPulse 1s steps(1) infinite; }
.countdown__cell {
  width: 48px; height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-subtle);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.countdown__value { font-family: var(--f-display); font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums; }
.countdown__value.is-tick { animation: tick .35s var(--ease-out); }
.countdown__unit { font-family: var(--f-mono); font-weight: 500; font-size: 8px; letter-spacing: .8px; color: var(--muted); }
@keyframes tick { from { transform: translateY(-6px); opacity: 0; } }

/* ---------- Status pill (Figma Component 29) ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius-pill);
  font-family: var(--f-label); font-size: 11px; line-height: 1; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill--success  { color: #5ee0a8; background: #0d2e25; }
.status-pill--progress { color: var(--accent); background: var(--bg-brand-soft); }
.status-pill--progress::before { animation: dotPulse 1.6s ease-in-out infinite; }

/* ---------- Stage illustration (Figma Component 35) — 480×220 artboard ----------
   Markup is injected by shell.js into any [data-stage] element; pages position/scale it. */
.stage { position: relative; width: 480px; height: 220px; }
.stage > *, .stage__layer > *, .stage__pillar > * { position: absolute; }
.stage__layer { inset: 0; overflow: hidden; }
.stage__layer--blur5 { filter: blur(5px); }
.stage__layer--blur3 { filter: blur(3px); }

.stage__spot { transform-origin: 50% 0; animation: spot 5s ease-in-out infinite alternate; }
.stage__spot--c { left: 150px; top: 0; width: 180px; height: 190px; }
.stage__spot--l { left: 70px;  top: 0; width: 80px;  height: 180px; animation-delay: -1.7s; }
.stage__spot--r { left: 330px; top: 0; width: 82px;  height: 180px; animation-delay: -3.4s; }

.stage__floor      { left: 30px;    top: 158px;   width: 420px; height: 60px; animation: breathe 4s ease-in-out infinite; }
.stage__ring-dash  { left: 49.5px;  top: 161.5px; width: 381px; height: 49px; animation: breathe 4s ease-in-out -2s infinite; }
.stage__ring-inner { left: 119.5px; top: 171.5px; width: 241px; height: 29px; animation: pulse 4s ease-in-out infinite; }

.stage__orbit { left: 87.8px; top: 73.4px; width: 304.3px; height: 93.3px; display: grid; place-items: center; }
.stage__orbit img { position: static; width: 301px; height: 53px; transform: rotate(-8deg); animation: stageOrbit 6s ease-in-out infinite; }
@keyframes stageOrbit { 50% { transform: rotate(-11deg) scale(1.03); } }

.stage__pillar { inset: 0; --amp: -4px; animation: float 4s ease-in-out infinite; }
.stage__pillar--ai     { animation-delay: -1.33s; }
.stage__pillar--crypto { animation-delay: -2.67s; }
.stage__pillar--ai .sp-l       { left: 88px;    top: 130px;   width: 11.1px; height: 68px; }
.stage__pillar--ai .sp-f       { left: 99px;    top: 138px;   width: 22px;   height: 60px; }
.stage__pillar--ai .sp-r       { left: 121px;   top: 130px;   width: 11.1px; height: 68px; }
.stage__pillar--ai .sp-top     { left: 87.15px; top: 121.5px; width: 45.7px; height: 17px; }
.stage__pillar--crypto .sp-l   { left: 350px;   top: 142px;   width: 10px;   height: 56px; }
.stage__pillar--crypto .sp-f   { left: 360px;   top: 150px;   width: 20px;   height: 48px; }
.stage__pillar--crypto .sp-r   { left: 380px;   top: 142px;   width: 10px;   height: 56px; }
.stage__pillar--crypto .sp-top { left: 349.2px; top: 133.5px; width: 41.6px; height: 17px; }
.stage__pillar--center .sp-l   { left: 210px;   top: 96px;    width: 15px;   height: 104px; }
.stage__pillar--center .sp-f   { left: 225px;   top: 104px;   width: 30px;   height: 96px; }
.stage__pillar--center .sp-r   { left: 255px;   top: 96px;    width: 15px;   height: 104px; }
.stage__pillar--center .sp-top { left: 208.9px; top: 87.5px;  width: 62.1px; height: 17px; }

.stage__icon { width: 18px; height: 18px; --amp: -8px; animation: float 4s ease-in-out infinite; }
.stage__icon--ai     { left: 101px; top: 96px;  animation-delay: -1.33s; }
.stage__icon--crypto { left: 361px; top: 110px; animation-delay: -2.67s; }

.stage__star--1 { left: 58.2px;  top: 38.2px;  width: 3.6px; height: 3.6px; }
.stage__star--2 { left: 178.8px; top: 20.8px;  width: 2.4px; height: 2.4px; animation-delay: -.5s; }
.stage__star--3 { left: 298.2px; top: 48.2px;  width: 3.6px; height: 3.6px; animation-delay: -1s; }
.stage__star--4 { left: 428.8px; top: 28.8px;  width: 2.4px; height: 2.4px; animation-delay: -1.5s; }
.stage__star--5 { left: 198.2px; top: 148.2px; width: 3.6px; height: 3.6px; animation-delay: -.8s; }
.stage__star--6 { left: 298.8px; top: 118.8px; width: 2.4px; height: 2.4px; animation-delay: -1.2s; }

.stage__logo { left: 220px; top: 40px; width: 40px; height: 40px; animation: stageLogo 4s ease-in-out infinite; }
.stage__logo img { position: absolute; left: -24px; top: -24px; width: 88px; height: 88px; }
@keyframes stageLogo { 50% { transform: translateY(-9px); filter: drop-shadow(0 0 10px rgba(103,232,249,.6)); } }
