:root {
  --ink-deep: #030712;
  --ink-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --line: rgba(148, 163, 184, 0.2);
  --accent: #7dd3fc;
  --accent-warm: #f6c453;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
}

/* ── Progressive card entrance ───────────────────────────────────────────── */
.card-hidden {
  opacity: 0;
  transform: translateY(22px);
}

.card-visible {
  animation: cardReveal 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: #e5eefc;
  background:
    radial-gradient(circle at top, rgba(29, 78, 216, 0.24), transparent 28%),
    linear-gradient(180deg, #020617 0%, #071120 48%, #030712 100%);
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.cat-hero {
  min-height: 46vh;
  display: grid;
  place-items: center;
  padding: 130px 24px 70px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cat-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0), rgba(3, 7, 18, 0.96));
}

.cat-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(125, 211, 252, 0.3);
  background: rgba(10, 18, 38, 0.5);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4f4ff;
}

.cat-hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.cat-hero p {
  margin: 0 auto;
  max-width: 640px;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.9);
}

.cat-stats {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cat-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
  border: 1px solid rgba(125, 211, 252, 0.2);
  color: #cbe9ff;
  font-size: 12px;
  font-weight: 600;
}

.cat-breadcrumb {
  max-width: 1200px;
  margin: 26px auto 0;
  padding: 0 24px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.cat-breadcrumb a {
  color: #7dd3fc;
  transition: color 0.2s ease;
}

.cat-breadcrumb a:hover {
  color: #bae6fd;
}

.cat-back {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.92);
  color: white;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.35);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cat-back:hover {
  transform: translateY(-2px);
  background: rgba(14, 64, 96, 0.95);
}

.cat-back .arrow {
  font-size: 1.1rem;
  line-height: 1;
}

.cat-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px 90px;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 18px;
}

@media (min-width: 640px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.demo-card {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
  user-select: none;
}

.demo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.45);
}

.demo-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #0b1d33, #051018);
  overflow: hidden;
}

.demo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease, filter 0.6s ease;
  filter: blur(14px) saturate(0.4) brightness(0.5);
}

.demo-thumb img.loaded {
  filter: blur(0) saturate(1) brightness(1);
}

.demo-card:hover .demo-thumb img.loaded {
  transform: scale(1.05);
}

.demo-thumb .tall {
  object-fit: contain;
  background: #0b1d33;
}

.demo-thumb.live {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(125, 211, 252, 0.22), transparent 60%),
    linear-gradient(135deg, #0b1d33 0%, #051018 55%, #0b1d33 100%);
}

.demo-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.demo-badge {
  align-self: flex-start;
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.12);
  color: #ddf8ff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.demo-badge.warm {
  background: rgba(246, 196, 83, 0.12);
  color: #ffe09a;
}

.demo-title {
  font-family: "Playfair Display", serif;
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
  color: white;
}

.demo-desc {
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 0.92rem;
  flex: 1;
}

.demo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 6px;
}

.demo-view {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #f8fafc, #dbeafe);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.demo-view:hover {
  transform: translateY(-2px);
}

.cat-cta {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px 110px;
}

.cat-cta-card {
  text-align: center;
  padding: 52px 34px;
  border-radius: 30px;
  border: 1px solid rgba(125, 211, 252, 0.25);
  background:
    radial-gradient(circle at 20% 0%, rgba(125, 211, 252, 0.12), transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(246, 196, 83, 0.08), transparent 40%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(7, 17, 32, 0.96));
  box-shadow: var(--shadow);
}

.cat-cta-card h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: white;
}

.cat-cta-card p {
  margin: 0 auto 26px;
  max-width: 560px;
  color: #cbd5e1;
  line-height: 1.7;
}

.cat-cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cat-cta-btn {
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cat-cta-btn.primary {
  background: linear-gradient(135deg, #f8fafc, #bfdbfe);
  color: #0f172a;
}

.cat-cta-btn.secondary {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.cat-cta-btn:hover {
  transform: translateY(-2px);
}

.cat-cta-btn.primary:hover {
  box-shadow: 0 14px 28px rgba(125, 211, 252, 0.2);
}

.cat-empty {
  text-align: center;
  padding: 70px 24px;
}

.cat-empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.cat-empty h3 {
  color: white;
  font-size: 1.6rem;
  margin: 0 0 10px;
}

.cat-empty p {
  color: #94a3b8;
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.7;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.96);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 30px;
  animation: fadeIn 0.25s ease;
}

.lightbox-panel {
  width: min(1120px, 100%);
  position: relative;
  text-align: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: zoomIn 0.25s ease;
}

.lightbox-title {
  margin-top: 18px;
  font-family: "Playfair Display", serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: white;
}

.lightbox-copy {
  max-width: 720px;
  margin: 10px auto 0;
  line-height: 1.7;
  color: #cbd5e1;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  background: rgba(8, 47, 73, 0.92);
  color: white;
  border: 0;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.5);
  transition: transform 0.2s ease;
}

.lightbox-close:hover {
  transform: scale(1.08);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.92); }
  to { transform: scale(1); }
}

@media (max-width: 768px) {
  .cat-hero {
    min-height: 40vh;
    padding: 110px 18px 56px;
  }

  .cat-cta-card {
    padding: 38px 22px;
  }

  .lightbox {
    padding: 14px;
  }

  .lightbox img {
    max-height: 60vh;
  }
}