:root {
  --surface: #FFFFFF;
  --surface-alt: #F5F4F1;
  --text: #2C2B29;
  --text-muted: #5F5D59;
  --text-subtle: #6B6862;
  --border: #D3D1C7;
  --accent: #D85A30;
  --accent-dark: #B3491F;
  --accent-text: #993C1D;
}

:root[data-theme="dark"] {
  --surface: #17171A;
  --surface-alt: #0F0F11;
  --text: #EDEBE4;
  --text-muted: #9C9A92;
  --text-subtle: #86847D;
  --border: #3A3936;
  --accent: #D85A30;
  --accent-text: #D85A30;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/archivo-latin.woff2') format('woff2');
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

a { color: #D85A30; text-decoration: none; }

.skip-link {
  position: absolute;
  top: -60px;
  inset-inline-start: 16px;
  z-index: 1000;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

h1, h2 { text-wrap: balance; }

:root[data-theme="light"] .thm-dark { display: none !important; }
:root[data-theme="dark"] .thm-light { display: none !important; }

.theme-btn { background: transparent; color: var(--text-muted); }
:root[data-mode="auto"] .theme-btn-auto,
:root[data-mode="light"] .theme-btn-light,
:root[data-mode="dark"] .theme-btn-dark {
  background: var(--surface);
  color: var(--text);
}

.cookie-banner { display: none; }
.cookie-banner.is-visible { display: flex; }

.lang-suggest-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px clamp(20px, 5vw, 64px);
  background: rgba(216, 90, 48, 0.08);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  text-align: center;
}
.lang-suggest-banner a { color: var(--accent-text); font-weight: 600; }
.lang-suggest-banner button {
  flex: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  cursor: pointer;
}

[hidden] { display: none !important; }

.bsg-hide-scrollbar::-webkit-scrollbar { display: none; }

/* The carousel is a media strip, not text — keep its order/scroll direction fixed regardless
   of page direction so RTL languages don't reverse which slide shows first. */
[data-carousel] { direction: ltr; }

.lang-select {
  font: inherit;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='12' height='12' fill='none' stroke='%235F5D59' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 30px 8px 14px;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
[dir="rtl"] .lang-select {
  background-position: left 10px center;
  padding: 8px 14px 8px 30px;
}

.pf-table { min-width: 640px; }

.pf-header {
  display: grid;
  grid-template-columns: 1fr 96px 130px;
}
.pf-header > div {
  padding: 16px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.pf-header > div:nth-child(2),
.pf-header > div:nth-child(3) { justify-content: center; text-align: center; }
.pf-header > div:nth-child(3) { color: var(--accent-text); background: rgba(216, 90, 48, 0.08); }

.pf-group {
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
}

.pf-row {
  display: grid;
  grid-template-columns: 1fr 96px 130px;
  border-bottom: 1px solid var(--border);
}
.pf-row:last-child { border-bottom: none; }

.pf-feature {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.pf-feature.pf-feature-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.pf-free, .pf-premium {
  padding: 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.pf-premium { background: rgba(216, 90, 48, 0.06); }

.pf-label { display: none; }

@media (max-width: 720px) {
  .pf-table { min-width: 0; }
  .pf-header { display: none; }

  .pf-row {
    grid-template-columns: 1fr auto auto;
    grid-template-areas: "feature feature feature" ". free premium";
    row-gap: 10px;
    column-gap: 8px;
    padding: 16px 20px 18px;
  }
  .pf-feature { grid-area: feature; padding: 0; }

  .pf-free, .pf-premium {
    padding: 7px 12px;
    border-radius: 999px;
    justify-content: flex-start;
    text-align: left;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
  }
  .pf-free { grid-area: free; background: var(--surface-alt); color: var(--text-muted); }
  .pf-premium { grid-area: premium; background: rgba(216, 90, 48, 0.1); color: var(--accent-text); }

  .pf-label { display: inline; }
}

.site-nav { margin-inline-start: auto; }
.theme-toggle { margin-inline-start: 36px; }

@media (max-width: 720px) {
  .site-nav { margin-inline-start: 0; flex-basis: 100%; order: 3; }
  .theme-toggle { margin-inline-start: auto; order: 2; }
}

@media (max-width: 720px) {
  .site-footer { padding-top: 36px !important; }
  .intro-section { padding-top: 56px !important; }
  .about-close { padding-bottom: 64px !important; }
  .games-close { padding-bottom: 64px !important; }
  .privacy-close { padding-bottom: 64px !important; }
  .contact-close { padding-bottom: 64px !important; }
  .home-studio { padding-bottom: 48px !important; }
  .home-featured { padding-top: 56px !important; padding-bottom: 56px !important; }
  .vs-hero { padding-bottom: 32px !important; }
  .vs-screens { padding-top: 28px !important; }
  .vs-features { padding-bottom: 36px !important; }
  .vs-pricing-top { padding-top: 28px !important; }
  .vs-store { padding-bottom: 48px !important; }
}