/* public/css/landingDemo.css — the landing page's playable demos and its screenshot zoom (/, linked by that route
   beside landingRooms.css, which lays the rooms out). These rules are older than the rooms: they came out of the
   old landing.css whole on 2026-11-10, which is why their classes are still lp3-*.
     · the demo game's card      (.lp3-game — the rainbow border round Fracture and Vowel Pop — and the two animated
                                  pills on its top edge, .lp3-game__hint / __badge, with the first tray tile's nudge)
     · the screenshot zoom       (.lp3-zoom — views/partials/landing/zoom.hbs opens it for any [data-zoom])
     · the demo's completion     (.lp3-gameComplete — drawn by public/js/try/fracture.js and vowel-pop.js) */

/* Rainbow glimmer border — conic gradient rotating slowly around the card.
   Technique: layer two backgrounds via background-clip. The inner layer
   (padding-box) is a solid card color; the outer layer (border-box) is the
   conic rainbow. A transparent border exposes only the conic layer, so the
   rainbow appears as the border — NOT a tint on the card interior.
   Uses @property so the angle animates smoothly. Graceful fallback on
   older browsers: static rainbow border. */
@property --lp3-gameAngle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.lp3-game {
  width: 100%;
  margin: 0;
  position: relative;
  background: transparent;
}

.lp3-game .ui-sheet__card {
  padding: 16px 14px;
  border-radius: 20px;
  border: 2.5px solid transparent;
  background:
    linear-gradient(var(--surface, #fff), var(--surface, #fff)) padding-box,
    conic-gradient(
      from var(--lp3-gameAngle),
      #ff7ab6 0deg,
      #8b5cff 60deg,
      #18bfff 120deg,
      #6bcb77 180deg,
      #ffd93d 240deg,
      #ff8c42 300deg,
      #ff7ab6 360deg
    ) border-box;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
  animation: lp3-gameBorderSpin 5s linear infinite;
}

@keyframes lp3-gameBorderSpin {
  to { --lp3-gameAngle: 360deg; }
}

/* "Drag fractions onto the ?'s" hint — pinned to top-left,
   bounces on a different rhythm than the right badge so they don't sync. */
.lp3-game__hint {
  position: absolute;
  top: -14px;
  left: 18px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  background: linear-gradient(135deg, #ff7ab6, #8b5cff);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(139, 92, 255, 0.35);
  pointer-events: none;
  white-space: nowrap;
  animation: lp3-hintWiggle 2.2s ease-in-out infinite;
  transform-origin: center;
}

.lp3-game__hintQmark {
  display: inline-block;
  font-size: 15px;
  font-weight: 900;
  animation: lp3-hintQmark 1.2s ease-in-out infinite;
}

@keyframes lp3-hintWiggle {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-4px) rotate(2deg); }
}

@keyframes lp3-hintQmark {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

/* "Play me 👇" badge — pinned to the top-right, bounces to attract attention */
.lp3-game__badge {
  position: absolute;
  top: -14px;
  right: 18px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #111;
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  white-space: nowrap;
  animation: lp3-badgeBounce 1.4s ease-in-out infinite;
  transform-origin: center;
}

[data-theme="dark"] .lp3-game__badge {
  background: #fff;
  color: #111;
  box-shadow: 0 6px 16px rgba(255, 255, 255, 0.18);
}

.lp3-game__badgeArrow {
  display: inline-block;
  animation: lp3-badgeArrow 0.9s ease-in-out infinite;
  font-size: 14px;
}

@keyframes lp3-badgeBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-5px) rotate(3deg); }
}

@keyframes lp3-badgeArrow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* Gentle attention wiggle on the first tray tile — subtle reminder that
   the tiles are interactive. Stops via :hover/:active/.is-dragging. */
.mg-fr__tray .mg-fr__tile:nth-child(1) {
  animation: lp3-tileNudge 4.5s ease-in-out infinite;
  animation-delay: 2s;
}

.mg-fr__tray .mg-fr__tile:nth-child(1):hover,
.mg-fr__tray .mg-fr__tile:nth-child(1):active,
.mg-fr__tray .mg-fr__tile.is-dragging {
  animation: none;
}

@keyframes lp3-tileNudge {
  0%, 88%, 100% { transform: scale(1) rotate(0deg); }
  91%           { transform: scale(1.08) rotate(-4deg); }
  94%           { transform: scale(1.08) rotate(4deg); }
  97%           { transform: scale(1.08) rotate(-2deg); }
}

/* Vowel Pop hint variant — warmer yellow/orange wash so the two game
   cards feel like siblings but aren't identical. */
.lp3-game__hint--vp {
  background: linear-gradient(135deg, #ff8c42, #ffd93d);
  color: #3d2100;
  box-shadow: 0 6px 16px rgba(255, 140, 66, 0.35);
}

/* ============================================================
   Zoom modal — fullscreen "investigate" view for any showcase card.
   Opens with a click on a [data-zoom] card, populates from its
   data-zoom-* attributes. Big screenshot + title + blurb only seen
   here. Single instance shared across the page.
============================================================ */
/* Lock body scroll only — never lock <html>, which would discard the
   page's scroll offset and snap to top when the modal opens. */
html.lp3-zoom-open body {
  overflow: hidden;
}

.lp3-zoom {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.lp3-zoom[hidden] {
  display: none;
}

.lp3-zoom__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.lp3-zoom.is-visible .lp3-zoom__backdrop {
  opacity: 1;
}

.lp3-zoom__card {
  position: relative;
  background: var(--surface, #fff);
  color: var(--app-fg, #111);
  border-radius: 22px;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transition: opacity 220ms ease, transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lp3-zoom.is-visible .lp3-zoom__card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.lp3-zoom__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  appearance: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 160ms ease, transform 160ms ease;
}

.lp3-zoom__close:hover {
  background: rgba(0, 0, 0, 0.78);
  transform: scale(1.08);
}

.lp3-zoom__shot {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

.lp3-zoom__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 64px;
  color: var(--gcol, #18bfff);
  opacity: 0.55;
}

.lp3-zoom__img {
  position: absolute;
  inset: 4%;
  width: 92%;
  height: 92%;
  object-fit: contain;
  display: block;
}

.lp3-zoom__body {
  padding: 22px 26px 26px;
  overflow-y: auto;
}

.lp3-zoom__title {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.3px;
  line-height: 1.15;
}

.lp3-zoom__blurb {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.88;
}

@media (max-width: 600px) {
  .lp3-zoom {
    padding: 10px;
  }
  .lp3-zoom__shot {
    aspect-ratio: 4 / 3;
  }
  .lp3-zoom__title {
    font-size: 22px;
  }
  .lp3-zoom__body {
    padding: 18px 20px 22px;
  }
}

/* ============================================================
   INLINE DEMO COMPLETION — overlay on the game card after the
   last round. Replaces the old #tryCompleteModal so completion
   doesn't hijack the page. Forward link pushes the reader to the
   next demo or the games showcase instead of pitching a trial.
============================================================ */
.lp3-gameComplete {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 16, 32, 0.88);
  background: linear-gradient(180deg, rgba(20, 24, 44, 0.92), rgba(12, 16, 32, 0.94));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: inherit;
  z-index: 10;
  animation: lp3-gameCompleteIn 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  padding: 20px;
}

.lp3-gameComplete__inner {
  text-align: center;
  max-width: 320px;
  width: 100%;
}

.lp3-gameComplete__emoji {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 10px;
}

.lp3-gameComplete__title {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.lp3-gameComplete__sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
  line-height: 1.45;
  margin: 0 0 22px;
}

.lp3-gameComplete__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lp3-gameComplete__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  min-width: 220px;
  background: #fff;
  color: #111;
  border: none;
  border-radius: 999px;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.lp3-gameComplete__next:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

.lp3-gameComplete__next i {
  font-size: 13px;
  animation: lp3-gameCompleteBob 1.4s ease-in-out infinite;
}

.lp3-gameComplete__again {
  padding: 8px 18px;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  border: none;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

.lp3-gameComplete__again:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.8);
}

@keyframes lp3-gameCompleteIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes lp3-gameCompleteBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .lp3-gameComplete { animation: none; }
  .lp3-gameComplete__next i { animation: none; }
}
