/* Copyright (c) 2026 VisionStrikeStudios. All rights reserved. Styles for the ZombieSplat website. */

:root {
  --bg: #0f1410;
  --bg-2: #161d17;
  --card: #1c251d;
  --ink: #e8efe4;
  --muted: #a3b09e;
  --goo: #8fd14f;
  --goo-dark: #4f7f24;
  --blood: #c4302b;
  --line: #2c3a2d;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(ellipse at top, #1d2a1c 0%, var(--bg) 60%) fixed, var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

a { color: var(--goo); }

h1, h2, .brand { font-family: "Creepster", "Inter", cursive; font-weight: 400; letter-spacing: 1px; }

h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 24px; color: var(--goo); text-shadow: 0 3px 0 #000; }

h3 { margin: 0 0 6px; font-size: 1.1rem; }

sup { font-family: "Inter", sans-serif; font-size: 0.35em; vertical-align: super; }

/* ------------------------------------------------------------------ navigation */

.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 10px 24px;
  background: rgba(10, 14, 10, 0.88);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.brand { font-size: 1.8rem; color: var(--goo); text-decoration: none; }

.nav nav { display: flex; gap: 18px; flex-wrap: wrap; }

.nav nav a { color: var(--muted); text-decoration: none; font-weight: 600; }

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

/* ------------------------------------------------------------------ hero */

.hero {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
  max-width: 1150px; margin: 0 auto; padding: 56px 24px 40px;
}

.publisher { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: 3px; font-size: 0.8rem; }

.hero h1 {
  margin: 4px 0 8px; font-size: clamp(3.2rem, 11vw, 6.5rem); line-height: 1;
  color: var(--goo); text-shadow: 0 4px 0 var(--goo-dark), 0 10px 24px rgba(0, 0, 0, 0.7);
}

.tagline { font-size: 1.35rem; font-weight: 800; margin: 0 0 12px; }

.tagline em { color: var(--blood); font-style: normal; }

.lede { color: var(--muted); max-width: 560px; }

.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.button {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  border: 2px solid var(--goo); color: var(--goo); text-decoration: none; font-weight: 800;
  transition: transform 0.15s ease, background 0.15s ease;
}

.button:hover { transform: translateY(-2px); }

.button.primary { background: var(--goo); color: #10200a; }

.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 150px; padding: 8px 20px; border-radius: 12px;
  background: #050705; border: 2px solid var(--goo); color: var(--ink);
  text-decoration: none; font-weight: 800; font-size: 1.25rem; line-height: 1.2;
  transition: transform 0.15s ease;
}

.store small { font-weight: 400; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.store:hover { transform: translateY(-2px); }

.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 20px 0; }

.store-card {
  flex: 1 1 240px; max-width: 320px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}

.store-card h3 { color: var(--goo); }

.store-card p { margin: 0; color: var(--muted); }

.hero-shot { margin: 0; }

.hero-shot img {
  border-radius: var(--radius); border: 3px solid var(--line);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); transform: rotate(1.5deg);
  max-height: 620px; margin: 0 auto;
}

/* ------------------------------------------------------------------ stats */

.stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px;
  max-width: 1150px; margin: 0 auto; padding: 18px 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}

.stats div { text-align: center; }

.stats b { display: block; font-size: 2rem; color: var(--goo); }

.stats span { color: var(--muted); font-size: 0.9rem; }

/* ------------------------------------------------------------------ sections */

.section { max-width: 1150px; margin: 0 auto; padding: 64px 24px 16px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.card, .tale, .monsters > div {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}

.card h3, .monsters h3, .tale h3 { color: var(--goo); }

.card p, .tale p, .monsters p { margin: 0; color: var(--muted); }

.clip { display: flex; flex-direction: column; align-items: center; gap: 14px; }

.clip canvas {
  width: 300px; max-width: 100%; height: auto; aspect-ratio: 2 / 3;
  border-radius: var(--radius); border: 3px solid var(--line); background: #000;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

#video .intro { color: var(--muted); margin-top: -12px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.gallery img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }

.gallery figcaption { padding: 10px 12px; color: var(--muted); font-size: 0.9rem; }

.monsters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

.tales .intro { color: var(--muted); margin-top: -12px; }

.tale-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.tale { border-left: 4px solid var(--blood); }

.get { text-align: center; padding-bottom: 64px; }

.steps { display: inline-block; text-align: left; color: var(--muted); }

code { background: #0a0d0a; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--ink); }

.small { font-size: 0.85rem; color: var(--muted); }

/* ------------------------------------------------------------------ footer */

.footer { border-top: 1px solid var(--line); padding: 28px 24px 40px; text-align: center; color: var(--muted); }

.footer p { margin: 4px 0; }

/* ------------------------------------------------------------------ small screens */

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-shot img { transform: none; max-height: 480px; }
  .nav { padding: 10px 16px; }
  .section, .hero, .stats { padding-left: 16px; padding-right: 16px; }
}

/* Store cards are links to the store pages */
a.store-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
a.store-card:hover,
a.store-card:focus-visible {
  transform: translateY(-2px);
  border-color: #8fd14f;
}
.store-go {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: #8fd14f;
}

/* Leaderboard: a walking zombie by every score, the top three bigger, details on hover or tap */
.top-scores {
  max-width: 640px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.top-scores li {
  position: relative;
  display: grid;
  grid-template-columns: 2.2em 64px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  cursor: default;
  outline: none;
}
.top-scores li:hover, .top-scores li:focus-visible, .top-scores li.open { background: rgba(143, 209, 79, .07); }
.top-scores .rank { color: var(--goo); font-weight: 800; text-align: right; }
.top-scores .rank::after { content: "."; }
.top-scores .zombie {
  display: block;
  background-repeat: no-repeat;
  background-size: var(--strip) 100%;
  justify-self: center;
  animation: zombie-walk .9s steps(8) infinite;
  transform: scale(.8);
  transform-origin: bottom center;
}
@keyframes zombie-walk { to { background-position: calc(var(--strip) * -1) 0; } }
.top-scores li.empty { display: block; text-align: center; color: #b9ad9b; }
.top-scores .who { font-weight: 600; overflow-wrap: anywhere; }
.top-scores .pts { font-variant-numeric: tabular-nums; font-weight: 800; }
.top-scores .lvl { display: flex; align-items: center; gap: 6px; color: #b9ad9b; font-size: .9em; white-space: nowrap; }
.top-scores .lvl img { width: 32px; height: 15px; }
.top-scores .died { color: var(--blood); font-weight: 800; letter-spacing: .04em; }
.top-scores .survived { color: var(--goo); font-weight: 800; letter-spacing: .06em; text-shadow: 0 0 8px rgba(143, 209, 79, .5); }
/* 1st, 2nd and 3rd: bigger, with gold, silver and bronze */
.top-scores li.place-1, .top-scores li.place-2, .top-scores li.place-3 {
  margin: 6px 0;
  border: 1px solid var(--medal);
  border-radius: var(--radius);
  background: linear-gradient(90deg, color-mix(in srgb, var(--medal) 22%, transparent), transparent 70%);
}
.top-scores li.place-1 { --medal: #e8c14a; font-size: 1.6rem; padding: 12px 16px; }
.top-scores li.place-2 { --medal: #c9d1d6; font-size: 1.35rem; padding: 10px 16px; }
.top-scores li.place-3 { --medal: #cd8a4f; font-size: 1.18rem; padding: 9px 16px; }
.top-scores li[class^="place-"] .rank, .top-scores li[class^="place-"] .pts { color: var(--medal); }
.top-scores li.place-1 .who { font-family: "Creepster", "Inter", sans-serif; font-weight: 400; letter-spacing: .04em; }
.top-scores li[class^="place-"] .zombie { transform: scale(1); }
.top-scores li.place-1 .zombie { transform: scale(1.15); }
.top-scores li[class^="place-"] .lvl { font-size: .7em; }
/* The details: how long the run took and what it killed */
.top-scores .tip {
  display: none;
  position: absolute;
  z-index: 5;
  right: 8px;
  top: calc(100% - 4px);
  width: min(300px, 86vw);
  padding: 10px 14px;
  border: 1px solid var(--goo-dark);
  border-radius: var(--radius);
  background: #111811;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
  font-size: .9rem;
  line-height: 1.4;
  color: var(--ink);
}
.top-scores li:hover .tip, .top-scores li:focus-visible .tip, .top-scores li.open .tip { display: block; }
.top-scores li[class^="place-"] .tip { font-size: .9rem; }
.tip p { margin: 0 0 4px; }
.tip .tip-time { color: var(--goo); font-weight: 800; }
.tip .tip-note { color: var(--muted); font-size: .85em; }
.tip-list { list-style: none; margin: 6px 0 0; padding: 0; }
.tip-list li { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; border: 0; }
.tip-list li b { font-variant-numeric: tabular-nums; }
.tip-list .tip-more { color: var(--muted); }
@media (max-width: 520px) {
  .top-scores li { grid-template-columns: 1.6em 56px 1fr auto; gap: 8px; padding: 8px 6px; }
  .top-scores .lvl { grid-column: 3 / -1; }
  .top-scores li.place-1 { font-size: 1.3rem; }
  .top-scores li.place-2 { font-size: 1.15rem; }
  .top-scores li.place-3 { font-size: 1.05rem; }
  .top-scores li[class^="place-"] .lvl { font-size: .75em; }
  .top-scores .tip { left: 6px; right: 6px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .top-scores .zombie { animation: none; } }

/* How to splat: a small picture from the game on every card */
.card-pic { width: 64px; height: 64px; float: right; margin: 0 0 8px 12px; border-radius: 10px; }
.card { overflow: hidden; }

/* Also from VSS: the AIslop100 logo, kept sharp */
.advert-logo { margin: 8px 0 12px; }
.advert-logo img { display: inline-block; width: 417px; max-width: 90%; height: auto; image-rendering: pixelated; }

/* Slime goo dripping down behind the page (fixed, behind everything, never in the way) */
.goo { position: fixed; inset: 64px 0 auto 0; height: 100vh; z-index: -1; pointer-events: none; overflow: hidden; }
.goo-edge { position: absolute; top: 0; left: 0; width: 100%; height: 34px; fill: #2f5a1c; opacity: .55; }
.goo i {
  position: absolute;
  top: 10px;
  left: var(--x);
  width: var(--w);
  height: var(--len);
  border-radius: 0 0 999px 999px;
  background: linear-gradient(#2f5a1c, #4f8a2a);
  opacity: .5;
  transform-origin: top center;
  animation: goo-stretch var(--dur) ease-in var(--delay) infinite;
}
.goo b {
  position: absolute;
  top: calc(6px + var(--len));
  left: calc(var(--x) + var(--w) * .5);
  width: calc(var(--w) * 1.1);
  height: calc(var(--w) * 1.25);
  margin-left: calc(var(--w) * -.55);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: #4f8a2a;
  opacity: 0;
  animation: goo-drop var(--dur) ease-in var(--delay) infinite;
}
/* The drip slowly grows, the drop at its tip lets go and falls, then the drip shrinks back */
@keyframes goo-stretch {
  0% { transform: scaleY(.15); }
  70% { transform: scaleY(1); }
  78% { transform: scaleY(.55); }
  100% { transform: scaleY(.15); }
}
@keyframes goo-drop {
  0%, 62% { transform: translateY(0) scale(.6); opacity: 0; }
  68% { transform: translateY(0) scale(1); opacity: .55; }
  71% { transform: translateY(6px) scale(.9, 1.15); opacity: .55; }
  96% { transform: translateY(110vh) scale(.8, 1.2); opacity: .45; }
  97%, 100% { transform: translateY(110vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .goo i, .goo b { animation: none; }
  .goo i { transform: scaleY(.7); }
}

/* The music on/off button, bottom right */
.music-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 50;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(14, 20, 14, 0.85);
  color: #e8dfcf;
  font: 600 14px/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.music-toggle[aria-pressed="true"] {
  border-color: #8fd14f;
  color: #8fd14f;
}
.music-toggle:focus-visible {
  outline: 2px solid #8fd14f;
  outline-offset: 2px;
}

/* No ads, no microtransactions, no DLC */
.pledge { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 14px 0; }
.pledge li { border: 1px solid #e8c860; color: #e8c860; border-radius: 999px; padding: 4px 12px;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }
.pledge li::before { content: "\2715\00a0"; }

/* The advert for AIslop100 */
.advert { text-align: center; }
.advert h2 { margin-top: 4px; }
.advert-kicker { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; opacity: 0.75; }
.advert p { max-width: 640px; margin-left: auto; margin-right: auto; }

/* The studio link in the hero keeps the publisher line's look */
.publisher a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.publisher a:hover { border-bottom-style: solid; }

/* Sprites from the game beside each neighbour and tale, walking in place (8 frames) */
.monsters .sprite, .tale .sprite {
  display: block;
  width: var(--w);
  height: 80px;
  margin: 0 0 8px;
  background-repeat: no-repeat;
  background-size: calc(var(--w) * 8) 80px;
  animation: sprite-walk .9s steps(8) infinite;
}
@keyframes sprite-walk { to { background-position: calc(var(--w) * -8) 0; } }
.tale-icon { float: right; margin: 0 0 6px 12px; }
img.tale-icon { width: 64px; height: 64px; }
.tale .sprite.tale-icon { margin: 0 0 6px 12px; }
@media (prefers-reduced-motion: reduce) { .monsters .sprite, .tale .sprite { animation: none; } }
