/* Where Ya Gamin — retro-arcade studio site */

:root {
  --bg: #07060f;
  --bg-elev: #12101c;
  --bg-card: #0e0c18;
  --bg-card-hover: #151322;
  --text: #f2f0ff;
  --text-dim: #a8a4bf;
  --cyan: #00f0ff;
  --magenta: #ff2ec8;
  --lime: #c8ff3b;
  --orange: #ff9f1c;
  --gold: #ffd029;
  --line: #2a2740;
  --line-strong: #3d3a58;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font-display: "Press Start 2P", ui-monospace, "Cascadia Code", monospace;
  --font-body: "Outfit", "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
  --header-h: 4.25rem;
  --radius: 6px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  min-height: 100%;
  overflow-x: hidden;
}

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

a {
  color: var(--cyan);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--lime);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--cyan);
  color: #05040a;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--wrap), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* Atmosphere: stars, vignette, CRT scanlines */
.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

#stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% -10%, rgba(0, 240, 255, 0.08), transparent 42%),
    radial-gradient(ellipse at 90% 20%, rgba(255, 46, 200, 0.07), transparent 45%),
    radial-gradient(ellipse at 50% 120%, rgba(122, 92, 255, 0.08), transparent 40%),
    radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.55) 100%);
}

.scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.55;
}

.scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 240, 255, 0.035) 50%,
    transparent 100%
  );
  background-size: 100% 220%;
  animation: scan-sweep 9s linear infinite;
  opacity: 0.7;
}

@keyframes scan-sweep {
  from { background-position: 0 -40%; }
  to { background-position: 0 140%; }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: rgba(7, 6, 15, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.site-header.is-scrolled {
  background: rgba(7, 6, 15, 0.92);
  border-bottom-color: var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}

.logo img {
  width: 40px;
  height: 40px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25);
}

.logo-text {
  font-family: var(--font-display);
  font-size: clamp(0.48rem, 2.1vw, 0.62rem);
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
}

.logo:hover .logo-text,
.logo:hover {
  color: var(--cyan);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  font-family: var(--font-display);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
  padding: 0.4rem 0;
}

.nav a:hover {
  color: var(--cyan);
}

/* Main sits above atmosphere */
main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 8vw, 6.5rem) 0 clamp(3.5rem, 9vw, 7rem);
  text-align: center;
}

.kicker {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(0.52rem, 1.6vw, 0.7rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.55);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 6.4vw, 3.15rem);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  text-shadow:
    0 0 24px rgba(255, 46, 200, 0.35),
    0 0 42px rgba(0, 240, 255, 0.2),
    3px 3px 0 #1a0a18;
}

.lede {
  margin: 1.5rem auto 2rem;
  max-width: 38rem;
  color: var(--text-dim);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.25rem;
  min-height: 3rem;
  border: 3px solid var(--cyan);
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.btn-primary {
  background: var(--cyan);
  color: #05040a;
  box-shadow:
    0 0 0 0 var(--magenta),
    0 0 22px rgba(0, 240, 255, 0.35);
}

.btn-primary:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: #05040a;
  box-shadow: 4px 4px 0 var(--magenta), 0 0 22px rgba(200, 255, 59, 0.3);
  transform: translate(-2px, -2px);
}

.btn-ghost {
  background: transparent;
  color: var(--cyan);
  box-shadow: 4px 4px 0 rgba(255, 46, 200, 0.5);
}

.btn-ghost:hover {
  background: var(--cyan);
  color: #05040a;
  box-shadow: 4px 4px 0 var(--magenta);
  transform: translate(-2px, -2px);
}

.ext {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

/* Games */
.games {
  padding: 0 0 4.5rem;
}

.section-title {
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 2vw, 0.9rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--magenta);
  text-shadow: 0 0 14px rgba(255, 46, 200, 0.4);
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 3px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.game-card:hover {
  border-color: var(--cyan);
  transform: translateY(-3px);
}

.game-art {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-bottom: 3px solid var(--line);
}

.game-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-art img.pixelated {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  object-position: 70% 60%;
}

.badge {
  display: inline-block;
  align-self: flex-start;
  margin: 0 0 0.15rem;
  font-family: var(--font-display);
  font-size: 0.75rem; /* 12px — stays above Chrome's minimum font size */
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--lime);
  border: 2px solid var(--lime);
  padding: 0.3rem 0.45rem;
}

.game-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.35rem 1.25rem 1.5rem;
  flex: 1;
}

.game-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.4vw, 1.15rem);
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.game-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.game-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 2px solid var(--line-strong);
  flex-shrink: 0;
}

.game-tag {
  margin: 0;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.game-body p {
  margin: 0;
  color: var(--text-dim);
  font-size: 1.05rem;
}

.game-body > .btn {
  margin-top: auto;
  align-self: flex-start;
  padding-top: 0.95rem;
}

/* Coming soon */
.soon-card {
  border: 3px dashed var(--line-strong);
  background: rgba(14, 12, 24, 0.45);
  padding: 1.5rem 1.25rem;
  text-align: center;
  color: var(--text-dim);
}

.soon-kicker {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 0.48rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.soon-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.soon-card p:last-child {
  margin: 0;
}

/* About */
.about {
  padding: 1rem 0 4rem;
}

.about-inner {
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.about-inner .section-title {
  margin-bottom: 1rem;
}

.about-copy {
  margin: 0;
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  line-height: 1.55;
  color: var(--text);
}

/* Community */
.community {
  padding: 0 0 5rem;
}

.community-card {
  border: 3px solid var(--line);
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.07), transparent 40%),
    linear-gradient(225deg, rgba(255, 46, 200, 0.08), transparent 45%),
    var(--bg-card);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
  text-align: center;
}

.community-card .section-title {
  margin-bottom: 0.85rem;
}

.community-name {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 2.4vw, 1.15rem);
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.community-meta {
  margin: 0 0 0.75rem;
  color: var(--lime);
  font-weight: 600;
}

.community-copy p {
  color: var(--text-dim);
}

.community-copy .btn {
  margin-top: 1.1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0 2.25rem;
  background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-meta {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

/* Layout: two big cards, coming soon full width below */
@media (min-width: 840px) {
  .game-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }

  .soon-card {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 1rem 1.5rem;
    padding: 1.25rem 1.5rem;
  }

  .soon-card .soon-title {
    margin: 0;
  }

  .soon-card p:last-child {
    font-size: 1rem;
  }

  .game-body {
    padding: 1.5rem 1.5rem 1.7rem;
  }

  .btn {
    font-size: 0.64rem;
  }
}

@media (max-width: 419px) {
  .wrap {
    width: min(var(--wrap), calc(100% - 1.5rem));
  }

  .logo-text {
    font-size: 0.45rem;
    letter-spacing: 0.04em;
  }

  .nav {
    gap: 0.85rem;
  }

  .game-body .btn,
  .community-copy .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scanlines::after,
  .btn,
  .game-card {
    animation: none;
    transition: none;
  }

  .btn-primary:hover,
  .btn-ghost:hover,
  .game-card:hover {
    transform: none;
  }
}
