/* Fenecs Games — estilo común */
:root {
  --bg: #1d1611;
  --bg-2: #261d16;
  --panel: #2f241b;
  --line: #4a3a2c;
  --cream: #f8eacc;
  --cream-2: #d9c6a3;
  --muted: #a8977c;
  --gold: #e9a23b;
  --gold-2: #f6c766;
  --accent: var(--gold);
  --radius: 18px;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: "Fredoka", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

/* idiomas: sólo se ve el elegido */
html[data-lang="es"] [lang="en"]:not(html),
html[data-lang="en"] [lang="es"]:not(html) { display: none !important; }

/* ---------------------------------------------------------------- cabecera y pestañas */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(29, 22, 17, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: var(--max); margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); text-decoration: none; font-weight: 600; font-size: 20px; white-space: nowrap; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.tabs { display: flex; gap: 6px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 16px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  color: var(--cream-2); font-weight: 500; font-size: 16px;
  border: 1px solid transparent; transition: background .15s, color .15s;
}
.tab:hover { background: var(--panel); color: var(--cream); }
.tab.on { background: var(--cream); color: var(--bg); font-weight: 600; }
.lang {
  border: 1px solid var(--line); background: var(--bg-2); color: var(--cream-2);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; cursor: pointer;
}
.lang:hover { color: var(--cream); border-color: var(--muted); }

/* ---------------------------------------------------------------- bloques */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
section { padding: 72px 0; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(34px, 6vw, 60px); }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: 22px; }
.lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--cream-2); max-width: 46em; }
.muted { color: var(--muted); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 14px; text-decoration: none; font-weight: 600;
  background: linear-gradient(#f6c766, #e9a23b 60%, #c9822a); color: #2b1b12;
  box-shadow: 0 3px 0 #8a5419, 0 8px 18px rgba(0,0,0,.35);
  transition: transform .12s;
}
.btn:hover { transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); box-shadow: none; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--cream-2); font-size: 15px;
}
.badge b { color: var(--cream); font-weight: 600; }

/* ---------------------------------------------------------------- portada del estudio */
.hero-studio {
  min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 48px 16px;
  background: radial-gradient(ellipse at 50% 42%, #4a3420 0%, #2a1e15 38%, var(--bg) 70%);
}
.hero-studio img.logo { width: min(240px, 52vw); margin: 0 auto 26px; filter: drop-shadow(0 10px 30px rgba(0,0,0,.5)); }
.hero-studio p { margin: 0 auto; }

.games { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.game-card {
  position: relative; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--cream);
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .18s, box-shadow .18s;
}
.game-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.game-card .shot { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.game-card .body { padding: 20px 22px 24px; }
.game-card .body p { margin: 0 0 12px; color: var(--cream-2); }
.game-card .more { color: var(--accent); font-weight: 600; }

/* ---------------------------------------------------------------- página de un juego */
.hero-game { position: relative; overflow: hidden; }
.hero-game .bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(1.05); }
.hero-game .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,15,11,.35) 0%, rgba(20,15,11,.55) 45%, var(--bg) 100%); }
.hero-game .wrap { position: relative; padding-top: 80px; padding-bottom: 72px; }
.hero-game .game-logo { width: min(520px, 90%); margin-bottom: 18px; filter: drop-shadow(0 12px 28px rgba(0,0,0,.55)); }
.hero-game .lead { color: var(--cream); text-shadow: 0 2px 10px rgba(0,0,0,.6); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 34px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.feature p { margin: 0; color: var(--cream-2); font-size: 16px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 28px; }
.gallery a { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.gallery img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { padding: 6px 12px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: 15px; color: var(--cream-2); }

/* visor de capturas */
.viewer { position: fixed; inset: 0; z-index: 50; background: rgba(10,8,6,.92); display: none; place-items: center; padding: 16px; cursor: zoom-out; }
.viewer.on { display: grid; }
.viewer img { max-height: 92vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }

/* textos legales */
.legal { max-width: 820px; }
.legal h2 { font-size: 26px; margin-top: 1.6em; }
.legal p, .legal li { color: var(--cream-2); }
.legal li { margin-bottom: 6px; }

/* ---------------------------------------------------------------- pie */
footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer a { color: var(--cream-2); text-decoration: none; }
footer a:hover { color: var(--cream); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* temas de cada juego */
body.tlf { --accent: #f2c45a; --panel: #2d2219; }
body.tlf .hero-game .bg::after { background: linear-gradient(180deg, transparent 55%, var(--bg) 100%), linear-gradient(90deg, rgba(20,15,11,.88) 0%, rgba(20,15,11,.6) 55%, rgba(20,15,11,.25) 100%); }
body.pach { --accent: #ffb547; --bg: #0f1322; --bg-2: #161c31; --panel: #1a2140; --line: #2c3660; --cream-2: #c9d0e8; --muted: #8e98bd; }
body.pach .top { background: rgba(15,19,34,.92); }
body.pach .hero-game .bg::after { background: linear-gradient(180deg, transparent 55%, var(--bg) 100%), linear-gradient(90deg, rgba(15,19,34,.88) 0%, rgba(15,19,34,.6) 55%, rgba(15,19,34,.25) 100%); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  section { padding: 52px 0; }
  .top-in { flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }
  .lang { margin-left: auto; }
  .tabs { order: 3; width: 100%; margin-left: 0; justify-content: space-between; }
  .tab { padding: 7px 12px; font-size: 15px; }
}
