:root {
  --white:  #FFFFFF;
  --paper:  #EEF1F5;
  --ink:    #0B0E14;   /* near-black, cool */
  --dim:    #565E6B;
  --line:   #CBD2DB;

  --blue:      #0E5BFF;   /* the primary pop */
  --blue-deep: #0A44C4;
  --yellow:    #FFD400;   /* energy accent — games + flow */
  --yellow-ink:#8A7300;

  --chrome: linear-gradient(180deg, #F6F8FA 0%, #D6DBE2 44%, #B4BCC6 54%, #E6E9ED 100%);
  --brush:  repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 1px, rgba(11,14,20,0.06) 1px 2px);

  --display: 'Chakra Petch', system-ui, sans-serif;
  --body:    'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: #fff; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.75rem; }

/* Brushed-chrome divider — the hard section cut */
.chrome-bar {
  position: relative; height: 16px; width: 100%;
  background: var(--chrome);
}
.chrome-bar::after { content: ""; position: absolute; inset: 0; background: var(--brush); }

/* ===================================================== HERO */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex; align-items: center;
  padding: 5rem 0 0;
  background: var(--white);
  overflow: hidden;
}

.hero-inner {
  position: relative; z-index: 2;
  max-width: 760px;
  animation: rise .5s ease-out both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin: 0 0 1.5rem;
  font-family: var(--display);
  font-weight: 600; font-size: 0.74rem;
  letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--blue);
}
.kicker::before { content: ""; width: 12px; height: 12px; background: var(--yellow); }

.hero h1 {
  margin: 0 0 1.4rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5.6rem);
  line-height: 0.94;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--blue); }

.tagline {
  margin: 0 0 2.4rem;
  max-width: 34ch;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--dim);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* ===================================================== BUTTONS (hard) */
.btn {
  display: inline-flex; align-items: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--display); font-weight: 600; font-size: 0.92rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: var(--blue);
  transition: background .12s ease-out, transform .12s ease-out, box-shadow .12s ease-out;
}
.btn::after { content: "›"; margin-left: 0.6ch; font-size: 1.15em; line-height: 1; }
.btn:hover  { background: var(--ink); transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--yellow); }
.btn:active { transform: translate(0, 0); box-shadow: 0 0 0 var(--yellow); }

/* ===================================================== REGISTRY */
.registry { padding: 4rem 0 6rem; background: var(--white); }

.registry-head {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 2.5rem;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin: 0 0 0.6rem;
  font-family: var(--display); font-weight: 600; font-size: 0.74rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--blue);
}
.eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--blue); }
.section-title {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.6rem); text-transform: uppercase; color: var(--ink);
}

.count {
  font-family: var(--display); font-weight: 600; font-size: 0.76rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; background: var(--ink);
  padding: 0.45rem 0.9rem;
}

/* Post-purchase banner, injected by app.js above the registry head. Yellow
   because it's the one moment on the page worth interrupting for. */
.claim {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem;
  margin-bottom: 2.5rem; padding: 1.5rem 1.75rem;
  border: 2px solid var(--ink); border-left-width: 7px; border-left-color: var(--yellow);
  background: var(--paper);
}
.claim-title {
  margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.1rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
}
.claim-body { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--dim); }

/* Grid — auto-fit so a short registry stretches to fill the row instead of
   leaving dead columns on the right. */
.entries {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Card — hard-edged spec sheet. Accent + hard offset-shadow on hover. */
.entry {
  position: relative;
  display: flex; flex-direction: column; gap: 1.15rem;
  padding: 1.75rem;
  background: var(--white);
  border: 2px solid var(--ink);
  border-top-width: 7px;
  border-top-color: var(--blue);
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.entry[data-type="game"] { border-top-color: var(--yellow); }
.entry:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 var(--ink);
}
.entry[data-type="game"]:hover { box-shadow: 8px 8px 0 var(--yellow); }

/* Ghosted ordinal in the top-right corner. Purely decorative — delete this
   rule and the #index- node in app.js if you'd rather the corner stay empty. */
.entry-index {
  position: absolute; top: 1.1rem; right: 1.25rem;
  font-family: var(--display); font-weight: 700;
  font-size: 2.6rem; line-height: 1;
  color: var(--ink); opacity: 0.07;
  pointer-events: none;
}

.entry-name {
  margin: 0; font-family: var(--display); font-weight: 700;
  font-size: 1.5rem; line-height: 1.02; text-transform: uppercase; color: var(--ink);
  max-width: 80%; /* keeps long names clear of .entry-index */
}

/* Tags — hard squared labels */
.entry-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--display); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.28rem 0.6rem; color: var(--dim);
  border: 1.5px solid var(--line);
}
.tag--type { background: var(--blue); color: #fff; border-color: var(--blue); }
.entry[data-type="game"] .tag--type { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

.entry-summary {
  margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--ink); opacity: 0.82;
}

/* Spec list — version / size / released, ruled like a datasheet. */
.spec {
  margin: 0;
  display: grid; grid-template-columns: auto 1fr;
  font-family: var(--display); font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.spec dt {
  padding: 0.45rem 0; border-top: 1px solid var(--line);
  color: var(--dim);
}
.spec dd {
  margin: 0; padding: 0.45rem 0; border-top: 1px solid var(--line);
  text-align: right; font-weight: 600; color: var(--ink);
}

.entry-foot {
  margin-top: auto; /* pins the footer to the bottom on uneven cards */
  display: flex; align-items: center; gap: 0.7rem;
  padding-top: 1.1rem; border-top: 2px solid var(--ink);
}

.download-count {
  margin-right: auto;
  font-family: var(--display); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim);
}

/* .download is the card's action. Free listings render it as an <a> pointing
   at the file; paid ones render it as a <button> that starts checkout. Same
   skin either way — the button reset below is what keeps them identical. */
.download {
  display: inline-flex; align-items: center;
  padding: 0.65rem 1.15rem;
  font-family: var(--display); font-weight: 600; font-size: 0.76rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: var(--blue);
  transition: background .12s ease-out, color .12s ease-out, opacity .12s ease-out;
}
.download::after { content: "›"; margin-left: 0.5ch; font-size: 1.1em; line-height: 1; }
.download:hover { background: var(--ink); }
.entry[data-type="game"] .download { background: var(--yellow); color: var(--ink); }
.entry[data-type="game"] .download:hover { background: var(--ink); color: var(--yellow); }

button.download {
  border: 0; -webkit-appearance: none; appearance: none;
  cursor: pointer; line-height: inherit;
}

/* In-flight checkout: held down, not clickable, no hover lie. */
.download:disabled { cursor: default; opacity: 0.6; }
.download:disabled:hover { background: var(--blue); }
.entry[data-type="game"] .download:disabled:hover { background: var(--yellow); color: var(--ink); }

/* Empty / error state */
.registry-note {
  list-style: none; padding: 2rem; text-align: center;
  border: 2px solid var(--line);
  font-size: 0.95rem; color: var(--dim);
}

/* ===================================================== FOOTER */
.footer { background: var(--ink); }
.footer-in {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem;
  max-width: 1120px; margin: 0 auto; padding: 1.75rem;
}
.footer-mark {
  margin: 0; font-family: var(--display); font-size: 0.76rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: #B9C0CC;
}
.footer-mark span { color: var(--yellow); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .entry, .download, .btn { transition: none; }
  .entry:hover, .btn:hover { transform: none; }
  .hero-inner { animation: none; }
}
