/* LuvzillaGames.com — design system.
   Palette is pulled from the mascot itself: a warm near-black with a red undertone
   as the ground, the wordmark's cream for text, the mascot's red as the studio
   accent, and its yellow spikes as a rare highlight. Each game keeps its own
   accent (CHEF! terracotta, GENERAL! gold) from the Art Director's logo palettes. */
:root {
  --bg: #120a0c;
  --bg-2: #1a0f12;
  --card: #201317;
  --card-2: #281a1e;
  --border: #3a2429;
  --text: #f4e8d8;
  --text-dim: #b39f93;
  --brand: #e5323b;
  --brand-soft: #ff6b70;
  --spike: #f7c948;
  --accent: var(--brand);
  --accent-ink: #fff;
  --radius: 14px;
  --font-display: "Baloo 2", "Inter", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body[data-game="chef"] { --accent: #e0823f; }
body[data-game="general"] { --accent: #cfa54a; --accent-ink: #1a1208; }
body[data-game="art-director"] { --accent: #e25d7c; }
body[data-game="sprite-manager"] { --accent: #4fb3a9; --accent-ink: #061a18; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-soft); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.75rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-logo { height: 36px; width: auto; display: block; }
#version-tag { color: var(--text-dim); font-size: 0.72rem; }
/* Devlog/game pages: the studio mark is the centerpiece of the header --
   mascot head + wordmark, centered, with the version tag and nav flanking it. */
/* `header.site-header--centered` (not just the class) so it outranks the base
   `header.site-header` flex rule; minmax(0,1fr) keeps both side columns equal
   even when the nav is wide, so the brand sits on the true center line. */
header.site-header--centered {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0.6rem 1.25rem;
}
header.site-header--centered .header-version { justify-self: start; }
header.site-header--centered .site-nav { justify-self: end; }
.brand--big { justify-self: center; }
.brand-lockup {
  height: 84px; width: auto; max-width: 100%; display: block;
  filter: drop-shadow(0 4px 12px rgba(229, 50, 59, 0.3));
  transition: transform 0.2s;
}
.brand--big:hover .brand-lockup { transform: scale(1.03); }

nav.site-nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }
nav.site-nav a {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: var(--text-dim);
  font-size: 0.9rem;
  border: 1px solid transparent;
}
nav.site-nav a:hover { color: var(--text); text-decoration: none; border-color: var(--border); }
nav.site-nav a.active { color: var(--text); background: var(--card-2); border-color: var(--border); }
nav.site-nav img { height: 1.1em; width: 1.1em; object-fit: contain; }

main { max-width: 980px; margin: 0 auto; padding: 1.5rem 1.25rem 5rem; }

/* ---------- mastheads ---------- */
.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin: 1rem 0 1.5rem;
}
.masthead-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}
.masthead-title em { font-style: normal; color: var(--accent); }
.masthead-sub { color: var(--text-dim); margin: 0.4rem 0 0; max-width: 46ch; }
.game-header-logo { max-height: 84px; max-width: 100%; width: auto; height: auto; display: block; }

.stats-strip { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; color: var(--text); }
.stat-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.08em; }

.filter-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1.75rem; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font: inherit; font-size: 0.88rem; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.filter-chip:hover { color: var(--text); border-color: var(--text-dim); }
.filter-chip.active { color: var(--text); border-color: var(--accent); background: var(--card-2); }
.filter-chip-icon { height: 1.15em; width: 1.15em; object-fit: contain; }

/* ---------- featured (latest) ---------- */
.featured {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;               /* stacked: media on top, text below */
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.3);
  overflow: hidden;
  background: linear-gradient(135deg, var(--card-2), var(--card));
  margin-bottom: 2.5rem;
}
.featured.media-side { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); } /* text left, portrait image right */
.featured-media { background: #000; justify-content: center; }
.featured-media img { width: 100%; height: auto; max-height: 520px; object-fit: contain; display: block; cursor: zoom-in; }
.featured-media.empty {
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%), var(--card-2);
}
.featured-media.empty img { width: 40%; height: auto; object-fit: contain; cursor: default; opacity: 0.9; }
.featured-content { padding: 1.5rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
.kicker {
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--spike); font-weight: 600;
}
.featured h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1.15; margin: 0; }
.featured h2 a { color: var(--text); }
.featured h2 a:hover { color: var(--accent); text-decoration: none; }
.featured .post-body { font-size: 0.95rem; }
.featured .post-body p:last-child { margin-bottom: 0; }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before {
  content: ""; position: absolute; left: 0.45rem; top: 0.4rem; bottom: 0; width: 2px;
  background: linear-gradient(var(--border), transparent);
}
.day { margin-bottom: 2rem; }
.day-label {
  position: relative;
  margin: 0 0 1rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--text-dim);
}
.day-label::before {
  content: ""; position: absolute; left: -1.6rem; top: 0.45em;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--bg);
}

/* ---------- post cards ---------- */
article.post {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--card-accent, var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.1rem;
  transition: border-color 0.15s, transform 0.15s;
}
article.post:hover { border-color: color-mix(in srgb, var(--card-accent, var(--border)) 60%, var(--border)); }
article.post[data-game="chef"] { --card-accent: #e0823f; }
article.post[data-game="general"] { --card-accent: #cfa54a; }
article.post[data-game="art-director"] { --card-accent: #e25d7c; }
article.post[data-game="sprite-manager"] { --card-accent: #4fb3a9; }
/* Stacked by default (landscape screenshots use the full card width); a portrait
   screenshot sits beside the text instead of towering over it. */
article.post.has-media.media-side { grid-template-columns: minmax(0, 1fr) minmax(0, 320px); } /* text left, image right */
.post-media { background: #000; justify-content: center; }
.post-media img, .compare-pane img {
  width: 100%; height: auto; max-height: 440px; object-fit: contain;
  display: block; cursor: zoom-in; transition: opacity 0.15s;
}
.post-media img:hover, .featured-media img:hover { opacity: 0.92; }
.more-shots { display: flex; gap: 0.35rem; flex-wrap: wrap; padding: 0.4rem 0.5rem 0; }
.more-shots img {
  width: 64px; height: 44px; max-height: none; object-fit: contain;
  background: #000; border-radius: 4px; border: 1px solid var(--border);
}
/* Before/After stack by default so both images sit at the same scale for a real
   comparison; two portrait images go side by side. */
.compare { display: grid; grid-template-columns: 1fr; gap: 2px; background: var(--border); }
.compare.compare-side { grid-template-columns: 1fr 1fr; }
.compare-pane { position: relative; display: flex; align-items: center; background: #000; }
.compare-label {
  position: absolute; top: 0.4rem; left: 0.4rem; z-index: 1;
  padding: 0.15rem 0.55rem; border-radius: 999px;
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(0,0,0,0.7); color: var(--spike);
}
figure.post-media, figure.featured-media { margin: 0; display: flex; flex-direction: column; }
figure > figcaption { margin-top: auto; }
figcaption {
  padding: 0.55rem 0.8rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text-dim);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}
figcaption em { opacity: 0.8; }
figcaption code { font-size: 0.9em; }
.post-content { padding: 1.1rem 1.3rem 1.1rem; min-width: 0; }
.media-stack .post-media, .media-stack .featured-media { border-top: 1px solid var(--border); }
.post-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.4rem;
}
.game-badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.12rem 0.6rem; border-radius: 999px;
  font-weight: 700; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase;
  background: color-mix(in srgb, var(--card-accent, var(--brand)) 22%, transparent);
  color: color-mix(in srgb, var(--card-accent, var(--brand)) 75%, white);
}
.game-badge-icon { height: 1.15em; width: 1.15em; object-fit: contain; display: block; }
.approx-flag { font-style: italic; opacity: 0.85; }
/* Cross-tag: this entry was also for another project, so it appears in that feed too. */
.also-tag {
  display: inline-flex; align-items: center;
  padding: 0.1rem 0.55rem; border-radius: 999px;
  font-size: 0.7rem; letter-spacing: 0.03em; font-weight: 600;
  color: var(--text-dim); border: 1px dashed var(--border);
}
a.also-tag:hover { color: var(--text); border-style: solid; text-decoration: none; }

.post h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; line-height: 1.2; margin: 0.15rem 0 0.55rem; }
.post h2 a { color: var(--text); }
.post h2 a:hover { color: var(--accent); text-decoration: none; }

.post-body { font-size: 0.93rem; color: var(--text); }
.post-body p { margin: 0 0 0.7rem; }
.post-body ul { margin: 0 0 0.7rem; padding-left: 1.15rem; }
.post-body li { margin-bottom: 0.3rem; }
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84em; padding: 0.05em 0.35em; border-radius: 4px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
}
.post-body strong { color: #fff; }
.post-body.clamped {
  position: relative; max-height: 11.5rem; overflow: hidden;
}
.post-body.clamped::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4rem;
  background: linear-gradient(transparent, var(--card));
}
.read-more {
  margin-top: 0.4rem;
  background: none; border: none; padding: 0;
  color: var(--accent); font: inherit; font-weight: 600; font-size: 0.85rem; cursor: pointer;
}
.read-more:hover { text-decoration: underline; }
.recon-note { margin: 0.6rem 0 0; font-size: 0.78rem; color: var(--text-dim); font-style: italic; }

.empty-state { color: var(--text-dim); padding: 3rem 0; text-align: center; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 2rem;
  background: rgba(8, 4, 5, 0.9); cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem;
  background: none; border: none; color: #fff; font-size: 2.2rem; line-height: 1; opacity: 0.8; cursor: pointer;
}
.lightbox-close:hover { opacity: 1; }

footer.site-footer { text-align: center; color: var(--text-dim); font-size: 0.78rem; padding: 2rem 1rem 3rem; }

/* ---------- landing page ---------- */
.landing-hero {
  position: relative;
  text-align: center;
  padding: 3.5rem 1.25rem 2.5rem;
  background:
    radial-gradient(ellipse 60% 55% at 50% 30%, color-mix(in srgb, var(--brand) 28%, transparent), transparent 70%),
    var(--bg);
}
.landing-hero img { height: 230px; max-width: 90%; width: auto; filter: drop-shadow(0 18px 40px rgba(229, 50, 59, 0.35)); }
.landing-tagline {
  max-width: 520px; margin: 1.5rem auto 0;
  font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.35; color: var(--text);
}
.landing-tagline span { color: var(--text-dim); font-family: var(--font-body); font-weight: 400; font-size: 1rem; display: block; margin-top: 0.5rem; }
.landing-main { max-width: 980px; margin: 0 auto; padding: 1rem 1.25rem 4rem; }
.game-gates { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.game-gate {
  --g: var(--brand);
  display: flex; flex-direction: column; gap: 0.9rem; min-width: 0;
  padding: 1.75rem 1.6rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--g) 18%, var(--card)), var(--card) 65%);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 1.3);
  color: var(--text);
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.game-gate:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--g); box-shadow: 0 16px 40px rgba(0,0,0,0.35); }
.game-gate[data-game="chef"] { --g: #e0823f; }
.game-gate[data-game="general"] { --g: #cfa54a; }
.game-gate[data-game="art-director"] { --g: #e25d7c; }
.game-gate[data-game="sprite-manager"] { --g: #4fb3a9; }
.game-gate img { max-height: 80px; max-width: 100%; width: auto; height: auto; min-width: 0; align-self: flex-start; }
.game-gate-name { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; color: var(--g); }
.game-gate-tagline { margin: 0; color: var(--text-dim); font-size: 0.92rem; }
.game-gate-latest {
  margin: 0; padding-top: 0.8rem; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-dim);
}
.game-gate-latest strong { display: block; color: var(--text); font-weight: 600; margin-top: 0.15rem; }
.game-gate-cta { font-family: var(--font-display); font-weight: 700; color: var(--g); }
.landing-all-link {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.4rem;
  border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--text-dim);
}
.landing-all-link strong { color: var(--text); font-family: var(--font-display); font-weight: 700; }
.landing-all-link:hover { text-decoration: none; border-color: var(--text-dim); color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  header.site-header--centered { grid-template-columns: 1fr; justify-items: center; gap: 0.5rem; }
  header.site-header--centered .header-version { display: none; }
  header.site-header--centered .site-nav { justify-self: center; justify-content: center; }
  .brand-lockup { height: 60px; }
  .featured.media-side, article.post.has-media.media-side { grid-template-columns: 1fr; }
  .post-media img, .compare-pane img { max-height: 320px; }
  .compare.compare-side { grid-template-columns: 1fr; }
  .timeline { padding-left: 1.2rem; }
  .day-label::before { left: -1.2rem; }
  .landing-hero img { height: 190px; }
}
