/* Milady Game Studios — retro-modern microstudio system */

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

:root {
  --bg: #efede6;
  --bg2: #d7d7d4;
  --surface: #faf8f2;
  --surface-2: #ece9e1;
  --surface-3: #d5d7dc;
  --line: #2c3138;
  --line-soft: #707780;
  --text: #171a20;
  --text-soft: #4d545f;
  --text-dim: #78808a;
  --mint: #5f8f7b;
  --sky: #7399c9;
  --gold: #b98a45;
  --rose: #b96c73;
  --violet: #6b75b8;
  --shadow: 0 1px 0 rgba(0,0,0,0.03), 0 18px 42px rgba(20, 24, 31, 0.08);
  --shadow-pop: 0 1px 0 rgba(0,0,0,0.04), 0 24px 48px rgba(20, 24, 31, 0.12);
  --radius: 20px;
  --pixel: 0 12px 30px rgba(18, 22, 28, 0.12);
  --nav-bg: rgba(239, 237, 230, 0.84);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111317;
  --bg2: #1a1f27;
  --surface: #181c23;
  --surface-2: #232933;
  --surface-3: #2b3340;
  --line: #a8b1bc;
  --line-soft: #6f7783;
  --text: #f2f0ea;
  --text-soft: #ccd1d8;
  --text-dim: #9199a6;
  --mint: #7aa594;
  --sky: #88a9d6;
  --gold: #d0a35f;
  --rose: #d6878e;
  --violet: #98a0de;
  --shadow: 0 1px 0 rgba(255,255,255,0.02), 0 20px 44px rgba(0, 0, 0, 0.3);
  --shadow-pop: 0 1px 0 rgba(255,255,255,0.03), 0 24px 52px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(17, 19, 23, 0.88);
  color-scheme: dark;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), transparent 24%),
    radial-gradient(circle at top, rgba(115,153,201,0.12), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(44, 49, 56, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44, 49, 56, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.75), transparent 85%);
}

a { color: inherit; text-decoration: none; }

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

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(44, 49, 56, 0.14);
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(20, 24, 31, 0.06);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 74px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Silkscreen', cursive;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  color: var(--text);
  text-transform: uppercase;
}

.nav-brand::before {
  content: "MGS";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(44, 49, 56, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(115,153,201,0.16), rgba(255,255,255,0.14));
  color: var(--text-dim);
  box-shadow: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a,
.theme-toggle {
  min-height: 38px;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: 'Silkscreen', cursive;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  text-transform: uppercase;
  transition: 0.18s ease;
}

.nav-links a:hover,
.theme-toggle:hover {
  border-color: rgba(44, 49, 56, 0.18);
  background: rgba(255,255,255,0.2);
  color: var(--text);
  transform: translateY(-1px);
}

.x-link svg { width: 16px; height: 16px; fill: currentColor; }

.theme-toggle {
  background: transparent;
  cursor: pointer;
}

.theme-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }

.site-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 88px;
}

.pixel-panel {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.22), transparent 16%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid rgba(44, 49, 56, 0.16);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pixel-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.32);
  pointer-events: none;
}

.pixel-panel-dark {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.1), transparent 16%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 82%, black), var(--surface));
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: 'Silkscreen', cursive;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.section-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.scan-card {
  position: relative;
  overflow: hidden;
}

.scan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,0.025) 0 2px, rgba(0,0,0,0.02) 2px 4px);
  opacity: 0.16;
}

.cta-btn,
.sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid rgba(44, 49, 56, 0.18);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(20, 24, 31, 0.08);
  font-family: 'Silkscreen', cursive;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: 0.18s ease;
}

.cta-btn:hover,
.sub-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(20, 24, 31, 0.12);
}

.cta-btn {
  background: linear-gradient(180deg, #2d3745, #1f2630);
  color: #f2f0ea;
}

.sub-btn {
  background: linear-gradient(180deg, rgba(255,255,255,0.46), rgba(255,255,255,0.16));
  color: var(--text);
}

footer {
  margin-top: 72px;
  border-top: 1px solid rgba(44, 49, 56, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(0,0,0,0.05));
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 46px;
}

.footer-brand {
  font-family: 'Silkscreen', cursive;
  font-size: 0.9rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}

footer p,
.footer-copy {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.footer-links a {
  padding: 8px 10px;
  border: 1px solid rgba(44, 49, 56, 0.16);
  border-radius: 10px;
  font-family: 'Silkscreen', cursive;
  font-size: 0.68rem;
  color: var(--text-soft);
  text-transform: uppercase;
}

.footer-copy { margin-top: 18px; }

@media (max-width: 860px) {
  .nav-inner {
    padding: 14px 18px;
    align-items: flex-start;
    flex-direction: column;
    min-width: 0;
  }

  .nav-links {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar { display: none; }

  .site-shell,
  .footer-inner { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 520px) {
  body { overflow-x: hidden; }
  .nav-brand { font-size: 0.82rem; }
  .nav-links a,
  .theme-toggle {
    flex: 0 0 auto;
    min-height: 34px;
    font-size: 0.56rem;
    padding: 6px 8px;
  }

  .site-shell,
  .footer-inner { padding-left: 14px; padding-right: 14px; }

  .pixel-panel { min-width: 0; }
}
