/* Horizonte 64 Software — estilo basado en el kit de marca (horizonte64_assets_web) */
:root {
  /* palette.json */
  --cream: #F0E6C8;
  --yellow: #FFD54A;
  --orange: #FF8A00;
  --red: #E03A2E;
  --purple: #783FF2;
  --blue: #3A86FF;
  --cyan: #00C2C7;
  --green: #3EC16B;
  --gray: #6D6D6D;
  --black: #111111;

  --navy: #16123a;       /* relleno de ventanas */
  --navy-2: #0d0b24;
  --pixel: "Press Start 2P", monospace;
  --term: "VT323", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--cream);
  font-family: var(--term);
  font-size: 24px;
  line-height: 1.3;
}
/* scanlines suaves sobre todo el sitio */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px);
}
img { max-width: 100%; display: block; }
.pixel { image-rendering: pixelated; }
a { color: var(--cyan); }

/* --- Barra superior --- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px clamp(16px, 4vw, 48px);
  background: rgba(17, 17, 17, 0.92);
  border-bottom: 3px solid var(--navy);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); }
.brand img { width: 40px; height: auto; }
.brand span { font-family: var(--pixel); font-size: 14px; }
.brand b { color: var(--red); font-weight: normal; }
.topbar nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.topbar nav a { font-family: var(--pixel); font-size: 11px; color: var(--cream); text-decoration: none; text-transform: uppercase; }
.topbar nav a:hover { color: var(--yellow); }
.topbar nav a::before { content: "> "; color: var(--red); }
@media (max-width: 520px) { .brand span { display: none; } }

/* --- Ventanas retro (marco + barra de título) --- */
.window {
  background: var(--navy-2);
  border: 3px solid var(--cream);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.6);
}
.window-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 10px;
  background: var(--navy);
  border-bottom: 3px solid var(--cream);
  font-family: var(--pixel); font-size: 11px; color: var(--cream);
}
.window-buttons { display: flex; gap: 4px; }
.window-buttons i {
  width: 16px; height: 16px; border: 2px solid var(--cream);
  font-style: normal; font-size: 10px; line-height: 12px; text-align: center;
}
.window-cream { background: var(--cream); color: var(--black); }
.window-cream .window-bar { background: var(--cream); color: var(--black); border-bottom-color: var(--black); }

/* --- Botones con relieve --- */
.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--pixel); font-size: 12px; text-transform: uppercase; text-decoration: none;
  padding: 14px 18px;
  border: 3px solid var(--cream);
  box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.35), inset 3px 3px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.08s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: inset -3px -3px 0 rgba(0, 0, 0, 0.35), inset 3px 3px 0 rgba(255, 255, 255, 0.25), 4px 4px 0 var(--black); }
.btn:active { transform: translate(1px, 1px); }
.btn-blue { background: var(--blue); color: var(--cream); }

/* --- Portada --- */
.hero {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center;
  max-width: 1200px; margin: 0 auto;
  padding: clamp(40px, 8vw, 90px) 16px;
}
.hero h1 { margin: 0 0 32px; }
.hero-logo { width: 100%; max-width: 520px; height: auto; }
.hero-window img { width: 100%; height: auto; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { margin: 0 auto; }
}

/* franjas de colores de la marca */
.stripes { display: grid; gap: 3px; }
.stripes i { display: block; height: 4px; }
.stripes i:nth-child(1) { background: var(--orange); }
.stripes i:nth-child(2) { background: var(--red); }
.stripes i:nth-child(3) { background: var(--purple); }
.stripes i:nth-child(4) { background: var(--blue); }

/* --- Secciones --- */
.section { max-width: 1100px; margin: 0 auto; padding: 72px 16px; }
.section-title {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--pixel); font-weight: normal; font-size: clamp(20px, 4vw, 30px);
  color: var(--yellow); text-transform: uppercase; margin: 0 0 36px;
}
.section-title img { height: 48px; width: auto; }

/* --- Catálogo de juegos --- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 32px; align-items: start; }
.game { display: flex; flex-direction: column; }
.game-cover { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #000; border-bottom: 3px solid var(--cream); }
.game-cover > img:first-child { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 0.4s; }
.game:hover .game-cover > img:first-child { transform: scale(1.05); }
.game-logo { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); width: 80%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8)); }
.game-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.game-body p { margin: 0; }
.game-body .btn { align-self: flex-start; }
.stats { margin: 0; display: grid; gap: 2px; }
.stats div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(240, 230, 200, 0.25); }
.stats dt { color: var(--cyan); text-transform: uppercase; }
.stats dd { margin: 0; }
.stats .soon { color: var(--yellow); }
.stats .ready { color: var(--green); }

.placeholder { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #15122e 0 12px, #1b1740 12px 24px); }
.placeholder img { width: 92px; height: auto; }
.loading { display: flex; align-items: center; gap: 12px; text-transform: uppercase; }
.loading .bar { flex: 1; height: 18px; border: 2px solid var(--cream); padding: 2px; }
.loading .bar div {
  height: 100%; width: 64%;
  background: repeating-linear-gradient(90deg, var(--blue) 0 10px, transparent 10px 13px);
}

/* --- Nosotros --- */
.about { max-width: 760px; }
.about-body { padding: 22px 24px 8px; }
.about-body p { margin: 0 0 16px; }
.sprites { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: clamp(16px, 4vw, 40px); margin-top: 48px; }
.sprites img { height: 52px; width: auto; }

/* animación: los sprites "flotan" */
.bob { animation: bob 1.6s steps(4) infinite; }
.sprites img:nth-child(2n) { animation-delay: -0.8s; }
.sprites img:nth-child(3n) { animation-delay: -0.4s; }
@keyframes bob { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .bob { animation: none; } }

/* --- Pie --- */
.footer { margin-top: 40px; border-top: 3px solid var(--navy); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 40px 16px 8px; display: flex; flex-wrap: wrap; gap: 40px 72px; align-items: center; }
.footer-logo { width: 240px; height: auto; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links h3 { font-family: var(--pixel); font-weight: normal; font-size: 12px; color: var(--blue); margin: 0 0 8px; text-transform: uppercase; }
.footer-links a { color: var(--cream); text-decoration: none; text-transform: uppercase; }
.footer-links a::before { content: "> "; color: var(--red); }
.footer-links a:hover { color: var(--yellow); }
.copyright { text-align: center; text-transform: uppercase; color: var(--cream); opacity: 0.8; margin: 24px 16px 28px; }
