/* Pit Bros — hoja de estilos única, sin dependencias externas */

:root {
  --bg: #07090e;
  --surface: #11141b;
  --surface-2: #181c25;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.24);
  --text: #f4f5f7;
  --text-soft: #d6d9df;
  --muted: #a5abb6;
  --accent: #ffffff;
  --accent-hover: #d8dce3;
  --accent-ink: #07090e;
  --radius: 16px;
  --max: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font);
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

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

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 20;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
}

/* ---------- Cabecera ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 9, 14, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand img {
  width: auto;
  height: 34px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}

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

.nav .lang {
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.nav .lang:hover {
  border-color: var(--text);
}

@media (max-width: 640px) {
  .nav .nav-link {
    display: none;
  }
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

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

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

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

/* ---------- Portada ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 5.5rem);
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 50% at 50% 30%, rgba(255, 255, 255, 0.08), transparent 70%),
    radial-gradient(40% 40% at 85% 5%, rgba(255, 255, 255, 0.04), transparent 70%);
  pointer-events: none;
}

.hero-logo {
  width: min(460px, 78vw);
  margin: 0 auto 2rem;
}

.hero h1 {
  max-width: 22ch;
  margin: 0 auto 1rem;
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.lead {
  max-width: 56ch;
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* ---------- Secciones ---------- */

.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
  border-top: 1px solid var(--border);
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
}

/* ---------- Juegos ---------- */

.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.game {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.game--soon {
  background: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
}

.game-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-2);
}

.game-cover--soon {
  display: grid;
  place-items: center;
  background:
    radial-gradient(60% 70% at 50% 40%, rgba(255, 255, 255, 0.07), transparent 70%),
    var(--bg);
}

.game-cover--soon img {
  width: 40%;
  opacity: 0.3;
}

.game-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1.5rem;
}

.game-head {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.game-icon {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}

.game-icon--placeholder {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.game h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.3;
}

.game-meta {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.game p {
  margin: 0;
  color: var(--text-soft);
}

.game .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* ---------- Pie ---------- */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer p {
  margin: 0;
}

.site-footer p a {
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

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

/* ---------- Páginas legales ---------- */

.page {
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 7vw, 5rem);
}

.prose {
  max-width: 76ch;
}

.prose h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.2;
}

.prose .updated {
  margin: 0 0 2rem;
  color: var(--muted);
}

.prose h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.3rem;
  line-height: 1.3;
}

.prose h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.05rem;
}

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

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose strong {
  color: var(--text);
}

/* ---------- 404 ---------- */

.not-found {
  padding: clamp(4rem, 12vw, 8rem) 0;
  text-align: center;
}

.not-found img {
  width: min(320px, 70vw);
  margin: 0 auto 2rem;
}

.not-found h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.not-found p {
  margin: 0 0 1.75rem;
  color: var(--muted);
}

/* ---------- Impresión (textos legales) ---------- */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }

  .prose p,
  .prose li {
    color: #000;
  }


  a {
    color: #000;
  }
}
