/* Wesley Vorst: one stylesheet for the whole site.
   Colors come from Wesley's portrait: the navy shirt, the tie-dye backpack, the gold hair.
   To change a color everywhere, change it here in :root. */

:root {
  --bg: #0e1630;
  --bg-raised: #141f42;
  --card: #18244b;
  --card-hover: #1d2b59;
  --line: rgba(173, 190, 255, 0.14);
  --text: #f4f6fc;
  --muted: #b3bdd8;
  --ink: #160f2e; /* dark text on bright buttons */

  --gold: #ffc94a;
  --pink: #ff5ca8;
  --orange: #ff9a3d;
  --yellow: #ffe14d;
  --green: #5fe39a;
  --cyan: #45d3ff;
  --purple: #a58bff;

  --tie-dye: conic-gradient(from 210deg, #ff5ca8, #ff9a3d, #ffe14d, #5fe39a, #45d3ff, #a58bff, #ff5ca8);
  --rainbow: linear-gradient(90deg, #ff5ca8, #ff9a3d, #ffe14d, #5fe39a, #45d3ff, #a58bff);

  --radius: 22px;
  /* Rounded letters on iPhones, iPads and Safari; the normal bold system font everywhere else. */
  --font-fun: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  color-scheme: dark;
}

/* ---------- Basics ---------- */

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 520px at 8% -8%, rgba(255, 92, 168, 0.16), transparent 62%),
    radial-gradient(820px 520px at 100% 0%, rgba(69, 211, 255, 0.13), transparent 62%),
    radial-gradient(1.6px 1.6px at 24px 36px, rgba(255, 255, 255, 0.4), transparent 60%),
    radial-gradient(1.2px 1.2px at 112px 128px, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(1.4px 1.4px at 168px 62px, rgba(255, 255, 255, 0.22), transparent 60%);
  background-size: auto, auto, 190px 190px, 190px 190px, 190px 190px;
  background-repeat: no-repeat, no-repeat, repeat, repeat, repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* The tie-dye stripe across the top of every page */
body::before {
  content: "";
  display: block;
  height: 6px;
  background: var(--rainbow);
}

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

a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--font-fun);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 12px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); max-width: 38em; }

.kicker {
  font-family: var(--font-fun);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.6em;
}

.rainbow-text {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Header and footer ---------- */

.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 18px; padding-bottom: 18px;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-fun); font-weight: 800; font-size: 1.3rem; white-space: nowrap;
  color: var(--text); text-decoration: none;
}
.brand img { width: 40px; height: 40px; border-radius: 12px; box-shadow: 0 4px 14px rgba(255, 92, 168, 0.35); }
.brand:hover { color: var(--text); }

.site-nav { display: flex; gap: 6px; }
.site-nav a {
  font-family: var(--font-fun); font-weight: 700;
  color: var(--muted); text-decoration: none;
  padding: 8px 16px; border-radius: 999px;
}
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--gold); }

main { flex: 1; }

.site-footer { margin-top: 80px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 28px; padding-bottom: 36px;
}
.site-footer p { margin: 0; }

/* ---------- Buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-fun); font-weight: 800; font-size: 1.05rem;
  padding: 0.75em 1.35em; border-radius: 999px;
  color: var(--text); text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--line);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); }

/* The gold button looks like an arcade button: it pushes down when you press it */
.btn-primary {
  color: var(--ink); background: var(--gold); border-color: transparent;
  box-shadow: 0 6px 0 #c48a10;
}
.btn-primary:hover { color: var(--ink); background: #ffd368; transform: translateY(-1px); box-shadow: 0 7px 0 #c48a10; }
.btn-primary:active { transform: translateY(4px); box-shadow: 0 2px 0 #c48a10; }

/* ---------- Home: hero ---------- */

.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 48px;
  padding-top: 40px; padding-bottom: 56px;
}
.hero h1 { margin-bottom: 0.35em; }
.hero .kicker { font-size: 1.15rem; letter-spacing: 0; text-transform: none; }

.portrait { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin: 0 auto; }
.portrait::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--tie-dye);
  animation: spin 16s linear infinite;
  box-shadow: 0 20px 60px rgba(165, 139, 255, 0.35);
}
.portrait img {
  position: absolute; inset: 11px; width: calc(100% - 22px); height: calc(100% - 22px);
  border-radius: 50%; object-fit: cover; object-position: 50% 28%;
  border: 6px solid var(--bg);
}
@keyframes spin { to { transform: rotate(360deg); } }

.sticker {
  position: absolute; z-index: 1;
  font-family: var(--font-fun); font-weight: 800; font-size: 0.95rem; white-space: nowrap;
  color: var(--ink); background: var(--text);
  padding: 6px 14px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.sticker-1 { top: 6%; left: -6%; transform: rotate(-8deg); background: var(--yellow); }
.sticker-2 { top: 44%; right: -10%; transform: rotate(6deg); background: var(--green); }
.sticker-3 { bottom: 4%; left: 2%; transform: rotate(-4deg); background: var(--cyan); }

/* ---------- Home: scoreboard ---------- */

.scoreboard {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 0 0 72px; padding: 0; list-style: none;
}
.scoreboard li { text-align: center; padding: 22px 12px; }
.scoreboard li + li { border-left: 1px solid var(--line); }
.scoreboard strong {
  display: block; font-family: var(--font-fun); font-weight: 900;
  font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1;
}
.scoreboard li:nth-child(1) strong { color: var(--gold); }
.scoreboard li:nth-child(2) strong { color: var(--pink); }
.scoreboard li:nth-child(3) strong { color: var(--cyan); }
.scoreboard span { color: var(--muted); font-weight: 600; }

/* ---------- Section headings ---------- */

.section { margin-bottom: 72px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.section-head a { font-family: var(--font-fun); font-weight: 800; white-space: nowrap; }

/* ---------- Game cards ---------- */

.game-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px;
  margin: 0; padding: 0; list-style: none;
}

.game-card { --accent: var(--gold); }
.game-card a {
  display: flex; flex-direction: column; height: 100%;
  color: var(--text); text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.game-card a:hover {
  background: var(--card-hover);
  transform: translateY(-5px) rotate(-0.4deg);
  box-shadow: 0 0 0 3px var(--accent), 0 18px 40px rgba(0, 0, 0, 0.35);
}
.game-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.game-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.game-card :is(h2, h3) { margin: 0; font-size: 1.35rem; }
.game-card p { color: var(--muted); margin: 0; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 6px 0 0; list-style: none; }
.tags li {
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}

/* ---------- Status chips: Playable, Building, Planning, Finished ---------- */

.status {
  display: inline-flex; align-items: center; gap: 0.45em; align-self: flex-start;
  font-family: var(--font-fun); font-weight: 800; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3em 0.8em; border-radius: 999px;
}
.status::before { content: ""; width: 0.6em; height: 0.6em; border-radius: 50%; background: currentColor; }
.status-playable { color: var(--green); background: rgba(95, 227, 154, 0.13); }
.status-building { color: var(--gold); background: rgba(255, 201, 74, 0.13); }
.status-planning { color: var(--purple); background: rgba(165, 139, 255, 0.16); }
.status-finished { color: var(--cyan); background: rgba(69, 211, 255, 0.13); }

.status-key { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0 0 36px; padding: 0; list-style: none; color: var(--muted); }
.status-key li { display: flex; align-items: center; gap: 10px; }

/* ---------- Home: "Up next" spotlight ---------- */

.spotlight {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 36px;
  padding: 28px; border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, rgba(255, 154, 61, 0.2), rgba(255, 92, 168, 0.1) 45%, rgba(20, 31, 66, 0.9));
  border: 1px solid var(--line);
}
.spotlight img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.spotlight h2 { margin-bottom: 0.4em; }
.spotlight p { color: var(--muted); }
.spotlight .actions { margin-top: 18px; }

/* ---------- Game pages ---------- */

.back { display: inline-block; margin: 8px 0 24px; font-family: var(--font-fun); font-weight: 800; text-decoration: none; }
.back:hover { text-decoration: underline; }

.game-hero { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; margin-bottom: 56px; }
.game-hero .status { margin-bottom: 14px; }
.game-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); }
.game-hero img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 0 0 4px var(--accent, var(--gold)), 0 24px 60px rgba(0, 0, 0, 0.4);
}

.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px;
  margin: 26px 0 0;
}
.facts div { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.facts dt { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 700; }

.panel {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px); margin-bottom: 28px;
}
.panel > :last-child { margin-bottom: 0; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.two-col > .panel { margin-bottom: 0; height: 100%; }
.two-col + * { margin-top: 28px; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.features li { position: relative; padding-left: 34px; }
.features li::before {
  content: "✦"; position: absolute; left: 0; top: -1px;
  font-size: 1.2rem; color: var(--accent, var(--gold));
}

.note {
  border-left: 5px solid var(--purple); background: rgba(165, 139, 255, 0.1);
  border-radius: 0 14px 14px 0; padding: 14px 18px; color: var(--muted);
  margin: 0 0 28px;
}

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.gallery figure { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.gallery a { display: block; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.25s ease; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { padding: 10px 14px 12px; font-size: 0.95rem; color: var(--muted); }

.updates { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 3px solid var(--line); display: grid; gap: 22px; }
.updates li { position: relative; }
.updates li::before {
  content: ""; position: absolute; left: -36px; top: 5px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--accent, var(--gold));
}
.updates time { display: block; font-family: var(--font-fun); font-weight: 800; color: var(--accent, var(--gold)); }
.updates p { margin: 2px 0 0; }

/* ---------- About page ---------- */

.player-card {
  display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: center;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  padding: clamp(22px, 4vw, 40px); margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.player-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--rainbow);
}
.player-card .portrait { width: 100%; max-width: 260px; }
.player-stats { display: grid; gap: 14px; margin: 0; }
.player-stats div { display: grid; grid-template-columns: 11em 1fr; gap: 16px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
.player-stats div:last-child { border-bottom: 0; padding-bottom: 0; }
.player-stats dt { font-family: var(--font-fun); font-weight: 800; color: var(--gold); }
.player-stats dd { margin: 0; }

/* ---------- 404 ---------- */

.lost { text-align: center; padding: 60px 0 20px; }
.lost .big { font-family: var(--font-fun); font-weight: 900; font-size: clamp(5rem, 18vw, 9rem); line-height: 1; margin: 0 0 12px; }
.lost .lead { margin-left: auto; margin-right: auto; }
.lost .actions { justify-content: center; }

/* ---------- Phones and tablets ---------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 16px; text-align: center; }
  .hero .portrait { order: -1; width: min(72vw, 300px); }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .actions { justify-content: center; }
  .spotlight, .game-hero, .two-col { grid-template-columns: 1fr; }
  .game-hero img { order: -1; }
  .player-card { grid-template-columns: 1fr; text-align: center; }
  .player-card .portrait { max-width: 220px; }
  .player-stats { text-align: left; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .brand { font-size: 1.1rem; gap: 10px; }
  .brand img { width: 34px; height: 34px; border-radius: 10px; }
  .site-nav { gap: 2px; }
  .site-nav a { padding: 8px 10px; }
  .scoreboard li { padding: 14px 6px; }
  .scoreboard span { display: block; font-size: 0.85rem; line-height: 1.3; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .spotlight { padding: 18px; }
  .player-stats div { grid-template-columns: 1fr; gap: 2px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts div { padding: 8px 12px; }
  .sticker { font-size: 0.8rem; padding: 4px 10px; }
  .sticker-1 { left: -8%; }
  .sticker-2 { right: -12%; }
}

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