:root {
  --bg: #0b0d12;
  --bg-raised: #131722;
  --bg-card: #161b28;
  --line: #262d3f;
  --text: #e8ebf3;
  --text-muted: #a2aac0;
  --accent: #7c9cff;
  --accent-2: #c77dff;
  --gold: #e6b450;
  --sea: #4cc3ff;
  --radius: 16px;
  --font-display: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgb(11 13 18 / 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px var(--font-display); letter-spacing: 0.01em; }
.brand img { border-radius: 7px; }
nav { display: flex; gap: 24px; }
nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: 15px; }
nav a:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 112px 0 96px;
  background:
    radial-gradient(60% 80% at 85% 0%, rgb(199 125 255 / 0.16), transparent 70%),
    radial-gradient(50% 70% at 0% 30%, rgb(124 156 255 / 0.14), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.eyebrow {
  margin: 0 0 18px;
  font: 600 13px var(--font-body);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; max-width: 16ch; letter-spacing: -0.02em; }
.lede { max-width: 58ch; margin: 24px 0 0; font-size: clamp(17px, 2vw, 20px); color: var(--text-muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-raised);
  font: 600 15px var(--font-body); text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.button:hover { border-color: #3a4360; transform: translateY(-1px); }
.button.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0d12;
}
.button.primary:hover { filter: brightness(1.08); }
.button.large { min-height: 54px; padding: 0 28px; font-size: 17px; }
.button:focus-visible, nav a:focus-visible, .brand:focus-visible, .game-art:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}

/* Sections */
.section-title { font-size: clamp(28px, 4vw, 40px); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 40px; }
.games, .studio { padding: 96px 0; }
.studio { background: var(--bg-raised); border-block: 1px solid var(--line); }

/* Game cards */
.game {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.game + .game { margin-top: 32px; }
.game-gridfire { grid-template-columns: 1fr 1.15fr; }
.game-gridfire .game-art { order: 2; }
.game-art { display: block; overflow: hidden; background: #000; }
.game-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.game-art:hover img { transform: scale(1.03); }
/* Keep each cover's logo in frame when the card crops it. */
.game-holdem .game-art img { object-position: 88% center; }
.game-gridfire .game-art img { object-position: center; }
.game-body { padding: 40px; display: flex; flex-direction: column; align-items: flex-start; }
.game-genre { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.game-holdem .game-genre { color: var(--gold); }
.game-gridfire .game-genre { color: var(--sea); }
.game h3 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; }
.game-tagline { margin: 6px 0 16px; color: var(--text-muted); font-size: 18px; }
.game-body > p:not([class]) { margin: 0 0 18px; }
.features { margin: 0 0 28px; padding: 0; list-style: none; }
.features li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--text-muted); font-size: 16px; }
.features li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg);
}
.game-holdem .features li::before { background: var(--gold); }
.game-gridfire .features li::before { background: var(--sea); }
.game-body .button { margin-top: auto; }
.game-holdem .button.primary { background: linear-gradient(135deg, #f3cf7a, var(--gold)); }
.game-gridfire .button.primary { background: linear-gradient(135deg, #8fdcff, var(--sea)); }

/* Studio */
.studio-intro { max-width: 64ch; margin: -16px 0 40px; color: var(--text-muted); font-size: 18px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar { padding: 28px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.pillar h3 { font-size: 20px; font-weight: 600; margin-bottom: 10px; }
.pillar p { margin: 0; color: var(--text-muted); font-size: 16px; }

/* Contact */
.contact { padding: 96px 0; }
.contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding: 48px;
  border-radius: var(--radius); border: 1px solid var(--line);
  background:
    radial-gradient(80% 140% at 100% 0%, rgb(199 125 255 / 0.18), transparent 70%),
    var(--bg-card);
}
.contact h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 600; }
.contact p { margin: 8px 0 0; color: var(--text-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--text-muted); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-row p { margin: 0; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* 404 */
.not-found { min-height: calc(100vh - 64px - 82px); display: grid; place-items: center; text-align: center; padding: 64px 0; }
.not-found h1 { font-size: clamp(36px, 6vw, 56px); }
.not-found p { color: var(--text-muted); margin: 16px 0 32px; }

@media (max-width: 860px) {
  .game, .game-gridfire { grid-template-columns: 1fr; }
  .game-gridfire .game-art { order: 0; }
  .game-art img { aspect-ratio: 16 / 9; height: auto; }
  .game-body { padding: 28px 24px 32px; }
  .pillars { grid-template-columns: 1fr; }
  .hero { padding: 72px 0 64px; }
  .games, .studio, .contact { padding: 64px 0; }
  .contact-card { padding: 32px 24px; }
}

@media (max-width: 480px) {
  nav { gap: 16px; }
  nav a { font-size: 14px; }
  .brand span { font-size: 16px; }
  .contact .button.large { width: 100%; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .game-art img { transition: none; }
}
