:root {
  --bg: #0e0521;
  --bg-deep: #1a0b38;
  --bg-elev: #2c115e;
  --bg-soft: #50318f;
  --text: #eefcad;
  --muted: #5e6aa4;
  --muted-2: #848cb5;
  --accent: #c5f770;
  --accent-soft: #68cb8a;
  --line: rgba(197, 247, 112, 0.1);
  --line-strong: rgba(197, 247, 112, 0.2);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  --max: 1200px;
  --panel: rgba(80, 49, 143, 0.2);
  --bevel: 10px;
  --bevel-sm: 8px;
  --card-gap: clamp(14px, 2vw, 22px);
  --gap: clamp(18px, 2.5vw, 28px);
  --font-title: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(44, 17, 94, 0.4), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(80, 49, 143, 0.3), transparent 40%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

::selection { background: rgba(255,255,255,0.18); color: var(--text); }

.shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 16px;
  background: var(--text);
  color: #000;
  padding: 10px 12px;
  z-index: 999;
}
.skip-link:focus { left: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 5, 33, 0.1);
  backdrop-filter: blur(12px);
  border-bottom: none;
  transition: background 300ms ease;
}
.site-header.is-solid {
  background: rgba(14, 5, 33, 0.45);
}

.header-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-text strong {
  font-family: var(--font-title);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-transform: uppercase;
}

.primary-nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
}
.primary-nav a {
  position: relative;
  transition: color 150ms ease;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 150ms ease;
}
.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--accent);
}
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
  transform: scaleX(1);
}

.hero {
  padding: clamp(56px, 10vw, 120px) 0 clamp(36px, 6vw, 64px);
}
.hero-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 820px;
  margin: 0 auto;
}



.hero-copy {
  padding: clamp(28px, 4vw, 48px) clamp(16px, 3vw, 28px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}
.lead {
  margin: 22px auto 0;
  max-width: 58ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.6;
  text-align: center;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  justify-content: center;
}
.pill,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: none;
  background: var(--bg-elev);
  color: var(--text);
  font-size: 0.92rem;
  clip-path: polygon(
    var(--bevel) 0%, calc(100% - var(--bevel)) 0%,
    100% var(--bevel), 100% calc(100% - var(--bevel)),
    calc(100% - var(--bevel)) 100%, var(--bevel) 100%,
    0% calc(100% - var(--bevel)), 0% var(--bevel)
  );
  transition: transform 160ms ease, background 160ms ease;
}
.pill:hover,
.button:hover,
.pill:focus-visible,
.button:focus-visible {
  transform: translateY(-2px);
  background: var(--bg-soft);
}
.button.is-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.button.is-primary:hover,
.button.is-primary:focus-visible {
  background: var(--text);
}

.hero-stats {
  margin: 34px 0 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hero-stats dt {
  color: var(--muted-2);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  line-height: 1;
}
.hero-stats dd {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1;
}

.quote-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.section {
  padding: clamp(36px, 6vw, 64px) 0;
}
.section-tight { padding-top: 18px; }
.section-heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  margin-bottom: clamp(18px, 3vw, 28px);
}
.section-heading h2,
.about-copy h2,
.contact-shell h2,
.game-detail-hero h1 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  letter-spacing: -0.04em;
  font-weight: 800;
  color: var(--accent);
}
.section-note,
.muted {
  color: var(--muted);
}

.section-list {
  display: grid;
  gap: 0;
}
.game-section {
}
.game-section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  padding: 20px 22px 14px;
}
.game-section-header h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(1.4rem, 4vw, 2rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--accent);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--card-gap);
  padding: var(--card-gap);
}
.card-grid-jams {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .card-grid-jams { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .card-grid-jams { grid-template-columns: 1fr; }
}
.game-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: none;
  overflow: hidden;
  background: transparent;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.game-card:hover {
  background: transparent;
  transform: translateY(-8px);
}

.card-media {
  position: relative;
  aspect-ratio: 460 / 215;
  background: transparent;
  overflow: hidden;
  clip-path: polygon(
    var(--bevel) 0%, calc(100% - var(--bevel)) 0%,
    100% var(--bevel), 100% calc(100% - var(--bevel)),
    calc(100% - var(--bevel)) 100%, var(--bevel) 100%,
    0% calc(100% - var(--bevel)), 0% var(--bevel)
  );
}
.card-media img,
.card-media video {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.game-card:hover .card-media img,
.game-card:hover .card-media video {
  transform: scale(1.02);
}
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.18) 72%, rgba(0,0,0,0.6));
  pointer-events: none;
}
.card-body {
  padding: 18px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  align-items: flex-start;
}
.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.card-title {
  margin: 0 0 0 -14px;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--accent);
  padding: 4px 14px;
  display: inline-block;
  transition: background 250ms ease, color 250ms ease, transform 250ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  clip-path: polygon(
    var(--bevel-sm) 0%, calc(100% - var(--bevel-sm)) 0%,
    100% var(--bevel-sm), 100% calc(100% - var(--bevel-sm)),
    calc(100% - var(--bevel-sm)) 100%, var(--bevel-sm) 100%,
    0% calc(100% - var(--bevel-sm)), 0% var(--bevel-sm)
  );
}
.game-card:hover .card-title {
  background: var(--accent);
  color: var(--bg);
  transform: translateX(14px);
}
.card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.card-meta strong {
  color: var(--muted-2);
  font-weight: 500;
  margin-right: 4px;
}
.card-meta span {
  display: block;
}
.card-description {
  margin: 0;
  color: var(--muted);
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.88rem;
  clip-path: polygon(
    var(--bevel-sm) 0%, calc(100% - var(--bevel-sm)) 0%,
    100% var(--bevel-sm), 100% calc(100% - var(--bevel-sm)),
    calc(100% - var(--bevel-sm)) 100%, var(--bevel-sm) 100%,
    0% calc(100% - var(--bevel-sm)), 0% var(--bevel-sm)
  );
  transition: background 150ms ease, transform 150ms ease;
}
.tag:hover,
.tag:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.10);
}

.about-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--gap);
}
.about-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.quote-card {
  padding: 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.quote-card p:last-child {
  margin: 0;
  color: var(--muted);
}

.contact-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer {
  margin-top: clamp(24px, 4vw, 48px);
  padding: 40px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: scale(0.96) translateY(20px);
  transition: opacity 1000ms cubic-bezier(0.22, 1, 0.36, 1), transform 1000ms cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.lightning-divider {
  height: 80px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0,40 L150,60 L300,20 L450,70 L600,10 L750,65 L900,15 L1050,75 L1200,30 L1200,80 L0,80 Z' fill='%231a0b38'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  margin: 0;
  position: relative;
  z-index: 2;
  pointer-events: none;
}

/* Staggered reveal for cards inside a grid */
.reveal-stagger-1 { transition-delay: 0ms; }
.reveal-stagger-2 { transition-delay: 100ms; }
.reveal-stagger-3 { transition-delay: 200ms; }
.reveal-stagger-4 { transition-delay: 300ms; }
.reveal-stagger-5 { transition-delay: 400ms; }
.reveal-stagger-6 { transition-delay: 500ms; }

/* Smooth section divider transitions */
.section {
  position: relative;
}

/* Game Detail Page */
.game-detail-hero {
  padding: clamp(40px, 8vw, 80px) 0 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.game-detail-hero h1 {
  margin-bottom: -40px;
  position: relative;
  z-index: 10;
  text-shadow: 0 4px 20px rgba(0,0,0,0.5);
  font-size: clamp(3.2rem, 10vw, 6rem);
}
.game-info-grid {
  display: flex;
  flex-direction: column;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
}
.game-main-content #gameHeader {
  margin: 0;
}
.game-main-content #gameHeader img {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}
.screenshot-item img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border: 1px solid var(--line);
}
.game-metadata {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px 60px;
  padding: 40px 0;
  background: transparent;
  border: none;
  text-align: center;
}
.meta-item label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.meta-item span {
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 960px) {
  .primary-nav { gap: 14px; }
}
/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 12, 15, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
}
.lightbox.is-active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 30px 100px rgba(0,0,0,0.8);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease, color 200ms ease;
  z-index: 1010;
}
.lightbox-close {
  top: 30px;
  right: 30px;
  font-size: 40px;
  width: 60px;
  height: 60px;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 80px;
  width: 80px;
  height: 100px;
  opacity: 0.6;
}
.lightbox-nav:hover {
  opacity: 1;
  color: var(--accent);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 760px) {
  .lightbox-nav { font-size: 50px; width: 50px; }
}

.screenshot-item {
  cursor: zoom-in;
  transition: transform 200ms ease;
}
.screenshot-item:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   Played Games specific styles
   ========================================================================== */

.played-list-item {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.played-list-rank {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  opacity: 0.8;
  margin-right: 20px;
  min-width: 40px;
  text-align: right;
}

.played-list-item:hover .card-title {
  background: var(--accent);
  color: var(--bg);
  transform: translateX(14px);
}

@media (max-width: 600px) {
  .played-list-item {
    padding: 12px 10px;
  }
}