/* ==========================================================================
   Glory Games Studio — global styles
   ========================================================================== */

:root {
  --bg: #0d0f1a;
  --bg-alt: #141729;
  --surface: #1b1f36;
  --surface-hover: #232846;
  --border: #2c3254;
  --text: #eef0fa;
  --text-muted: #a3a9c7;
  --accent: #ffb703;
  --accent-strong: #ffc93c;
  --accent-2: #7b5cff;
  --radius: 14px;
  --max-width: 1120px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Poppins", var(--font-body);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover,
a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #111;
  padding: 8px 14px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* Header & navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 15, 26, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.brand:hover,
.brand:focus-visible {
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
}

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

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}

/* Hero
   ========================================================================== */

.hero {
  padding: 96px 0 80px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 10%, rgba(123, 92, 255, 0.25), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(255, 183, 3, 0.15), transparent 40%),
    var(--bg);
}

.hero-logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
}

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

.hero h1 span {
  color: var(--accent);
}

.hero p {
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 1.15rem;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  background: var(--accent);
  color: #111;
  transition: background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-strong);
  color: #111;
  text-decoration: none;
}

/* Sections
   ========================================================================== */

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Game cards
   ========================================================================== */

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
  background: var(--surface-hover);
}

.game-card-image {
  aspect-ratio: 16 / 10;
  background: var(--bg-alt);
  overflow: hidden;
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.game-card-body h3 {
  font-size: 1.2rem;
}

.game-card-body p {
  color: var(--text-muted);
  margin: 0 0 20px;
  flex: 1;
}

.store-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--accent-2);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
}

.store-link:hover,
.store-link:focus-visible {
  background: #6a48ff;
  color: #fff;
  text-decoration: none;
}

.store-link svg {
  width: 18px;
  height: 18px;
}

.coming-soon {
  align-self: flex-start;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
}

.games-empty {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

/* About
   ========================================================================== */

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.about-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.about-item h3 {
  color: var(--accent);
  font-size: 1.15rem;
}

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

/* Privacy policy page
   ========================================================================== */

.page-header {
  padding: 64px 0 40px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(123, 92, 255, 0.22), transparent 55%),
    var(--bg);
}

.page-header h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
}

.policy {
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.policy section {
  margin-bottom: 40px;
  scroll-margin-top: 90px;
}

.policy h2 {
  font-size: 1.5rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.policy h3 {
  font-size: 1.15rem;
  color: var(--accent);
  margin-top: 24px;
}

.policy p {
  color: #d3d7ea;
}

.contact-email {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 4px 0 12px;
  word-break: break-all;
}

/* Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

/* Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
  }

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

  .nav-links a {
    display: block;
    padding: 14px 20px;
  }

  .nav-links a[aria-current="page"] {
    border-bottom: none;
    border-left: 3px solid var(--accent);
  }

  .hero {
    padding: 64px 0 56px;
  }

  .section {
    padding: 56px 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .game-card {
    transition: none;
  }

  .game-card:hover {
    transform: none;
  }
}
