/* ============================================
   Realgames — Site Styles
   ============================================ */

:root {
  /* Neutrals carry the design; brand color appears only in accents */
  --bg: #0b0c0f;
  --bg-soft: #101216;
  --surface: #15171d;
  --surface-hover: #1a1d24;
  --border: rgba(255, 255, 255, 0.07);
  --text: #ececee;
  --text-dim: #9b9ba3;
  /* Brand colors from the Realgames corporate logo */
  --brand-teal: #4A9F9D;
  --brand-purple: #5F2D82;
  --accent: #5cb6b3; /* brand teal, lightened for legibility on dark */
  --radius: 12px;
  --maxw: 1060px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

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

::selection {
  background: var(--brand-teal);
  color: #fff;
}

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

a:hover {
  text-decoration: underline;
}

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

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

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.logo-mark {
  height: 32px;
  width: auto;
  flex-shrink: 0;
}

.logo-word {
  height: 14px;
  width: auto;
  /* lift the dark purple end of the brand gradient slightly on dark bg */
  filter: brightness(1.25);
}

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

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

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
}

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

.hero {
  padding: 160px 0 90px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 70px;
}

.hero-copy {
  flex: 1 1 auto;
}

.hero-logo {
  flex: 0 0 auto;
  width: clamp(160px, 20vw, 240px);
}

.hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.12;
  max-width: 18ch;
}

.hero p {
  margin-top: 22px;
  font-size: 1.12rem;
  color: var(--text-dim);
  max-width: 52ch;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

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

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: #fff;
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-hover);
}

/* ---------- Sections ---------- */

section {
  padding: 90px 0;
}

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

.kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.section-head p {
  margin-top: 14px;
  color: var(--text-dim);
  max-width: 62ch;
  font-size: 1.03rem;
}

/* ---------- Games ---------- */

.games {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 44px;
}

.game {
  display: block;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
}

a.game:hover {
  background: var(--surface-hover);
  text-decoration: none;
}

.game img {
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
}

.game-body {
  padding: 22px 24px 26px;
}

.game h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.game-meta {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 2px;
}

.game p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 10px;
}

.game-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- About / principles ---------- */

.principles {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 60px;
}

.principle h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.principle p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 6px;
}

/* ---------- Contact ---------- */

.contact-actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

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

.footer-inner p {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 22px;
  list-style: none;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.88rem;
}

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

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

.legal {
  padding: 140px 0 90px;
  max-width: 760px;
  margin: 0 auto;
}

.legal h1 {
  font-size: 2.1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal .sub {
  color: var(--text-dim);
  margin-bottom: 40px;
}

.legal h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 34px 0 10px;
}

.legal p,
.legal li {
  color: var(--text-dim);
  font-size: 0.97rem;
}

.legal ul {
  padding-left: 22px;
  margin-top: 8px;
}

.legal address {
  font-style: normal;
  color: var(--text-dim);
  line-height: 1.8;
}

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

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .hero {
    padding: 130px 0 70px;
  }

  .hero-logo {
    display: none;
  }

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

  .principles {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .nav-toggle {
    display: block;
  }

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

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 1.05rem;
  }

  section {
    padding: 64px 0;
  }
}
