:root {
  /* studio palette (from mendlo-mars.webp) */
  --studio-bg: #0a0908;
  --studio-rust: #d9714a;
  --studio-rust-dim: #8a4a34;
  --studio-cyan: #3ac9c9;

  /* game palette (from icon.svg / retro CRT UI) */
  --game-navy-1: #1a1c2c;
  --game-navy-2: #2f3556;
  --game-navy-3: #4c5680;
  --game-brown-1: #6b4a2f;
  --game-brown-2: #4a3320;
  --game-cream: #f5f0e6;
  --accent-red: #e0483a;
  --accent-orange: #e08a3a;
  --accent-yellow: #e0d23a;
  --accent-green: #4ac96b;
  --accent-blue: #3a8ee0;
  --accent-purple: #8a4ae0;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--game-navy-1);
  color: var(--game-cream);
  line-height: 1.55;
}

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

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 0.75rem; }
h3 { color: var(--studio-rust); }

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-steam {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
}
.btn-steam:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(58, 142, 224, 0.35);
}
.btn-large {
  font-size: 1.1rem;
  padding: 0.85rem 1.75rem;
  margin-top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 9, 8, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(217, 113, 74, 0.25);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.wordmark {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--studio-rust);
}
.nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  justify-content: center;
}
.nav a {
  text-decoration: none;
  color: var(--game-cream);
  opacity: 0.85;
  font-size: 0.95rem;
}
.nav a:hover { opacity: 1; color: var(--studio-rust); }

/* Studio hero */
.hero-studio {
  position: relative;
  overflow: hidden;
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-bg);
}
.hero-studio-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
}
.hero-studio::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10, 9, 8, 0.25), var(--studio-bg) 92%);
}
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.18) 0px,
    rgba(0, 0, 0, 0.18) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  z-index: 2;
}
.hero-studio-content {
  position: relative;
  z-index: 3;
  text-align: center;
}
.glitch-text {
  font-size: clamp(3rem, 12vw, 6.5rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--game-cream);
  position: relative;
  text-shadow:
    2px 0 var(--accent-red),
    -2px 0 var(--studio-cyan);
  margin: 0;
}
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  left: 0;
  right: 0;
}
.glitch-text::before {
  color: var(--accent-red);
  clip-path: inset(0 0 55% 0);
  transform: translate(-3px, -2px);
  opacity: 0.7;
}
.glitch-text::after {
  color: var(--studio-cyan);
  clip-path: inset(55% 0 0 0);
  transform: translate(3px, 2px);
  opacity: 0.7;
}
.hero-studio-tag {
  color: var(--game-cream);
  opacity: 0.85;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Game hero */
.hero-game {
  position: relative;
  overflow: hidden;
  background: var(--game-navy-1);
  padding: 4.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hero-game-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.55;
}
.hero-game::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 40%, rgba(47, 53, 86, 0.35), var(--game-navy-1) 78%);
}
.hero-game-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.title-logo {
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto 1rem;
}
.tagline {
  max-width: 620px;
  margin: 0 auto;
  color: var(--game-cream);
  opacity: 0.85;
}

/* Trailer */
.trailer {
  background: var(--game-navy-1);
  padding: 4rem 0;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.trailer-tag {
  max-width: 560px;
  margin: 0 auto;
  opacity: 0.85;
}
.video-embed {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 2rem auto 0;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--game-navy-3);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* About */
.about {
  background: var(--game-navy-2);
  padding: 4rem 0;
}
.feature-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 1rem;
}
.feature-grid li {
  background: var(--game-navy-1);
  border: 1px solid var(--game-navy-3);
  border-radius: 8px;
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--game-cream);
  font-weight: 600;
}
.feature-icon {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}
.feature-grid small {
  display: block;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

/* Screenshots */
.screenshots {
  background: var(--game-navy-1);
  padding: 4rem 0;
}
.screenshot-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.screenshot-grid img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--game-navy-3);
}

/* CTA repeat */
.cta-repeat {
  background: var(--game-navy-2);
  padding: 3rem 0;
  text-align: center;
}
.cta-repeat p {
  margin: 0 0 1rem;
  opacity: 0.85;
  font-size: 1.1rem;
}
.cta-capsule {
  width: 100%;
  max-width: 360px;
  margin: 0 auto 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--game-navy-3);
}

/* More games */
.more-games {
  position: relative;
  overflow: hidden;
  background: var(--game-navy-1);
  padding: 3.5rem 0;
  text-align: center;
}
.more-games-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom;
  opacity: 0.4;
}
.more-games::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--game-navy-1), rgba(26, 28, 44, 0.5) 40%, var(--game-navy-1) 92%);
}
.more-games .wrap {
  position: relative;
  z-index: 1;
}
.more-games p {
  max-width: 560px;
  margin: 0 auto;
  opacity: 0.85;
}

/* Footer */
.site-footer {
  background: var(--studio-bg);
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid rgba(217, 113, 74, 0.25);
}
.footer-inner p { margin: 0.35rem 0; }
.wordmark.small {
  color: var(--studio-rust);
  font-weight: 800;
  font-size: 1.2rem;
}
.footer-inner a {
  text-decoration: none;
  color: var(--studio-cyan);
}
.footer-inner a:hover { text-decoration: underline; }
.copyright {
  opacity: 0.6;
  font-size: 0.85rem;
}

/* Tablet */
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 640px) {
  .nav { order: 3; width: 100%; justify-content: center; gap: 1rem; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}
