/* ── Landing page ────────────────────────────────────────────────────────── */

.lp-layout {
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  align-items: center;
}

.qa-motion {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}

.qa-motion__svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 18px 34px rgba(124, 58, 237, 0.16));
  overflow: visible;
}

.qa-motion__fill-white { fill: #fff; }
.qa-motion__fill-card { fill: url(#quizCardFill); }
.qa-motion__fill-card-shadow { fill: #dbeafe; opacity: 0.55; }
.qa-motion__fill-check { fill: #22c55e; }
.qa-motion__fill-muted { fill: #cbd5e1; }
.qa-motion__fill-muted-soft { fill: #e2e8f0; }
.qa-motion__fill-warm { fill: #fff7ed; }
.qa-motion__fill-red { fill: #ef4444; }
.qa-motion__fill-blue { fill: #3b82f6; }
.qa-motion__fill-amber { fill: #f59e0b; }
.qa-motion__fill-green { fill: #22c55e; }
.qa-motion__fill-purple { fill: #8b5cf6; }
.qa-motion__fill-teal { fill: #14b8a6; }
.qa-motion__fill-pink { fill: #ec4899; }
.qa-motion__fill-indigo { fill: #6366f1; }
.qa-motion__fill-emerald { fill: #10b981; }
.qa-motion__fill-orange { fill: #ff8a00; }
.qa-motion__fill-orange-strong { fill: #f97316; }
.qa-motion__fill-trophy-bg { fill: #fef3c7; }
.qa-motion__opacity-90 { opacity: 0.9; }
.qa-motion__opacity-86 { opacity: 0.86; }
.qa-motion__opacity-82 { opacity: 0.82; }
.qa-motion__opacity-28 { opacity: 0.28; }
.qa-motion__stroke-white {
  fill: none;
  stroke: #fff;
}
.qa-motion__stroke-muted {
  fill: none;
  stroke: #cbd5e1;
}
.qa-motion__stroke-card {
  stroke: #dbeafe;
}
.qa-motion__stroke-amber {
  fill: none;
  stroke: #f59e0b;
}
.qa-motion__stroke-orange-strong {
  fill: none;
  stroke: #f97316;
}
.qa-motion__stroke-round {
  stroke-linecap: round;
}
.qa-motion__stroke-join {
  stroke-linejoin: round;
}
.qa-motion__stroke-width-4 { stroke-width: 4; }
.qa-motion__stroke-width-6 { stroke-width: 6; }
.qa-motion__stroke-width-7 { stroke-width: 7; }
.qa-motion__stroke-width-8 { stroke-width: 8; }
.qa-motion__card-gradient-start { stop-color: #fff; }
.qa-motion__card-gradient-end { stop-color: #f8fafc; }
.qa-motion__pin-text {
  fill: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 27px;
  font-weight: 900;
}

.qa-motion__asset {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  filter: drop-shadow(0 18px 34px rgba(124, 58, 237, 0.16));
}

.qa-motion--join,
.qa-motion--exam {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.qa-motion--join {
  width: min(56vw, 760px);
  max-width: 760px;
}

.qa-motion--exam {
  width: min(54vw, 740px);
  max-width: 740px;
}

.qa-motion-split {
  max-width: 1160px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  align-items: center;
  column-gap: clamp(2rem, 6vw, 5rem);
}

.qa-motion-split--join,
.qa-motion-split--exam {
  grid-template-columns: minmax(0, 0.92fr) minmax(460px, 1.08fr);
  column-gap: clamp(0.5rem, 1.8vw, 1.5rem);
}

.qa-motion-split--exam {
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  min-height: clamp(380px, 58vh, 500px);
}

.qa-motion-split--exam .qa-motion-copy,
.qa-motion-split--exam .qa-motion-visual {
  min-height: clamp(320px, 44vh, 420px);
}

.qa-motion-split--exam .qa-motion-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.qa-motion-split--exam .qa-motion--exam {
  width: min(39vw, 500px);
  max-width: 500px;
}

.qa-motion-split--exam .qa-motion__asset {
  width: 100%;
  max-height: none;
  object-fit: contain;
}

.qa-motion-copy {
  max-width: 520px;
  width: 100%;
}

.qa-motion-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.qa-motion__quiz-card {
  transform-box: fill-box;
  transform-origin: center;
  animation: qa-motion-card 4s ease-in-out infinite;
}

.qa-motion__answer {
  transform-box: fill-box;
  transform-origin: center;
  animation: qa-motion-answer 3.6s ease-in-out infinite;
}

.qa-motion__answer--two { animation-delay: 0.2s; }
.qa-motion__answer--three { animation-delay: 0.4s; }
.qa-motion__answer--four { animation-delay: 0.6s; }

.qa-motion__trophy {
  transform-box: fill-box;
  transform-origin: center;
  animation: qa-motion-trophy 3.4s ease-in-out infinite;
}

.qa-motion__pin-bubble {
  transform-box: fill-box;
  transform-origin: center;
  animation: qa-motion-pin 3.5s ease-in-out infinite;
}

.qa-motion__live-dots {
  transform-box: fill-box;
  transform-origin: center;
  animation: qa-motion-live-dots 2.6s ease-in-out infinite;
}

.qa-motion__sparkles--one {
  animation: qa-motion-confetti 3.4s ease-in-out infinite;
}

.qa-motion__sparkles--two {
  animation: qa-motion-confetti 3.4s ease-in-out infinite 0.7s;
}

@keyframes qa-motion-card {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(-0.7deg); }
}

@keyframes qa-motion-answer {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  50% { transform: scale(1.045); filter: brightness(1.08); }
}

@keyframes qa-motion-trophy {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

@keyframes qa-motion-pin {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes qa-motion-live-dots {
  0%, 100% { transform: translateY(0); opacity: 0.78; }
  50% { transform: translateY(-5px); opacity: 1; }
}

@keyframes qa-motion-confetti {
  0%, 100% { opacity: 0.45; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-7px); }
}

/* Headline — the dominant element */
.lp-title {
  font-size: clamp(3.25rem, 9vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  margin: 0 0 1.5rem;
  line-height: 0.95;
}

/* Subtitle */
.lp-sub {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0 0 2rem;
  line-height: 1.55;
  max-width: 380px;
}
.lp-sub strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── PIN form — primary action ───────────────────────────────────────────── */
.lp-pin-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 360px;
}

.lp-pin-input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  font-size: 1.75rem;
  font-weight: 800;
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-right: none;
  border-radius: 10px 0 0 10px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
  -webkit-font-smoothing: antialiased;
}
.lp-pin-input::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.lp-name-input {
  font-family: inherit;
  letter-spacing: 0;
  text-transform: none;
}
.lp-name-input::placeholder {
  letter-spacing: 0;
  text-transform: none;
}
.lp-pin-input:focus {
  border-color: var(--primary);
}

.lp-pin-btn {
  padding: 0 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--primary);
  border-radius: 0 10px 10px 0;
  cursor: pointer;
  transition: filter 0.15s, transform 0.1s;
  white-space: nowrap;
  flex-shrink: 0;
}
.lp-pin-btn:hover  { filter: brightness(1.12); }
.lp-pin-btn:active { transform: scale(0.97); }

/* ── Secondary links ─────────────────────────────────────────────────────── */
.lp-secondary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
}
.lp-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.12s;
}
.lp-link:hover { color: var(--text-primary); }
/* Live status block */
.lp-status-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--bg-elevated);
}
.lp-status-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.lp-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  flex-shrink: 0;
}
.lp-status-dot--live {
  background: #10b981;
  opacity: 1;
  box-shadow: 0 0 0 0 rgba(16,185,129,.6);
  animation: lp-blink 2s ease-in-out infinite;
}
@keyframes lp-blink {
  0%   { box-shadow: 0 0 0 0   rgba(16,185,129,.6); }
  60%  { box-shadow: 0 0 0 6px rgba(16,185,129,0);  }
  100% { box-shadow: 0 0 0 0   rgba(16,185,129,0);  }
}
.lp-status-icon { font-size: 0.78rem; }

/* Winners block */
.lp-winners {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  background: var(--bg-elevated);
}
.lp-winners__title {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.lp-winners__list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.lp-winner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
}
.lp-winner__rank {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
}
.lp-winner--first .lp-winner__rank {
  background: rgba(245,158,11,.15);
  border-color: rgba(245,158,11,.4);
  color: #f59e0b;
}
.lp-winner__name {
  flex: 1;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lp-winner__score {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* Steps */
@media (max-width:767px){
  .lp-steps {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }
}

.lp-step {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: 0.78rem;
  color: var(--text-primary);
  line-height: 1.4;
}
.lp-step__n {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--primary);
  opacity: 0.7;
  flex-shrink: 0;
}

/* ── Theme: bright-playful overrides ─────────────────────────────────────── */
[data-qa-theme="bright-playful"] .lp-title { color: #1a0040; }
[data-qa-theme="bright-playful"] .lp-pin-input {
  background: #fff;
  border-color: rgba(124,58,237,.2);
  color: #1a0040;
}
[data-qa-theme="bright-playful"] .lp-pin-input:focus { border-color: var(--primary); }
[data-qa-theme="bright-playful"] .qa-motion__svg {
  filter: drop-shadow(0 18px 30px rgba(6, 182, 212, 0.18));
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .lp-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .qa-motion--join,
  .qa-motion--exam {
    width: 100%;
    max-width: min(86vw, 420px);
  }
  .qa-motion--join {
    max-width: min(92vw, 480px);
  }
  .qa-motion--exam {
    max-width: min(92vw, 480px);
  }
  .lp-hero-art {
    min-height: 210px;
    margin: 0.25rem 0 1rem;
  }
  .qa-motion-split {
    grid-template-columns: 1fr;
    row-gap: 1.25rem;
    max-width: 560px !important;
    text-align: left;
  }
  .qa-motion-split--join,
  .qa-motion-split--exam {
    row-gap: 0.75rem;
  }
  .qa-motion-split--exam {
    min-height: 0;
  }
  .qa-motion-split--exam .qa-motion-copy,
  .qa-motion-split--exam .qa-motion-visual {
    min-height: 0;
  }
  .qa-motion-split--exam .qa-motion--exam {
    width: min(88vw, 420px);
  }
  .qa-motion-split--exam .qa-motion__asset {
    width: 100%;
    max-height: 300px;
  }
  .qa-motion-visual {
    order: -1;
  }
}

@media (max-width: 760px) {
  .lp-title {
    font-size: clamp(4rem, 20vw, 5.5rem);
    line-height: 0.95;
  }
}

@media (max-width: 420px) {
  .lp-root  { padding: 2rem 1.25rem 3rem; }
  .qa-motion--hero,
  .qa-motion--join,
  .qa-motion--exam {
    width: min(84vw, 300px);
  }
  .lp-hero-art { min-height: 170px; }
}

@media (max-width: 575px) {
  .lp-title {
    font-size: clamp(1.75rem, 14vw, 4rem);
    margin-bottom: 1.1rem;
  }
}

/* CAROUSEL */
.carousel-inner {
  padding: 0.5rem;
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(1, 1fr);
  grid-auto-columns: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-inner::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  display: block;
  width: 100%;
  margin: 0.5rem 0;
}

.carousel-item .card {
  margin: 0 0.2rem;
}

@media (prefers-reduced-motion: reduce) {
  .qa-motion__quiz-card,
  .qa-motion__answer,
  .qa-motion__trophy,
  .qa-motion__pin-bubble,
  .qa-motion__live-dots,
  .qa-motion__sparkles--one,
  .qa-motion__sparkles--two {
    animation: none;
  }
}
