/* ===== Design Tokens ===== */
:root {
  --bg-primary: #0d0d1a;
  --bg-secondary: #13132a;
  --bg-card: #1a1a35;
  --bg-card-hover: #21214a;
  --bg-surface: #10102a;

  --text-primary: #eeeef5;
  --text-secondary: #9999b8;
  --text-muted: #666688;

  --accent: #7c6cff;
  --accent-hover: #9182ff;
  --accent-subtle: rgba(124, 108, 255, 0.12);

  --border: #2a2a48;
  --border-hover: #3d3d65;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --max-content: 960px;
  --max-legal: 720px;

  --transition: 0.2s ease;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* ===== Typography ===== */
h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }

/* ===== Layout ===== */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

main {
  flex: 1;
}

/* ===== Header ===== */
.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-tagline {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 16px 0;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb span {
  margin: 0 8px;
  opacity: 0.4;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero h1 {
  margin-bottom: 16px;
}

.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ===== Game Hero (per-game pages) ===== */
.game-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.game-hero .app-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-lg);
  margin: 0 auto 24px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.game-hero h1 {
  margin-bottom: 8px;
}

.game-hero .tagline {
  color: var(--text-secondary);
  font-size: 1.15rem;
  margin-bottom: 32px;
}

/* ===== Section ===== */
.section {
  padding: 48px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== Game Cards (publisher landing) ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 700px;
  margin: 0 auto;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  color: inherit;
}

.game-card .card-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  margin: 0 auto 20px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
}

.game-card h3 {
  margin-bottom: 8px;
}

.game-card .card-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.platform-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tag--muted {
  color: var(--text-muted);
  background: rgba(102, 102, 136, 0.1);
}

/* ===== Coming Soon Badge ===== */
.badge-soon {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 16px;
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
}

.feature-item .feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-item h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ===== Screenshots Placeholder ===== */
.screenshots-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

/* ===== Store Badges ===== */
.store-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.store-badge {
  position: relative;
  display: inline-block;
}

.store-badge img {
  height: 48px;
  width: auto;
}

.store-badge--soon {
  opacity: 0.5;
  filter: grayscale(40%);
}

.store-badge--soon::after {
  content: "Coming Soon";
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* ===== Legal Pages ===== */
body.legal-page {
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8888a8;
  --border: #e0e0e8;
  --accent: #5a4ed6;
}

.legal-content {
  max-width: var(--max-legal);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.legal-content h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 8px;
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-content h3 {
  font-size: 1.05rem;
  margin-top: 24px;
  margin-bottom: 8px;
}

.legal-content p {
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.legal-content ul {
  margin: 8px 0 16px 24px;
  color: var(--text-secondary);
}

.legal-content li {
  margin-bottom: 6px;
}

.legal-content a {
  text-decoration: underline;
}

/* ===== Active Nav Link ===== */
.nav-active {
  color: var(--text-primary) !important;
}

/* ===== Press Page ===== */
.press-nav {
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.press-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.press-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.press-tab:hover {
  color: var(--text-primary);
}

.press-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.press-tab--active:hover {
  color: var(--accent-hover);
}

.press-tab--disabled {
  color: var(--text-muted);
  cursor: default;
  opacity: 0.6;
}

.press-tab-icon {
  font-size: 1.2rem;
}

.press-block {
  margin-bottom: 56px;
}

.press-block h2 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.press-copy {
  margin-bottom: 24px;
}

.press-copy h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.press-copy p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.press-quote {
  font-size: 1.1rem !important;
  font-style: italic;
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

/* Fact Sheet Table */
.fact-sheet {
  width: 100%;
  border-collapse: collapse;
}

.fact-sheet tr {
  border-bottom: 1px solid var(--border);
}

.fact-sheet td {
  padding: 12px 16px 12px 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  vertical-align: top;
}

.fact-label {
  font-weight: 600;
  color: var(--text-primary) !important;
  white-space: nowrap;
  width: 140px;
}

/* Media Asset Cards */
.press-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.press-asset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.press-asset-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.press-asset-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.press-asset-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.press-asset-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 20px;
}

.btn--download {
  align-self: flex-start;
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* Press Contact */
.press-contact {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 40px 24px;
}

.press-contact h2 {
  border-bottom: none;
  margin-bottom: 12px;
}

.press-contact p {
  color: var(--text-secondary);
  margin-bottom: 8px;
}

/* ===== 404 Page ===== */
.error-page {
  text-align: center;
  padding: 120px 24px;
}

.error-page .error-code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 16px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background var(--transition);
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-hover);
  color: #fff;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
  .hero {
    padding: 48px 0 36px;
  }

  .game-hero {
    padding: 40px 0 24px;
  }

  .game-hero .app-icon {
    width: 96px;
    height: 96px;
    font-size: 2.4rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 16px;
  }

  .store-badge img {
    height: 40px;
  }

  .press-assets-grid {
    grid-template-columns: 1fr;
  }

  .fact-label {
    width: auto;
  }

  .fact-sheet td {
    display: block;
    padding: 4px 0;
  }

  .fact-sheet tr {
    padding: 8px 0;
    display: block;
  }

  .fact-label {
    padding-top: 12px;
  }
}

/* ===== Print (legal pages) ===== */
@media print {
  .site-header,
  .site-footer,
  .breadcrumb {
    display: none;
  }

  body.legal-page {
    background: #fff;
    color: #000;
  }

  .legal-content {
    max-width: 100%;
    padding: 0;
  }
}
