/* Second Player Studios — shared styles
   Studio identity: warm black + engraved gold (from the twin-wolf logo).
   Each game page re-skins the content area with its own palette and typeface. */

:root {
  --bg: #0c0a08;
  --bg-2: #14100b;
  --bg-3: #1c1610;
  --ink: #f3eadb;
  --muted: #b3a58e;
  --gold: #d9a547;
  --gold-hi: #f6d68e;
  --gold-lo: #8c5f1d;
  --line: rgba(217, 165, 71, 0.22);
  --radius: 14px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }

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

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--gold); color: #000; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 10, 8, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 40px; height: auto; flex: none; }
.brand span {
  font: 600 15px/1.1 var(--display);
  letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}

.nav { display: flex; gap: clamp(12px, 3vw, 28px); }
.nav a {
  color: var(--muted); text-decoration: none;
  font: 500 14px/1 var(--body); letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 0;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-hi); }

@media (max-width: 560px) {
  .brand span { display: none; }
}

/* ---------- shared bits ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 13px/1 var(--body); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

.gold-text {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 55%, var(--gold-lo) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.section { padding: clamp(64px, 10vw, 120px) 0; }
.section-head { text-align: center; margin: 0 auto clamp(36px, 6vw, 56px); max-width: 640px; }
.section-head h2 {
  font: 600 clamp(30px, 5vw, 44px)/1.15 var(--display);
  margin: 14px 0 12px; letter-spacing: 0.02em;
}
.section-head p { color: var(--muted); margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 15px/1 var(--body); letter-spacing: 0.02em; text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1206; }
.btn-gold:hover { color: #000; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }

/* Store buttons. A link still pointing at "#..." has no real store URL yet
   and stays hidden until one is filled in. */
.stores { display: flex; flex-wrap: wrap; gap: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 8px 18px 8px 14px; border-radius: 12px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.store:hover { color: #fff; border-color: #fff; transform: translateY(-1px); }
.store svg { width: 24px; height: 24px; flex: none; }
.store small { display: block; font: 500 10px/1.1 var(--body); letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }
.store strong { display: block; font: 600 17px/1.15 var(--body); }
.store[href^="#"] { display: none; }

/* ---------- home: hero ---------- */

.hero {
  position: relative; text-align: center; overflow: hidden;
  padding: clamp(48px, 9vw, 96px) 0 clamp(64px, 10vw, 112px);
  background:
    radial-gradient(60% 55% at 50% 38%, rgba(217, 165, 71, 0.16), transparent 70%),
    var(--bg);
}
.hero-emblem {
  width: min(380px, 72vw); margin: 0 auto;
  filter: drop-shadow(0 18px 50px rgba(217, 165, 71, 0.18));
  animation: rise 1.2s ease-out both;
}
.hero h1 {
  margin: clamp(18px, 3vw, 28px) 0 0;
  font: 700 clamp(36px, 8vw, 76px)/1.02 var(--display);
  letter-spacing: 0.04em; text-transform: uppercase;
  animation: rise 1.2s 0.15s ease-out both;
}
.hero .rule {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 12px auto 0; max-width: 560px;
  font: 600 clamp(14px, 2.4vw, 20px)/1 var(--display); letter-spacing: 0.5em;
  color: var(--gold); text-transform: uppercase;
  animation: rise 1.2s 0.25s ease-out both;
}
.hero .rule::before, .hero .rule::after {
  content: ""; flex: 1; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.hero .rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.hero .tagline {
  margin: 26px auto 0; max-width: 34ch; color: var(--muted);
  font: 500 clamp(15px, 2.2vw, 18px)/1.5 var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  animation: rise 1.2s 0.35s ease-out both;
}
.hero .actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px;
  animation: rise 1.2s 0.45s ease-out both;
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- home: games ---------- */

.games { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 28px); }
@media (max-width: 820px) { .game-grid { grid-template-columns: minmax(0, 1fr); } }

.game-card {
  display: flex; flex-direction: column;
  border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-3);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover { transform: translateY(-3px); border-color: rgba(217, 165, 71, 0.5); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.game-card .art { aspect-ratio: 1024 / 500; overflow: hidden; }
.game-card .art img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { display: flex; flex-direction: column; gap: 16px; padding: clamp(20px, 3vw, 28px); flex: 1; }
.game-card .title-row { display: flex; align-items: center; gap: 14px; }
.game-card .title-row img { width: 60px; height: 60px; border-radius: 14px; flex: none; }
.game-card h3 { margin: 0; font-size: 26px; line-height: 1.1; }
.game-card .genre { margin: 4px 0 0; font-size: 14px; opacity: 0.75; }
.game-card p.pitch { margin: 0; }
.game-card .links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }
.game-card .links .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { font-size: 13px; line-height: 1; padding: 8px 11px; border-radius: 999px; }

.game-card.necro { background: linear-gradient(180deg, #11222a 0%, #0c171c 100%); color: #e4f1ea; }
.game-card.necro h3 { font: 400 40px/0.9 "VT323", monospace; letter-spacing: 0.02em; color: #e9dcb6; }
.game-card.necro .chips li { background: rgba(127, 214, 194, 0.12); color: #a9ead8; }
.game-card.necro .btn-ghost { border-color: rgba(127, 214, 194, 0.35); color: #e4f1ea; }
.game-card.necro .btn-ghost:hover { border-color: #7fd6c2; color: #fff; }

.game-card.crit { background: linear-gradient(180deg, #fff8ea 0%, #fdeed3 100%); color: #3d2b19; }
.game-card.crit h3 { font: 800 32px/1 "Sniglet", system-ui, sans-serif; color: #7a4a1f; }
.game-card.crit .chips li { background: #e6f4da; color: #3f6b2a; }
.game-card.crit .btn-ghost { border-color: rgba(122, 74, 31, 0.3); color: #5a3a1c; }
.game-card.crit .btn-ghost:hover { border-color: #7a4a1f; color: #3d2b19; }
.game-card.crit a:not(.btn):not(.store) { color: #8a4b12; }

/* ---------- home: promise ---------- */

.promise { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.promise-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); }
@media (max-width: 760px) { .promise-grid { grid-template-columns: minmax(0, 1fr); } }
.promise-item { text-align: center; }
.promise-item .icon {
  width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--gold);
  background: radial-gradient(circle, rgba(217, 165, 71, 0.14), transparent 70%);
}
.promise-item .icon svg { width: 26px; height: 26px; }
.promise-item h3 { font: 600 20px/1.25 var(--display); letter-spacing: 0.04em; margin: 0 0 8px; color: var(--gold-hi); }
.promise-item p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- home: about + contact ---------- */

.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 6vw, 72px); align-items: center; }
@media (max-width: 820px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }
.about-grid .logo-frame {
  border-radius: 20px; overflow: hidden; border: 1px solid var(--line);
  max-width: 440px; margin: 0 auto; width: 100%;
}
.about-grid h2 { font: 600 clamp(30px, 5vw, 42px)/1.15 var(--display); margin: 14px 0 18px; }
.about-grid p { color: #ddd1bd; margin: 0 0 16px; }
.about-grid p.lead { font-size: 19px; color: var(--ink); }

.contact { text-align: center; background: radial-gradient(50% 80% at 50% 100%, rgba(217, 165, 71, 0.12), transparent 70%), var(--bg); }
.contact .mail {
  display: inline-block; margin-top: 8px;
  font: 600 clamp(20px, 4.4vw, 32px)/1.2 var(--body); letter-spacing: -0.01em;
  text-decoration: none; overflow-wrap: anywhere;
}
.contact .sub { color: var(--muted); margin: 18px 0 0; }

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

.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; background: var(--bg); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.site-footer .brand img { width: 32px; }
.site-footer .brand span { font-size: 13px; display: inline; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold-hi); }

/* ---------- game pages ---------- */

/* The banner carries the game's own logo art; the bar below it is the
   app-store-style header (icon, name, pitch, store buttons). */
.game-hero .banner { position: relative; height: clamp(220px, 40vw, 580px); overflow: hidden; }
.game-hero .banner img { width: 100%; height: 100%; object-fit: cover; }
.game-hero .banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; }
.game-hero .hero-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 24px 40px; padding-top: clamp(24px, 4vw, 40px); padding-bottom: clamp(8px, 2vw, 16px);
}
.game-hero .id { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 22px); min-width: 0; }
.game-hero .id > img { width: clamp(72px, 10vw, 104px); height: auto; border-radius: 22%; flex: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.game-hero h1 { margin: 0; }
.game-hero .lede { margin: 6px 0 0; max-width: 34ch; }
.game-hero .meta { margin: 8px 0 0; font-size: 14px; opacity: 0.8; }

.game-main { padding: clamp(56px, 8vw, 96px) 0; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: minmax(0, 1fr); } }

.prose h2 { margin: 0 0 16px; }
.prose p { margin: 0 0 16px; }

.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
@media (max-width: 600px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { padding: 20px; border-radius: var(--radius); }
.feature h3 { margin: 0 0 6px; }
.feature p { margin: 0; font-size: 15px; line-height: 1.55; }

.facts { border-radius: var(--radius); padding: 24px; position: sticky; top: 88px; }
.facts h2 { margin: 0 0 14px; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; font-size: 15px; }
.facts dt { opacity: 0.7; }
.facts dd { margin: 0; font-weight: 600; }
.facts .stores { margin-top: 22px; }
.facts .legal { margin-top: 22px; padding-top: 18px; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 18%, transparent); }
.facts .legal h3 { margin: 0 0 8px; font: 600 12px/1.2 var(--body); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.facts .legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }

.gallery-wrap { padding: 0 0 clamp(56px, 8vw, 96px); }
.gallery-wrap h2 { margin: 0 0 18px; }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(200px, 26vw, 250px);
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 18px; margin: 0 calc(var(--gutter) * -1);
  scrollbar-width: thin;
}
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; }
.gallery figcaption { font-size: 13px; margin-top: 8px; opacity: 0.75; }

/* Necromangler skin: night water, bone, spectral teal, pixel type */
.theme-necro { background: #0b1418; color: #dce9e2; }
.theme-necro .game-hero .banner img { object-position: 22% 50%; image-rendering: pixelated; }
.theme-necro .game-hero .banner::after { background: linear-gradient(0deg, #0b1418, transparent); }
.theme-necro .game-hero h1 { font: 400 clamp(44px, 7vw, 64px)/0.9 "VT323", monospace; color: #efe2bd; }
.theme-necro .game-hero .lede { font: 400 clamp(22px, 3vw, 28px)/1.1 "VT323", monospace; color: #a9ead8; }
.theme-necro h2, .theme-necro .feature h3, .theme-necro .facts h2 { font: 400 34px/1 "VT323", monospace; color: #efe2bd; letter-spacing: 0.01em; }
.theme-necro .feature h3 { font-size: 26px; color: #a9ead8; }
.theme-necro .feature { background: #10202a; border: 1px solid rgba(127, 214, 194, 0.16); }
.theme-necro .facts { background: #10202a; border: 1px solid rgba(127, 214, 194, 0.22); }
.theme-necro .gallery img { image-rendering: pixelated; border: 1px solid rgba(127, 214, 194, 0.18); }
.theme-necro main a:not(.btn):not(.store) { color: #8fe3cd; }

/* Critterton skin: cream paper, meadow green, sky, rounded type */
.theme-crit { background: #fff8ec; color: #3d2b19; color-scheme: light; }
.theme-crit .game-hero .banner img { object-position: 30% 35%; }
.theme-crit .game-hero .banner::after { background: linear-gradient(0deg, #fff8ec, transparent); }
.theme-crit .game-hero h1 { font: 800 clamp(38px, 6vw, 56px)/1 "Sniglet", system-ui, sans-serif; color: #7a4a1f; }
.theme-crit .game-hero .lede { font: 400 clamp(18px, 2.4vw, 22px)/1.3 "Sniglet", system-ui, sans-serif; color: #4d7f33; }
.theme-crit h2, .theme-crit .facts h2 { font: 800 30px/1.1 "Sniglet", system-ui, sans-serif; color: #7a4a1f; }
.theme-crit .feature h3 { font: 800 19px/1.2 "Sniglet", system-ui, sans-serif; color: #4d7f33; }
.theme-crit .feature { background: #ffffff; border: 1px solid #f0e0c4; box-shadow: 0 2px 0 #f0e0c4; }
.theme-crit .facts { background: #ffffff; border: 1px solid #f0e0c4; box-shadow: 0 4px 0 #f0e0c4; }
.theme-crit .gallery img { box-shadow: 0 6px 18px rgba(80, 50, 20, 0.15); }
.theme-crit main a:not(.btn):not(.store) { color: #9a5212; }
.theme-crit .site-footer { color: var(--muted); }

/* ---------- legal / support pages ---------- */

.doc { padding: clamp(48px, 8vw, 88px) 0; }
.doc .wrap { max-width: 760px; }
.doc h1 { font: 600 clamp(30px, 5vw, 42px)/1.15 var(--display); margin: 14px 0 6px; }
.doc .updated { color: var(--muted); margin: 0 0 36px; font-size: 15px; }
.doc h2 { font: 600 22px/1.3 var(--display); color: var(--gold-hi); margin: 40px 0 12px; letter-spacing: 0.02em; }
.doc p, .doc li { color: #e2d7c4; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc .callout {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
  background: var(--bg-2);
}
.doc .callout p:last-child { margin-bottom: 0; }

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

/* Google Play mark inside the gold buttons on the home page cards */
.btn .play-logo { width: 18px; height: 18px; flex: none; }
