/* ============================================================
   reubenwatson.com - the games hub.
   A short, scrollable landing page: one card per game. Each card
   carries the palette of the game it links to, so the hub reads as
   an index of the actual things rather than a generic menu.
   ============================================================ */

:root {
  --bg-0: #070910;
  --bg-1: #121729;
  --text: #eef1f7;
  --text-dim: #98a3b8;
  --toxic: #7dff5a;
  --laser: #ff5ad0;
  --cyan: #2ff3ff;
  --amber: #ffb13d;
}

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

/* The gradient is pinned to the viewport so a short page does not leave a
   band of bare background below the content. */
html { min-height: 100%; background: var(--bg-0); }

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 15% -10%, rgba(125, 255, 90, 0.10), transparent 62%),
    radial-gradient(900px 560px at 88% 8%, rgba(255, 90, 208, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 55%);
  background-attachment: fixed;   /* after the shorthand, which would reset it */
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top, 0px) + clamp(2.2rem, 8vw, 4.5rem))
    clamp(1rem, 4vw, 2rem)
    calc(env(safe-area-inset-bottom, 0px) + 2.5rem);
}

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

.head { text-align: center; margin-bottom: clamp(1.8rem, 5vw, 3rem); }

.kicker {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(0.62rem, 2vw, 0.76rem);
  letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--laser);
}

.brand {
  margin-top: 0.35rem;
  font-family: "Creepster", "Orbitron", sans-serif;
  font-size: clamp(3rem, 15vw, 6rem);
  line-height: 0.95; letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 0 18px rgba(125, 255, 90, 0.55), 0 0 48px rgba(255, 90, 208, 0.35);
}

.sub {
  margin: 0.7rem auto 0; max-width: 34ch;
  font-size: clamp(0.85rem, 2.4vw, 0.95rem);
  line-height: 1.5; color: var(--text-dim);
}

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

.grid {
  list-style: none;
  display: grid; gap: clamp(0.9rem, 2.5vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.card {
  --accent: var(--toxic);
  display: flex; flex-direction: column; height: 100%;
  border-radius: 20px; overflow: hidden;
  text-decoration: none; color: inherit;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card:hover, .card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 28px -8px var(--accent);
  outline: none;
}
.card:active { transform: translateY(-1px); }

.card-zombies { --accent: var(--toxic); }
.card-mech { --accent: var(--cyan); }

/* Illustrated banner. Emoji keeps it dependency-free and reads at any size. */
.art {
  position: relative;
  height: clamp(120px, 26vw, 168px);
  display: flex; align-items: center; justify-content: center; gap: 8%;
  font-size: clamp(2.6rem, 9vw, 4rem);
  background:
    radial-gradient(120% 90% at 50% 120%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.5));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red 10%, blue)) {
  .art { background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.55)); }
}

.art-cat { filter: drop-shadow(0 0 12px rgba(255, 90, 208, 0.8)); }
.art-zom { filter: drop-shadow(0 0 12px rgba(125, 255, 90, 0.7)); }
.art-mech { filter: drop-shadow(0 0 14px rgba(47, 243, 255, 0.7)); }

/* The cat's laser, mid-shot */
.art-beam {
  width: clamp(46px, 12vw, 88px); height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 90, 208, 0.15), var(--laser));
  box-shadow: 0 0 14px var(--laser);
  animation: zap 1.6s ease-in-out infinite;
}
@keyframes zap {
  0%, 62%, 100% { opacity: 0.25; transform: scaleX(0.6); }
  70%, 88% { opacity: 1; transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
  .art-beam { animation: none; opacity: 1; }
}

.body { padding: clamp(1rem, 3vw, 1.35rem); display: flex; flex-direction: column; flex: 1; }

.body h2 {
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  font-weight: 800; letter-spacing: 0.02em; color: #fff;
}

.body p {
  margin: 0.55rem 0 1rem;
  font-size: clamp(0.84rem, 2.3vw, 0.92rem);
  line-height: 1.55; color: var(--text-dim);
  flex: 1;
}

.play {
  align-self: flex-start;
  font-family: "Orbitron", sans-serif;
  font-size: 0.74rem; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.55rem 1.1rem; border-radius: 999px;
  color: #07120b;
  background: var(--accent);
  box-shadow: 0 0 18px -4px var(--accent);
}

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

.foot {
  margin-top: clamp(2rem, 6vw, 3.2rem);
  text-align: center;
  font-family: "Orbitron", sans-serif;
  font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: rgba(152, 163, 184, 0.55);
}
