/* =========================================================
   Perfect Games — shared stylesheet
   Plain CSS, no build step. Edit the variables below to
   re-brand the whole site (see README "Customize branding").
   ========================================================= */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --text: #1a1d23;
  --text-muted: #5b6270;
  --border: #e6e8eb;
  --accent: #2f6fed;
  --accent-hover: #1f56c4;
  --accent-contrast: #ffffff;
  --card-bg: #ffffff;
  --code-bg: #f0f1f4;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 12px rgba(16, 24, 40, 0.06);
  --max-width: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1015;
    --bg-alt: #14161d;
    --text: #e9eaee;
    --text-muted: #9aa0ac;
    --border: #262a34;
    --accent: #5b8dff;
    --accent-hover: #7ba0ff;
    --accent-contrast: #0e1015;
    --card-bg: #171a22;
    --code-bg: #1c2029;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

/* ---------- Layout ---------- */

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

main {
  padding-bottom: 64px;
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  opacity: 0.85;
}

.brand .drop {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 640px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 16px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
    width: 100%;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 96px 0 64px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.hero p.subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Sections & cards ---------- */

section {
  padding: 48px 0;
}

section + section {
  border-top: 1px solid var(--border);
}

h2.section-title {
  font-size: 1.6rem;
  margin: 0 0 28px;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.badge-live {
  background: color-mix(in srgb, #22c55e 20%, transparent);
  color: #17803d;
}

.badge-soon {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

@media (prefers-color-scheme: dark) {
  .badge-live {
    color: #4ade80;
  }
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Legal / content pages ---------- */

.page-header {
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 2.1rem;
  letter-spacing: -0.01em;
}

.page-header .meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.content {
  padding-top: 32px;
}

.content h2 {
  font-size: 1.3rem;
  margin: 40px 0 12px;
}

.content h2:first-child {
  margin-top: 0;
}

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

.content p,
.content li {
  color: var(--text);
}

.content ul {
  padding-left: 22px;
}

.content li + li {
  margin-top: 6px;
}

.note {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 24px 0;
}

code {
  background: var(--code-bg);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- Support page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 24px 0 8px;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.contact-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.contact-card a {
  font-weight: 600;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.88rem;
}

footer .footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

footer .footer-links a {
  color: var(--text-muted);
}

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