/* ==========================================================
   xImmersion · Showcases stylesheet
   Covers all /showcases/ reading-mode pages and their
   shared Unity WebGL player components.
   ========================================================== */

:root {
  --brand-blue:        #1565C0;
  --brand-blue-deep:   #0D47A1;
  --brand-blue-bright: #90CAF9;

  --c-demos:      #3AA7FF;
  --c-solutions:  #FF834D;
  --c-blog:       #AD8BFF;
  --c-videos:     #57FF95;
  --c-showcases:  #EC4899;

  --bg-1:    #02060E;
  --paper:   #0B121F;
  --ink:     #F0F4F8;
  --ink-soft: #94A3B8;
  --line:    rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --status-green: #6EE7B7;
  --accent:  #FFD600;

  --hero-color:   #EC4899;
  --hero-color-2: #AD8BFF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

html, body {
  background: var(--bg-1);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(circle at 18% 22%, color-mix(in oklab, var(--hero-color) 14%, transparent), transparent 50%),
    radial-gradient(circle at 82% 68%, color-mix(in oklab, var(--hero-color-2) 12%, transparent), transparent 55%),
    var(--bg-1);
  min-height: 100vh;
}

/* ── Showcase eyebrow overrides ── */
.demo-eyebrow-section,
.demo-eyebrow-context {
  color: var(--c-showcases);
  text-decoration: none;
}
.demo-eyebrow-section:hover,
.demo-eyebrow-context:hover { color: var(--ink); }

/* ── Hero color overrides for showcase cards ── */
.demo-sample-card:hover {
  border-color: var(--c-showcases);
  box-shadow: 0 12px 40px rgba(236, 72, 153, 0.1);
}

.demo-sample-link { color: var(--c-showcases); }
.demo-sample-card:hover .demo-sample-link { color: var(--accent); }

/* ── Tag pill variant for full-page type ── */
.tag-showcase {
  background: rgba(236, 72, 153, 0.12);
  color: #F9A8D4;
  border: 1px solid rgba(236, 72, 153, 0.2);
}

/* ── Sidebar CTA in showcase pink ── */
.demo-sidebar-cta {
  background: var(--c-showcases);
  color: var(--bg-1);
}
.demo-sidebar-cta:hover {
  background: #be185d;
  color: #fff;
}

/* ── h2 accent color override ── */
.demo-content h2::before { background: var(--c-showcases) !important; }

/* ── "Open Full Experience" primary button ── */
.btn-primary {
  background: var(--c-showcases);
  color: var(--bg-1);
  border: none;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.25s ease, transform 0.2s ease;
}
.btn-primary:hover {
  background: #be185d;
  color: #fff;
  transform: translateY(-1px);
}


/* ==========================================================
   Shared showcase hero stack & Unity WebGL player
   (applies to all WebGL showcase pages)
   ========================================================== */

.showcase-hero-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

/* ── Base sample card ── */
.showcase-hero-stack .showcase-sample-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 18, 31, 0.6);
  text-decoration: none;
  color: #f0f4f8;
  transition: border-color 0.3s ease, transform 0.25s ease, box-shadow 0.3s ease;
  cursor: pointer;
}
.showcase-hero-stack .showcase-sample-card:hover {
  border-color: rgba(236, 72, 153, 0.65);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(236, 72, 153, 0.12);
  text-decoration: none;
}
.showcase-hero-stack .showcase-sample-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  background:
    radial-gradient(circle at 30% 40%, rgba(236, 72, 153, 0.1), transparent 65%),
    linear-gradient(160deg, rgba(11, 18, 31, 0.95), rgba(2, 6, 14, 1));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.showcase-hero-stack .showcase-sample-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0.88;
  transition: transform 0.45s ease, opacity 0.3s ease;
  display: block;
}
.showcase-hero-stack .showcase-sample-card:hover .showcase-sample-img {
  transform: scale(1.04);
  opacity: 1;
}
.showcase-hero-stack .showcase-sample-thumb::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(2, 6, 14, 0.65));
  pointer-events: none;
  z-index: 2;
}
.showcase-hero-stack .showcase-sample-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 3px 9px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  backdrop-filter: blur(8px);
}
.showcase-hero-stack .sample-tag-green {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.showcase-hero-stack .showcase-sample-hover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 14, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.showcase-hero-stack .showcase-sample-card:hover .showcase-sample-hover {
  opacity: 1;
}
.showcase-hero-stack .showcase-sample-hover .detail-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 214, 0, 0.92);
  box-shadow: 0 0 0 5px rgba(255, 214, 0, 0.14), 0 0 22px rgba(255, 214, 0, 0.38);
  position: relative;
}
.showcase-hero-stack .showcase-sample-hover .detail-play-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-40%, -50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #0b1020;
}
.showcase-hero-stack .showcase-sample-info {
  padding: 11px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.showcase-hero-stack .showcase-sample-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: #f0f4f8;
  line-height: 1.25;
}
.showcase-hero-stack .showcase-sample-desc {
  font-size: 12px;
  line-height: 1.45;
  color: #94a3b8;
}
.showcase-hero-stack .showcase-sample-link {
  margin-top: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
  color: #ec4899;
  font-weight: 500;
  transition: color 0.2s ease;
}
.showcase-hero-stack .showcase-sample-card:hover .showcase-sample-link {
  color: #ffd600;
}

/* ── Wide LMS showcase card ── */
.showcase-sample-card--wide-showcase {
  flex-direction: row;
  align-items: stretch;
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.25), 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: lms-card-pulse 2.8s ease-in-out infinite;
}
@keyframes lms-card-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.2), 0 8px 32px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 0 2px rgba(58, 167, 255, 0.45), 0 14px 48px rgba(58, 167, 255, 0.12); }
}
.showcase-sample-card--wide-showcase .showcase-sample-thumb {
  flex: 1.15;
  min-height: 200px;
  aspect-ratio: auto;
}
.showcase-sample-card--wide-showcase .showcase-sample-info {
  flex: 0.85;
  max-width: 380px;
  justify-content: center;
  padding: 18px 20px;
  border-left: 1px solid var(--line-strong);
}
.showcase-sample-cta-band {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 14px 16px 16px;
  background: linear-gradient(transparent, rgba(2, 6, 14, 0.92));
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: none;
}
.showcase-sample-cta-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a5f3fc;
}
.showcase-sample-cta-title {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #f8fafc;
  line-height: 1.25;
}
.showcase-sample-cta-sub {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.88);
}
.showcase-sample-card--wide-showcase .showcase-sample-hover--persistent-hint {
  opacity: 0.45;
}
.showcase-sample-card--wide-showcase:hover .showcase-sample-hover--persistent-hint {
  opacity: 1;
}
.showcase-sample-card--wide-showcase .showcase-sample-desc {
  -webkit-line-clamp: unset !important;
  display: block !important;
  overflow: visible;
  max-height: none;
  font-size: 13px;
  line-height: 1.5;
}

/* ── Inline Unity player (with manual play button) ── */
.animal-unity-inline {
  width: 100%;
  padding: 4px 0 8px;
}
.animal-unity-lead {
  margin: 0 0 6px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.animal-unity-lead-sub {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 70ch;
}
.animal-unity-canvas-shell {
  position: relative;
  width: 100%;
  max-width: min(1100px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #070d18;
}
.animal-unity-preview {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 2;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.animal-unity-preview.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.animal-unity-scrim {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 0;
}
.animal-unity-play-main {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(255, 214, 0, 0.95), #f59e0b);
  box-shadow:
    0 0 0 8px rgba(255, 214, 0, 0.12),
    0 0 48px rgba(255, 214, 0, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.animal-unity-play-main:hover:not(:disabled) {
  transform: scale(1.06);
  filter: brightness(1.05);
}
.animal-unity-play-main:disabled {
  cursor: default;
  opacity: 0.65;
  transform: none;
}
.animal-unity-play-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  animation: play-ring-pulse 2s ease-out infinite;
}
@keyframes play-ring-pulse {
  0% { transform: scale(1); opacity: 0.9; }
  100% { transform: scale(1.35); opacity: 0; }
}
.animal-unity-play-triangle {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 18px 0 18px 30px;
  border-color: transparent transparent transparent #0b1020;
  margin-left: 8px;
}
.animal-unity-preview-hint {
  position: relative;
  z-index: 2;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(248, 250, 252, 0.92);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.animal-unity-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.animal-unity-canvas.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.animal-unity-progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 10px 14px 12px;
  background: linear-gradient(transparent, rgba(2, 6, 14, 0.88));
  display: none;
}
.animal-unity-progress-wrap.is-active {
  display: block;
}
.animal-unity-progress-bar {
  height: 6px;
  border-radius: 3px;
  width: 0%;
  background: linear-gradient(90deg, #7b5ea7, #3aa7ff);
  transition: width 0.12s ease-out;
}

/* ── Auto-loading Unity player (no play button; used for landmark explorer) ── */
.unity-autoload-wrap {
  width: 100%;
  padding: 4px 0 0;
}
.unity-autoload-shell {
  position: relative;
  width: 100%;
  max-width: min(1100px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #070d18;
}
.unity-autoload-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #070d18;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.unity-autoload-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.unity-autoload-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--c-showcases);
  border-radius: 50%;
  animation: unity-spin 0.9s linear infinite;
}
@keyframes unity-spin { to { transform: rotate(360deg); } }
.unity-autoload-label {
  font-size: 13px;
  color: rgba(240, 244, 248, 0.7);
  letter-spacing: 0.04em;
}
.unity-autoload-track {
  width: 180px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.unity-autoload-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--c-showcases), #3aa7ff);
  border-radius: 2px;
  transition: width 0.12s ease-out;
}
.unity-autoload-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.unity-autoload-canvas.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Tech tags row (below WebGL player) ── */
.showcase-tech-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.showcase-tech-tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  background: rgba(58, 167, 255, 0.12);
  color: #90caf9;
  border: 1px solid rgba(58, 167, 255, 0.25);
  letter-spacing: 0.03em;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .showcase-sample-card--wide-showcase {
    flex-direction: column;
  }
  .showcase-sample-card--wide-showcase .showcase-sample-info {
    max-width: none;
    border-left: none;
    border-top: 1px solid var(--line-strong);
  }
  .animal-unity-play-main {
    width: 80px;
    height: 80px;
  }
  .animal-unity-play-triangle {
    border-width: 14px 0 14px 24px;
    margin-left: 6px;
  }
}

/* ==========================================================
   LMS Panel Card — compact always-row banner
   Used in both panel view (global.js heroInner) and reading mode.
   Never collapses to column so it stays compact in narrow panels.
   ========================================================== */
.lms-panel-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 160px;
  max-height: 200px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(11, 18, 31, 0.7);
  text-decoration: none;
  color: var(--ink);
  animation: lms-card-pulse 2.8s ease-in-out infinite;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}
.lms-panel-card:hover {
  border-color: rgba(236, 72, 153, 0.6);
  box-shadow: 0 8px 32px rgba(236, 72, 153, 0.15);
  transform: translateY(-2px);
  text-decoration: none;
}
.lms-panel-thumb {
  flex: 0 0 60%;
  position: relative;
  overflow: hidden;
  background: #0c1624;
}
.lms-panel-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, transparent 60%, rgba(11,18,31,0.5) 100%);
  pointer-events: none;
  z-index: 1;
}
.lms-panel-info {
  flex: 0 0 40%;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}
.lms-panel-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6ee7b7;
}
.lms-panel-title {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.lms-panel-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.lms-panel-pills span {
  padding: 2px 7px;
  background: rgba(58, 167, 255, 0.12);
  color: #90caf9;
  border: 1px solid rgba(58, 167, 255, 0.2);
  border-radius: 4px;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.lms-panel-sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.4;
}
.lms-panel-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--c-showcases);
  font-weight: 500;
  margin-top: 2px;
  transition: color 0.2s;
}
.lms-panel-card:hover .lms-panel-link { color: var(--accent); }
