:root {
  --bg: #12162B;
  --bg-card: #1B2140;
  --bg-card-hover: #232B4D;
  --accent-cyan: #5EEAD4;
  --accent-pink: #FF8FAB;
  --text-primary: #F4F2ED;
  --text-muted: #9AA1C4;
  --border-soft: rgba(158, 168, 220, 0.16);
  --radius: 18px;
  --font-display: 'Baloo 2', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

img, video, iframe { max-width: 100%; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(94, 234, 212, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 10%, rgba(255, 143, 171, 0.08), transparent 60%);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: rgba(18, 22, 43, 0.85);
  backdrop-filter: blur(10px);
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 18px 24px;
  flex-wrap: wrap;
  gap: 6px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.logo-a { fill: var(--accent-cyan); }
.logo-b { fill: var(--accent-pink); }

.tagline {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0 48px;
}

.hero-inner { max-width: 680px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin: 0 0 14px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.08;
  margin: 0 0 18px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
  max-width: 54ch;
}

/* ---------- Filter bar ---------- */

.filter-bar {
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 65px;
  background: rgba(18, 22, 43, 0.85);
  backdrop-filter: blur(10px);
  z-index: 15;
}

.filter-inner {
  display: flex;
  gap: 10px;
  padding: 14px 24px;
  overflow-x: auto;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: transparent;
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.filter-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

.filter-btn.active {
  color: var(--bg);
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ---------- Catalog grid ---------- */

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
  padding: 44px 0 90px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0D1024;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card-hover-video.is-active { opacity: 1; }

.card:hover .card-media img { transform: scale(1.04); }

.card-media .no-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--border-soft);
}

/* corner-bracket motif — an OBS crop/capture frame, the signature element */
.corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent-cyan);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.card:hover .corner,
.lightbox-video-frame .corner { opacity: 0.9; }

.corner-tl { top: 10px; left: 10px; border-right: none; border-bottom: none; }
.corner-tr { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.corner-bl { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.corner-br { bottom: 10px; right: 10px; border-left: none; border-top: none; }

.play-pill {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(13, 16, 36, 0.82);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.card:hover .play-pill { opacity: 1; transform: translateY(0); }

.play-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-pink);
  box-shadow: 0 0 0 0 rgba(255,143,171,0.6);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,143,171,0.55); }
  70% { box-shadow: 0 0 0 6px rgba(255,143,171,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,143,171,0); }
}

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

.card-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-pink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-body h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.25;
}

.card-blurb {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.card-price {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--accent-cyan);
  font-size: 0.95rem;
}

.card-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.card:hover .card-cta { color: var(--text-primary); }

.price-note {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  opacity: 0.75;
  margin: 6px 0 0;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-x: hidden;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 11, 24, 0.82);
  backdrop-filter: blur(3px);
}

.lightbox-panel {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  max-width: 1160px;
  width: 100%;
  max-height: 98vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.1fr 0.95fr;
}

.lightbox-panel > * { min-width: 0; }

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  background: rgba(13, 16, 36, 0.7);
  border: 1px solid var(--border-soft);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-media {
  display: flex;
  flex-direction: column;
  background: #0D1024;
}

.lightbox-video-frame {
  position: relative;
  background: #0D1024;
  aspect-ratio: 4 / 3;
}

.lightbox-video-frame .corner { width: 26px; height: 26px; }

.lightbox-video {
  width: 100%;
  height: 100%;
}

.lightbox-video iframe,
.lightbox-video video,
.lightbox-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

.media-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: rgba(13, 16, 36, 0.75);
  color: var(--text-primary);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.gallery-nav[hidden] { display: none; }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-nav:hover { border-color: var(--accent-cyan); }

.gallery-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 4;
  background: rgba(13, 16, 36, 0.75);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 999px;
}

.gallery-count[hidden] { display: none; }

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 14px 16px;
  overflow-x: auto;
  min-width: 0;
}

.gallery-thumbs[hidden] { display: none; }

.gallery-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: #171b36;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb.active { border-color: var(--accent-cyan); }

.thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 16, 36, 0.45);
  color: var(--text-primary);
  font-size: 0.7rem;
}

.gallery-thumb { position: relative; }

.lightbox-info {
  padding: 34px 38px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lightbox-info h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  margin: 0;
}

.lightbox-info p { color: var(--text-muted); margin: 0; }
.lightbox-info p#lightboxDescription {
  white-space: pre-line;
  line-height: 1.5;
  max-height: 24em;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-soft) transparent;
}

.lightbox-info p#lightboxDescription::-webkit-scrollbar { width: 6px; }
.lightbox-info p#lightboxDescription::-webkit-scrollbar-track { background: transparent; }
.lightbox-info p#lightboxDescription::-webkit-scrollbar-thumb {
  background: var(--border-soft);
  border-radius: 999px;
}
.lightbox-info p#lightboxDescription::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 8px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.btn-etsy {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-cyan);
  color: #0D1024;
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn-etsy:hover { transform: translateY(-2px); background: #7FF3E1; }

.btn-price { font-family: var(--font-mono); font-weight: 500; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 30px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .wrap { padding: 0 16px; }

  .header-inner { padding: 14px 16px; }
  .tagline { display: none; }
  .logo { font-size: 1.1rem; }

  .filter-bar {
    position: static;
  }
  .filter-inner { padding: 12px 16px; }

  .hero { padding: 32px 0 28px; }
  .hero-sub { font-size: 0.98rem; }

  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    padding: 28px 0 64px;
  }

  .card-body { padding: 14px 16px 16px; }

  .lightbox { padding: 0; align-items: stretch; }
  .lightbox-panel {
    grid-template-columns: 1fr;
    max-height: 100vh;
    height: 100%;
    width: 100vw;
    max-width: 100vw;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow-x: hidden;
  }
  .lightbox-panel > * { min-width: 0; }
  .lightbox-video-frame { aspect-ratio: 16 / 10; }
  .lightbox-info { padding: 20px; }

  .gallery-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .gallery-thumb { width: 64px; height: 48px; }
}

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

@media (hover: none) {
  .corner,
  .play-pill {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card-media img, .card-hover-video, .play-pill, .corner, .btn-etsy { transition: none; }
  .play-pill .dot { animation: none; }
}

/* ---------- Focus visibility ---------- */

.card:focus-visible,
.filter-btn:focus-visible,
.btn-etsy:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}