/* One or Zero Games: neon green on near-black, matched to the logo. */

:root {
  --bg: #030806;
  --bg-raised: #07120c;
  --bg-card: #0a1710;
  --line: #1b3a25;
  --line-bright: #2a6b3d;
  --accent: #2dff62;
  --accent-dim: #1fb847;
  --text: #cfe9d6;
  --text-muted: #8fb39a;
  --warn: #ffd84d;
  --glow: 0 0 6px rgba(45, 255, 98, 0.55), 0 0 18px rgba(45, 255, 98, 0.25);
  --font: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas,
    "Liberation Mono", "DejaVu Sans Mono", monospace;
  --max: 64rem;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 4.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-shadow: var(--glow);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  color: var(--accent);
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-shadow: var(--glow);
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.35rem;
}

code {
  font-family: var(--font);
  color: var(--accent);
}

.skip {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--accent);
  color: var(--bg);
  padding: 0.4rem 0.8rem;
  z-index: 100;
}

.skip:focus {
  left: 0.5rem;
}

/* --- Nav ------------------------------------------------------------------ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 8, 6, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.site-nav .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  flex-wrap: wrap;
}

.brand {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.08em;
  text-shadow: var(--glow);
  white-space: nowrap;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}

.site-nav li + li {
  margin-top: 0;
}

.site-nav a:not(.brand) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-nav a:not(.brand):hover,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

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

.hero {
  position: relative;
  background: #000;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero img {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  /* Fade the photo's left and right edges into the black on wide screens. */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

@media (max-width: 60rem) {
  .hero img {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* CRT scanlines plus a soft vignette over the logo. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(3, 8, 6, 0.75) 100%);
  animation: scan 8s linear infinite;
}

@keyframes scan {
  from {
    background-position: 0 0, center;
  }
  to {
    background-position: 0 90px, center;
  }
}

.page-head {
  position: relative;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(to bottom, rgba(45, 255, 98, 0.035) 0 1px, transparent 1px 3px),
    var(--bg-raised);
}

.page-head .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1rem 1.75rem;
}

.page-head p {
  color: var(--text-muted);
  margin: 0;
}

/* --- Layout --------------------------------------------------------------- */

main {
  display: block;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.prose {
  max-width: 46rem;
}

.prose > h2:first-child {
  margin-top: 0.5rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text);
}

.muted {
  color: var(--text-muted);
}

.prompt::before {
  content: "> ";
  color: var(--accent);
}

/* --- Cards ---------------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
  align-items: start;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line-bright);
  border-radius: 4px;
  padding: 1.25rem;
  box-shadow: inset 0 0 0 1px rgba(45, 255, 98, 0.04), 0 0 24px rgba(45, 255, 98, 0.05);
}

.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.card.game {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card.game p {
  margin: 0;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.05rem 0.45rem;
  margin: 0 0.35rem 0.35rem 0;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--glow);
}

.badge:hover {
  background: rgba(45, 255, 98, 0.1);
}

.badge.soon {
  border-color: var(--line-bright);
  color: var(--text-muted);
  box-shadow: none;
  font-weight: 400;
}

.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.button:hover {
  background: rgba(45, 255, 98, 0.1);
}

/* --- Notices -------------------------------------------------------------- */

.notice {
  border: 1px solid var(--warn);
  border-left-width: 4px;
  background: rgba(255, 216, 77, 0.06);
  padding: 0.9rem 1rem;
  margin: 1.25rem 0;
  border-radius: 3px;
}

.notice strong {
  color: var(--warn);
}

.notice > :last-child {
  margin-bottom: 0;
}

/* Wording still to be written (e.g. iOS / App Store). Visible on purpose. */
.placeholder {
  border: 1px dashed var(--text-muted);
  color: var(--text-muted);
  padding: 0.6rem 0.9rem;
  margin: 1rem 0;
  border-radius: 3px;
  font-size: 0.9rem;
}

.placeholder::before {
  content: "[Placeholder] ";
  color: var(--warn);
}

/* --- Tables --------------------------------------------------------------- */

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 3px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 36rem;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--accent);
  background: var(--bg-raised);
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 40rem) {
  .table-scroll {
    border: 0;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    min-width: 0;
  }

  thead {
    display: none;
  }

  tr {
    border: 1px solid var(--line);
    border-radius: 3px;
    margin-bottom: 0.75rem;
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    color: var(--accent);
    font-size: 0.8rem;
  }
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-raised);
}

.site-footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.site-footer li + li {
  margin-top: 0;
}

.site-footer p {
  margin: 0;
}

/* --- Small screens -------------------------------------------------------- */

@media (max-width: 30rem) {
  body {
    font-size: 0.95rem;
  }

  .site-nav .inner {
    justify-content: center;
  }

  .site-nav ul {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
