/* ============================================
   E-Ranyx — 展示專區 (Demo / Showcase) Page
   依主頁設計系統 (css/style.css) 延伸
   ============================================ */

html.page-no-snap {
  scroll-snap-type: none !important;
}

/* ---------- HERO ---------- */
.demo-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* 科技感網格背景（疊在數據流之上，更淡） */
.demo-hero-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(160, 114, 230, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 114, 230, 0.05) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 30%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 42%, #000 30%, transparent 72%);
}

/* 紫色數據流 Canvas */
.demo-datastream {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.demo-hero-glow {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 760px;
  height: 760px;
  max-width: 120vw;
  background: radial-gradient(circle, rgba(124, 69, 212, 0.25) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.demo-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: min(760px, calc(100% - 300px));
  margin: 0 auto;
}

.demo-hero .section-label {
  justify-content: center;
}

.demo-hero-title {
  font-family: var(--font-primary);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.18;
  margin-bottom: var(--space-lg);
}

.demo-hero-title .highlight {
  background: linear-gradient(120deg, var(--purple-300), var(--accent-gold));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--purple-300);
  text-shadow: none;
  filter: none;
}

.demo-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--purple-200);
  max-width: 640px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.9;
  text-shadow: 0 2px 16px rgba(11, 6, 21, 0.75);
}

.demo-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* 向下探索引導（圓形 Icon） */
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 4;
  color: var(--purple-100);
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.hero-scroll-cue:hover {
  color: var(--white);
}

.hero-scroll-cue.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
}

.hero-scroll-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: rgba(34, 16, 64, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  animation: scrollIconBounce 2s ease-in-out infinite;
  transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}

.hero-scroll-cue:hover .hero-scroll-icon {
  border-color: rgba(160, 114, 230, 0.7);
  background: rgba(58, 27, 107, 0.65);
  box-shadow: 0 6px 20px rgba(124, 69, 212, 0.25);
}

@keyframes scrollIconBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-scroll-icon {
    animation: none;
  }
}

/* ---------- CAPABILITIES (replaces Selected Works) ---------- */
.showcase-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.showcase-header .section-label {
  justify-content: center;
}

.showcase-header .section-subtitle {
  margin: 0 auto;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.capability-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.5rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-decoration: none;
  transition: border-color var(--transition-base), transform var(--transition-base), background var(--transition-base);
  min-height: 100%;
}

.capability-card:hover {
  border-color: rgba(160, 114, 230, 0.5);
  background: rgba(124, 69, 212, 0.12);
  transform: translateY(-3px);
  color: var(--white);
}

.capability-index {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-gold, #E8C872);
}

.capability-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}

.capability-text {
  margin: 0;
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--purple-200);
}

.capability-action {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple-100);
}

.capability-card:hover .capability-action {
  color: var(--white);
}

.capabilities-cta {
  margin-top: var(--space-2xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.capabilities-cta p {
  margin: 0;
  color: var(--purple-200);
  font-size: 0.98rem;
}

@media (max-width: 1100px) {
  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .capabilities-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- LEGACY BENTO (unused; kept for safety) ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 1.25rem;
  align-items: stretch;
}

.bento-item {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

.bento-item:hover {
  transform: translateY(-6px);
  border-color: rgba(160, 114, 230, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

/* 卡片視覺區 */
.bento-visual {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  overflow: hidden;
}

.bento-glyph {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 1px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
  transition: transform var(--transition-spring);
}

.bento-item:hover .bento-glyph {
  transform: scale(1.12);
}

.visual-a {
  background: linear-gradient(135deg, #3A1B6B, #7C45D4);
}

.visual-b {
  background: linear-gradient(135deg, #221040, #552799);
}

.visual-c {
  background: linear-gradient(135deg, #1B2A6B, #5BC0BE);
}

.visual-d {
  background: linear-gradient(135deg, #2A1140, #A072E6);
}

/* 卡片文字區 */
.bento-body {
  padding: 1.25rem 1.4rem 1.4rem;
}

.bento-kicker {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  margin-bottom: 0.5rem;
}

.bento-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
}

.bento-text {
  font-size: 0.9rem;
  color: var(--purple-200);
  line-height: 1.7;
  margin-bottom: 0.85rem;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.bento-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple-300);
  transition: color var(--transition-base), gap var(--transition-base);
}

.bento-item:hover .bento-link {
  color: var(--white);
}

.bento-link span {
  transition: margin var(--transition-base);
}

.bento-item:hover .bento-link span {
  margin-left: 4px;
}

/* 特殊版型 */
.bento-feature {
  grid-column: span 2;
  grid-row: span 2;
}

.bento-feature .bento-visual {
  min-height: 180px;
  flex: 1.2;
}

.bento-feature .bento-glyph {
  font-size: 4rem;
}

.bento-wide {
  grid-column: span 2;
  flex-direction: row;
}

.bento-wide .bento-visual {
  flex: 0 0 42%;
  min-height: 100%;
  min-width: 0;
}

.bento-wide .bento-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

/* 數據卡 */
.bento-stat {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, rgba(58, 27, 107, 0.5), rgba(20, 10, 35, 0.35));
  cursor: default;
}

.bento-stat:hover {
  transform: translateY(-6px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--white);
}

.stat-number::after {
  content: "+";
  color: var(--accent-gold);
}

.stat-label {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--purple-100);
}

.stat-sub {
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--purple-300);
  max-width: 200px;
}

/* ---------- TRY IT OUT ---------- */
.tryout-section {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 560px;
  max-height: 100dvh;
  padding-top: var(--header-height);
  box-sizing: border-box;
  overflow: hidden;
  scroll-margin-top: 0;
  display: flex;
  flex-direction: column;
  background: #10081a;
}

.tryout-head {
  flex: 0 0 auto;
  text-align: center;
  padding: 1.15rem 1.5rem 2.4rem;
}

.tryout-head .section-label {
  justify-content: center;
  margin-bottom: 0.4rem;
}

.tryout-title {
  margin: 0;
  font-family: var(--font-primary);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--white);
}

.tryout-lead {
  margin: 0.35rem auto 0;
  max-width: 32rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--purple-200);
}

.tryout-gates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1 1 auto;
  min-height: 0;
}

.tryout-gate {
  --go-accent: 232, 200, 114;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 3.25rem 3rem 3rem;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 0 rgba(255, 255, 255, 0);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  color: var(--white);
  -webkit-text-fill-color: currentColor;
  background-clip: border-box;
  box-sizing: border-box;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.tryout-gate-field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.tryout-gate > *:not(.tryout-gate-field) {
  position: relative;
  z-index: 1;
}

.tryout-gate:last-child {
  border-right: 0;
}

.tryout-gate:first-child {
  background: linear-gradient(165deg, #1e0e32 0%, #12081c 62%);
}

.tryout-gate:last-child {
  --go-accent: 91, 192, 190;
  background: linear-gradient(195deg, #0e1c2a 0%, #12081c 62%);
}

.tryout-gate:hover,
.tryout-gate:focus-visible {
  background-image: linear-gradient(180deg, #241038 0%, #14091f 70%);
  box-shadow: inset 0 0 0 2px rgba(var(--go-accent), 0.45);
}

.tryout-gate-index {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-gold);
}

.tryout-gate-name {
  font-family: var(--font-primary);
  font-size: clamp(1.85rem, 4.2vw, 3.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
}

.tryout-gate-tech {
  display: inline-flex;
  width: fit-content;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 200, 114, 0.35);
  background: rgba(232, 200, 114, 0.1);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.tryout-gate-how {
  max-width: 26rem;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.7;
  color: rgba(245, 240, 255, 0.88);
}

.tryout-gate-go {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  padding: 0.9rem 1.7rem;
  border-radius: 999px;
  border: 1px solid var(--purple-500);
  background: var(--purple-600);
  color: var(--white);
  -webkit-text-fill-color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.tryout-gate-go::after {
  content: '→';
  font-weight: 700;
  transition: transform 0.2s ease;
}

.tryout-gate:last-child .tryout-gate-go {
  background: #1f6f72;
  border-color: #5bc0be;
}

.tryout-gate:hover .tryout-gate-go,
.tryout-gate:focus-visible .tryout-gate-go {
  transform: translateY(-3px);
  background: var(--purple-500);
  border-color: var(--purple-400);
  box-shadow: 0 10px 24px rgba(124, 69, 212, 0.38);
}

.tryout-gate:last-child:hover .tryout-gate-go,
.tryout-gate:last-child:focus-visible .tryout-gate-go {
  background: #2a8f92;
  border-color: #7ee8e6;
  box-shadow: 0 10px 24px rgba(91, 192, 190, 0.32);
}

.tryout-gate:hover .tryout-gate-go::after,
.tryout-gate:focus-visible .tryout-gate-go::after {
  transform: translateX(4px);
}

.tryout-gate:active .tryout-gate-go {
  transform: translateY(0);
}

/* Dedicated demo player pages */
html.demo-play-html {
  scroll-snap-type: none;
}

html.demo-play-html,
body.demo-play-body {
  min-height: 100%;
  height: auto;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: #0d0716;
}

.demo-play-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.demo-play-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #12081f;
}

.demo-play-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.demo-play-back:hover {
  border-color: rgba(232, 200, 114, 0.45);
  color: var(--accent-gold);
}

.demo-play-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.demo-play-kicker {
  margin: 0 0 0.12rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
}

.demo-play-title {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--white);
}

.demo-play-hint {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--purple-200);
}

.demo-play-aside {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.demo-play-switch {
  color: var(--purple-300);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.demo-play-switch:hover {
  color: var(--white);
}

.demo-play-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: visible;
  background: var(--purple-900);
}

.tryout-iframe {
  width: 100%;
  height: 3600px;
  min-height: 3600px;
  border: 0;
  display: block;
}

html[data-page="demo-knowledge"] .tryout-iframe {
  height: 7200px;
  min-height: 7200px;
}

/* Player pages: keep the top bar fixed; only the embed pane scrolls. */
html[data-page="demo-vision"].demo-play-html,
html[data-page="demo-knowledge"].demo-play-html,
html[data-page="demo-vision"] body.demo-play-body,
html[data-page="demo-knowledge"] body.demo-play-body {
  height: 100%;
  max-height: 100dvh;
  overflow: hidden;
}

html[data-page="demo-vision"] .demo-play-page,
html[data-page="demo-knowledge"] .demo-play-page {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

html[data-page="demo-vision"] .demo-play-bar,
html[data-page="demo-knowledge"] .demo-play-bar {
  position: relative;
}

html[data-page="demo-vision"] .demo-play-stage,
html[data-page="demo-knowledge"] .demo-play-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* 佔位畫面 */
.tryout-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  gap: 0.6rem;
}

.placeholder-orb {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-md);
  background: radial-gradient(circle at 35% 30%, var(--purple-300), var(--purple-600) 60%, var(--purple-800));
  box-shadow: 0 0 40px rgba(124, 69, 212, 0.5);
  animation: orbFloat 4s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.placeholder-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}

.placeholder-desc {
  font-size: 0.95rem;
  color: var(--purple-200);
  max-width: 420px;
  line-height: 1.7;
}

.placeholder-badge {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent-gold);
  border: 1px solid rgba(232, 200, 114, 0.4);
  background: rgba(232, 200, 114, 0.08);
}

.placeholder-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.btn-sm {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
}

a.btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- 程式碼整合展示 ---------- */
.integrate-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.integrate-info .section-label {
  justify-content: flex-start;
}

.integrate-checklist {
  margin: var(--space-lg) 0 var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.integrate-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.98rem;
  color: var(--purple-100);
  line-height: 1.6;
}

.check-icon {
  flex: 0 0 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(91, 192, 190, 0.18);
  color: var(--accent-teal);
  font-size: 0.8rem;
  font-weight: 700;
  margin-top: 2px;
}

/* 程式碼視窗 */
.code-window {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0E0820;
  box-shadow: var(--shadow-lg);
}

.code-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.code-filename {
  margin-left: 0.75rem;
  font-size: 0.82rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  color: var(--purple-300);
}

.code-body {
  margin: 0;
  padding: 1.4rem 1.5rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--purple-100);
  overflow-x: auto;
  white-space: pre;
}

.c-keyword { color: #C792EA; }
.c-fn { color: #82AAFF; }
.c-str { color: #C3E88D; }
.c-comment { color: #6A6480; font-style: italic; }

.code-terminal {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.5rem 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-size: 0.82rem;
}

.term-line { color: var(--purple-200); }
.term-prompt { color: var(--purple-400); margin-right: 0.4rem; }
.term-ok { color: var(--accent-teal); }

/* ---------- 實驗室 ---------- */
.lab-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.lab-header .section-label {
  justify-content: center;
}

.lab-header .section-subtitle {
  margin: 0 auto;
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.lab-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

.lab-card:hover {
  transform: translateY(-5px);
  border-color: rgba(160, 114, 230, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.lab-index {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--purple-400);
}

.lab-title {
  margin-top: 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}

.lab-desc {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--purple-200);
  line-height: 1.7;
}

.lab-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.lab-tags span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--purple-100);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm, 6px);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lab-status {
  display: inline-block;
  margin-top: var(--space-md);
  padding: 0.2rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--purple-200);
  background: rgba(124, 69, 212, 0.15);
  border: 1px solid rgba(160, 114, 230, 0.3);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
  .integrate-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .lab-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(180px, auto);
  }

  .bento-feature {
    grid-column: span 2;
    grid-row: span 1;
    flex-direction: row;
  }

  .bento-feature .bento-visual {
    flex: 0 0 45%;
    min-height: 200px;
  }

  .bento-feature .bento-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .bento-wide {
    grid-column: span 2;
  }

  .tryout-gate {
    padding: 2.4rem 1.75rem 2.2rem;
  }

  .demo-play-bar {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .demo-hero {
    min-height: 520px;
  }

  .demo-hero-content {
    max-width: 100%;
    padding: 0 1rem;
  }

  .hero-scroll-cue {
    bottom: 1.25rem;
  }

  .hero-scroll-icon {
    width: 40px;
    height: 40px;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-item,
  .bento-feature,
  .bento-wide {
    grid-column: auto;
    grid-row: auto;
    flex-direction: column;
  }

  .bento-feature .bento-visual,
  .bento-wide .bento-visual {
    flex: 1;
    min-height: 150px;
  }

  .bento-wide {
    grid-column: auto;
  }

  .lab-grid {
    grid-template-columns: 1fr;
  }

  .bento-visual {
    min-height: 150px;
  }

  .bento-feature .bento-visual {
    min-height: 170px;
  }

  .tryout-section {
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-bottom: 1.25rem;
  }

  .tryout-head {
    padding: 1.15rem 1.15rem 1.6rem;
  }

  .tryout-lead {
    display: block;
    font-size: 0.88rem;
    max-width: 22rem;
  }

  .tryout-gates {
    grid-template-columns: 1fr;
    gap: 0.9rem;
    flex: none;
    padding: 0 0.9rem 0.4rem;
  }

  .tryout-gate {
    min-height: 300px;
    border-right: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.1rem 1.35rem 1.7rem;
  }

  .tryout-gate:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }

  .tryout-gate-name {
    font-size: 1.7rem;
  }

  .tryout-gate-how {
    max-width: none;
  }

  .demo-play-bar {
    padding: 0.7rem 0.85rem;
    row-gap: 0.55rem;
  }

  .demo-play-hint {
    display: none;
  }
}

@media (max-height: 700px) and (min-width: 621px) {
  .tryout-lead {
    display: none;
  }

  .tryout-head {
    padding-bottom: 1.35rem;
  }

  .tryout-gate {
    padding-top: 1.6rem;
  }
}
