/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:        #0a0a0f;
  --bg-soft:   #0e0e15;
  --surface:   #12121a;
  --surface2:  #1a1a28;
  --border:    rgba(255,255,255,0.07);
  --border-2:  rgba(255,255,255,0.12);
  --text:      #e8e8f0;
  --muted:     #8a8aab;
  --dim:       #6b6b8a;
  --accent:    #7c5cbf;
  --accent-2:  #a78bfa;

  --published: #10b981;
  --testing:   #f59e0b;
  --dev:       #3b82f6;
  --prototype: #f97316;
  --concept:   #8b5cf6;
  --hold:      #6b7280;

  --max:  1200px;
  --pad:  clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, "Helvetica Neue", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Grid background ─── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,92,191,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,92,191,0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 40%, transparent 90%);
  pointer-events: none;
  z-index: 0;
}

/* ─── Nav ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(10,10,15,0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 12px;
}
.brand-text { font-size: 15px; }

.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

@media (max-width: 560px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13px; }
}

/* ─── Hero ─── */
.hero {
  position: relative;
  z-index: 1;
  padding: clamp(60px, 10vw, 120px) var(--pad) clamp(60px, 8vw, 100px);
  background:
    radial-gradient(ellipse 900px 500px at 50% 0%, rgba(124,92,191,0.18), transparent 70%),
    radial-gradient(ellipse 600px 400px at 15% 100%, rgba(59,130,246,0.08), transparent 70%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.eyebrow, .section-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 5px 12px;
  border: 1px solid rgba(124,92,191,0.35);
  border-radius: 100px;
  background: rgba(124,92,191,0.08);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(44px, 8vw, 84px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, #a78bfa 60%, #7c5cbf 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding-bottom: 0.12em;
  margin-bottom: 26px;
}

.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 620px;
  color: var(--muted);
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}
.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--muted);
}
.stat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.stat-count {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #9575d4;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(124,92,191,0.35);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(124,92,191,0.08);
}
.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 12px;
}

/* ─── Section scaffolding ─── */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(70px, 9vw, 110px) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}
.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.section-sub {
  color: var(--muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

/* ─── Filter bar ─── */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
}
.filter-btn.active {
  background: rgba(124,92,191,0.15);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Games grid ─── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.game-card {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1),
              border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--status-color, var(--accent)), transparent);
  opacity: 0.8;
}
.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124,92,191,0.4);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,92,191,0.15);
}

.game-card-header {
  padding: 26px 24px 18px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.game-icon {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.game-icon.has-image { padding: 0; background: #000; }
.game-icon.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-title-block { flex: 1; min-width: 0; }
.game-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 3px;
}
.game-genre {
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 10px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.game-desc {
  padding: 0 24px 20px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #9a9ab8;
  flex: 1;
}

.game-progress {
  padding: 0 24px 18px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--dim);
  font-weight: 600;
  margin-bottom: 6px;
}
.progress-bar {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s ease;
}

.game-tags {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.meta-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
}

.game-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0,0,0,0.2);
}
.version {
  font-size: 12px;
  font-family: 'Consolas', 'Courier New', monospace;
  color: var(--dim);
}
.store-links { display: flex; gap: 8px; flex-wrap: wrap; }

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  background: #0b0b11;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 5px 11px 5px 8px;
  transition: all 0.15s;
  line-height: 1;
  white-space: nowrap;
}
.store-pill:hover {
  background: #15151f;
  border-color: rgba(124,92,191,0.55);
  transform: translateY(-1px);
}
.store-pill .store-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.store-pill .store-emoji { font-size: 14px; line-height: 1; }

.store-pill-large {
  font-size: 13px;
  padding: 10px 18px 10px 14px;
  border-radius: 10px;
  gap: 10px;
}
.store-pill-large .store-icon { width: 22px; height: 22px; }
.store-pill-large .store-emoji { font-size: 20px; }

.modal-stores {
  margin: 8px 0 18px;
}

.modal-legal {
  margin-bottom: 24px;
}
.modal-legal a {
  font-size: 12px;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.15s;
}
.modal-legal a:hover { color: var(--accent-2); }

/* ─── About ─── */
.about {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: none;
  background: var(--bg-soft);
}
.about-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}
.about-text {
  color: var(--muted);
  font-size: 16px;
  margin-top: 18px;
  max-width: 540px;
}
.about-text em { color: var(--accent-2); font-style: italic; }

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 22px;
  text-align: center;
  transition: border-color 0.2s;
}
.about-card:hover { border-color: rgba(124,92,191,0.4); }
.about-card-num {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}
.about-card-label {
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── Contact ─── */
.contact { text-align: center; }
.contact-inner { max-width: 640px; margin: 0 auto; }
.contact-sub {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 32px;
}

/* ─── Footer ─── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px var(--pad);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
}
.footer-copy {
  font-size: 12px;
  color: var(--dim);
}

/* ─── Modal ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.78);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid rgba(124,92,191,0.35);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(16px) scale(0.97);
  transition: transform 0.25s;
  box-shadow: 0 40px 100px rgba(0,0,0,0.7);
}
.modal-overlay.open .modal { transform: none; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  z-index: 2;
}
.modal-close:hover { color: var(--text); border-color: var(--border-2); }
.modal-body { padding: 40px 36px 32px; }
.modal-icon {
  width: 72px; height: 72px;
  border-radius: 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin-bottom: 20px;
  overflow: hidden;
}
.modal-icon.has-image { background: #000; }
.modal-icon.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.modal-genre {
  font-size: 13px;
  color: var(--dim);
  margin-bottom: 18px;
}
.modal-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.modal-desc {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 24px;
}
.modal-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.modal-fact {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.modal-fact-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}
.modal-fact-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
}
.modal-progress { margin-bottom: 24px; }

/* ─── Gallery ─── */
.gallery { margin-bottom: 24px; }
.gallery-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 10px;
}
.gallery-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.gallery-strip::-webkit-scrollbar { height: 6px; }
.gallery-strip::-webkit-scrollbar-thumb { background: rgba(124,92,191,0.3); border-radius: 3px; }

.gallery-item {
  flex: 0 0 auto;
  width: 180px;
  scroll-snap-align: start;
  margin: 0;
}
.gallery-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: zoom-in;
  transition: transform 0.2s, border-color 0.2s;
  display: block;
}
.gallery-item img:hover {
  transform: scale(1.03);
  border-color: rgba(124,92,191,0.5);
}
.gallery-item figcaption {
  margin-top: 6px;
  font-size: 11px;
  color: var(--dim);
  text-align: center;
}

/* ─── Lightbox ─── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 96px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  cursor: zoom-out;
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: 12px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
  object-fit: contain;
  pointer-events: none;
}
.lightbox.open .lightbox-img { pointer-events: auto; }
.lightbox-caption {
  color: rgba(255,255,255,0.75);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 80vw;
  pointer-events: none;
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 44px; height: 44px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.15s;
  z-index: 5;
}
.lightbox-close:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.35);
}

/* ── Prev / Next edge buttons ── */
.lightbox-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 22%;
  min-width: 80px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  font-size: 64px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background 0.2s, color 0.2s;
  z-index: 2;
  padding: 0 28px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  user-select: none;
}
.lightbox-prev { left: 0;  justify-content: flex-start; }
.lightbox-next { right: 0; justify-content: flex-end; }
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(124,92,191,0.18), transparent);
}
.lightbox-next:hover {
  background: linear-gradient(270deg, rgba(124,92,191,0.18), transparent);
}
.lightbox.single .lightbox-nav { display: none; }

@media (max-width: 640px) {
  .lightbox { padding: 40px 20px; }
  .lightbox-nav { width: 30%; min-width: 50px; font-size: 44px; padding: 0 10px; }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(124,92,191,0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(124,92,191,0.5); }
