/* =============================================================================
   style.css - Web de Tribal Goblins
   Estetica de la interfaz del juego: paneles de madera oscura con borde,
   oro, verde goblin, pergamino para la historia, iconos del juego (pixel art)
   en "ranuras" como las del inventario y goblins renderizados por todas partes.
   Colores y fuentes se cambian aqui arriba.
   ============================================================================= */
:root {
  --bg: #120f0b;
  --bg2: #1b1610;
  --wood: #2a2016;
  --wood2: #221a12;
  --border: #5b4129;
  --border-hi: #8a6a3e;
  --text: #f1e7d2;
  --dim: #b3a383;
  --gold: #f2c14e;
  --gold2: #d99a2b;
  --green: #8bd14d;
  --green2: #4f8f2a;
  --parch: #ecdcb4;
  --parch-text: #3b2a18;
  --head: "Lilita One", "Trebuchet MS", sans-serif;
  --body: "Nunito", "Segoe UI", sans-serif;
  --radius: 10px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--body);
  overflow-x: hidden;
}
a { color: var(--gold); }
a:hover { color: #ffd772; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; line-height: 1.15; margin: 0 0 .55em; letter-spacing: .01em; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); color: var(--gold); text-shadow: 0 3px 0 rgba(0, 0, 0, .45); }
h3 { font-size: 1.3rem; color: var(--text); }
p { margin: 0 0 1em; }
.dim { color: var(--dim); }
.center { text-align: center; }
small { font-size: .72em; opacity: .85; }
strong { color: #fff3d6; }

/* Iconos del juego: pixel art, sin suavizar */
.gicon { width: 22px; height: 22px; image-rendering: pixelated; flex: none; }
.icon { width: 1.35em; height: 1.35em; flex: none; }

/* Ranura (como las del inventario del juego) */
.slot {
  display: inline-grid; place-items: center; flex: none;
  width: 64px; height: 64px; border-radius: 8px;
  background: radial-gradient(circle at 50% 35%, #3a2c1d, #1a140d);
  border: 2px solid var(--border-hi);
  box-shadow: inset 0 0 0 2px #120d08, inset 0 6px 12px rgba(0, 0, 0, .55), 0 3px 0 #0d0a06;
}
.slot .gicon { width: 40px; height: 40px; }
.slot-small { width: 40px; height: 40px; border-radius: 6px; }
.slot-small .gicon { width: 26px; height: 26px; }

/* Goblins renderizados (PNG transparente) */
.goblin { pointer-events: none; user-select: none; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .5)); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* --- Cabecera ------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 28px;
  background: linear-gradient(180deg, rgba(34, 26, 18, .97), rgba(22, 17, 12, .95));
  border-bottom: 2px solid var(--border);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 1.6rem; text-decoration: none; line-height: 1; }
.brand-icon { width: 28px; height: 28px; image-rendering: pixelated; }
.brand-a { color: var(--gold); }
.brand-b { color: var(--green); }
.nav { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--text); text-decoration: none; padding: 7px 14px; border-radius: 8px;
  font-weight: 800; font-size: .98rem; display: inline-flex; gap: 6px; align-items: center;
}
.nav a:hover { color: var(--gold); background: rgba(255, 255, 255, .04); }
.nav a.on { color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 8px 8px 0 0; }
.nav a.lang { margin-left: 8px; border: 2px solid var(--border); color: var(--dim); padding: 5px 10px; }
.nav a.lang .gicon { width: 18px; height: 18px; }
.menu-btn { display: none; margin-left: auto; background: var(--wood); border: 2px solid var(--border); border-radius: 8px; padding: 9px 9px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 3px; background: var(--gold); margin: 4px 0; border-radius: 2px; }

/* --- Botones -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 20px; border-radius: 10px;
  background: linear-gradient(180deg, #3b2d1f, #2a2016);
  color: var(--text); text-decoration: none; font-weight: 800;
  border: 2px solid var(--border-hi); border-bottom-width: 5px; border-bottom-color: #3a2a16;
  transition: transform .12s, filter .12s;
}
.btn:hover { color: #fff; transform: translateY(-2px); filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 8px 14px; font-size: .95rem; }
.btn-dark { background: linear-gradient(180deg, #4a3520, #33251a); color: #fff3d6; }
.btn-steam {
  padding: 14px 30px 14px 22px; gap: 14px; text-align: left;
  background: linear-gradient(180deg, #3f8fd0, #1f5d94);
  border-color: #8cc8ff; border-bottom-color: #133a5e; color: #fff;
  box-shadow: 0 0 0 4px rgba(63, 143, 208, .18), var(--shadow);
}
.btn-steam .icon { width: 2.2em; height: 2.2em; }
.btn-steam-txt { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--head); font-size: 1.45rem; font-weight: 400; }
.btn-steam-txt small { font-family: var(--body); font-weight: 800; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.btn-social { padding: 8px 14px; font-size: .95rem; }
.btn-social small { color: var(--dim); font-weight: 600; }
.btn.is-off { cursor: default; filter: saturate(.55) brightness(.85); }
.btn.is-off:hover { transform: none; }

/* --- Portada -------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100vh - 62px);
  display: grid; place-items: center;
  padding: 70px 20px 150px; text-align: center;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: -4%; z-index: -2;
  background: #0c0a07 center / cover no-repeat;   /* (la imagen la pone index.php) */
  animation: kenburns 30s ease-in-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }
.hero::before {
  /* oscurece el centro (para leer) y funde abajo con el resto de la pagina */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(10, 8, 5, .62), rgba(10, 8, 5, .2) 70%),
    linear-gradient(180deg, rgba(18, 15, 11, .35) 0%, rgba(18, 15, 11, 0) 30%, rgba(18, 15, 11, .6) 75%, var(--bg) 100%);
}
.hero-in { max-width: 860px; position: relative; z-index: 2; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-weight: 800; letter-spacing: .16em; text-transform: uppercase; font-size: .8rem; color: var(--green);
}
.kicker .gicon { width: 18px; height: 18px; }
.logo {
  font-size: clamp(3.6rem, 12vw, 8.4rem); line-height: .86; margin: 0 0 .28em;
  transform: rotate(-2deg);
}
.logo span { display: block; -webkit-text-stroke: 6px #1d1208; paint-order: stroke fill; text-shadow: 0 10px 0 #0d0905, 0 18px 30px rgba(0, 0, 0, .6); }
.logo-a { color: var(--gold); }
.logo-b { color: var(--green); margin-left: .4em; }
.tagline { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 640px; margin: 0 auto 1.8em; color: #f6eedc; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.hero-btns, .hero-social, .foot-social { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.steam-widget { width: 100%; max-width: 646px; height: 190px; border: 0; margin-top: 18px; }

/* Goblins de la portada: a los lados, de pie sobre el borde de abajo */
.hero-cast { position: absolute; bottom: 30px; display: flex; align-items: flex-end; z-index: 1; }
.hero-cast-l { left: max(10px, 4vw); }
.hero-cast-r { right: max(10px, 4vw); flex-direction: row-reverse; }
.hero-cast .goblin { height: clamp(150px, 22vw, 290px); width: auto; animation: bob 3.2s ease-in-out infinite; }
.hero-cast .goblin.g1 { height: clamp(120px, 17vw, 225px); margin: 0 -18px; animation-delay: -1.6s; }
.hero-cast-r .goblin { animation-delay: -.8s; }

/* Etiquetas del genero, montadas sobre el borde de la portada */
.badges { position: relative; z-index: 3; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: -34px auto 0; padding: 0 16px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 30px;
  background: linear-gradient(180deg, var(--wood), var(--wood2)); border: 2px solid var(--border-hi);
  font-weight: 800; box-shadow: var(--shadow);
}

/* --- Secciones ------------------------------------------------------------ */
.wrap { max-width: 1160px; margin: 0 auto; padding: 80px 22px; }
.wrap.narrow { max-width: 860px; }
.band {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .012) 0 14px, transparent 14px 28px),
    linear-gradient(180deg, #1a140e, #15110c);
  border-top: 2px solid var(--border); border-bottom: 2px solid var(--border);
}
.lead { font-size: 1.15rem; }

/* Que es: texto y una captura enmarcada con un goblin delante */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.about-art { position: relative; }
.frame {
  border: 10px solid #3a2a1a; border-radius: 6px; outline: 2px solid var(--border-hi); outline-offset: -2px;
  box-shadow: var(--shadow), inset 0 0 0 2px #120d08; transform: rotate(1.6deg); overflow: hidden; background: #000;
}
.frame img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.about-goblin { position: absolute; left: -46px; bottom: -40px; height: 210px; width: auto; animation: bob 3.6s ease-in-out infinite; }

/* Caracteristicas */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.feature {
  background: linear-gradient(180deg, var(--wood), var(--wood2));
  border: 2px solid var(--border); border-radius: var(--radius); padding: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, .07), var(--shadow);
  transition: transform .15s, border-color .15s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.feature .slot { margin-bottom: 14px; }
.feature p { color: var(--dim); margin: 0; font-size: .98rem; }

/* Galeria de la portada: carrusel horizontal */
.shots-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.shots-head h2 { margin: 0; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: min(460px, 82vw); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; }
.carousel::-webkit-scrollbar { height: 8px; }
.carousel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.carousel .shot { scroll-snap-align: start; }
.carousel .shot img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.shot { display: block; border: 3px solid #3a2a1a; outline: 2px solid var(--border); border-radius: 8px; overflow: hidden; background: #000; }
.shot img { transition: transform .35s, filter .35s; width: 100%; }
.shot:hover img { transform: scale(1.05); filter: brightness(1.1); }
.gallery { columns: 3 320px; column-gap: 16px; }
.gallery .shot { margin-bottom: 16px; break-inside: avoid; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .92); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-height: 92vh; max-width: 96vw; border: 3px solid var(--border-hi); border-radius: 6px; }

/* Pergamino (historia) con un goblin asomando */
.parchment {
  position: relative; color: var(--parch-text);
  background: radial-gradient(ellipse at 50% 40%, #f4e7c4, #e2cc98 85%, #cdb27a);
  border-radius: 8px; padding: 44px 52px; font-size: 1.1rem;
  box-shadow: inset 0 0 50px rgba(110, 70, 20, .35), 0 0 0 3px #6b4a26, 0 0 0 7px #2a1d10, var(--shadow);
}
.parchment h2, .parchment h3 { color: #4b2f12; text-shadow: none; }
.parchment strong { color: #2a1a0a; }
.parchment a { color: #7a3c10; }
.parchment a.btn { color: #fff3d6; margin-top: 6px; }
.parchment .kicker { color: #4f7a24; }
.parchment-goblin { position: absolute; right: 26px; top: -150px; height: 180px; width: auto; animation: bob 3.4s ease-in-out infinite; }
.lore-teaser { padding-top: 130px; }
.lore h2 { margin-top: 1em; }
.lore h2:first-child { margin-top: 0; }

/* Avisos */
.warn-box {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(180deg, #3d1d12, #30170e); border: 2px solid #9a4a22; color: #ffd8bf;
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 26px;
}
.warn-box .gicon { margin-top: 2px; }

/* --- Spoilers ------------------------------------------------------------- */
details.spoiler, details.wiki-spoiler { margin: 1.3em 0; border: 2px dashed #a8532a; border-radius: var(--radius); background: rgba(80, 28, 12, .35); }
.parchment details.spoiler { background: rgba(120, 50, 20, .1); border-color: #9a5a2a; }
details > summary { cursor: pointer; padding: 13px 18px; list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details > summary::-webkit-details-marker { display: none; }
.spoiler-label { font-family: var(--head); font-size: 1.1rem; color: #ffb88a; }
.parchment .spoiler-label { color: #8a3a12; }
.spoiler-tag { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #c0502a; color: #fff; font-weight: 800; flex: none; }
.spoiler-hint { margin-left: auto; font-size: .82rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.parchment .spoiler-hint { color: #7a6040; }
details[open] .spoiler-hint { display: none; }
.spoiler-body { padding: 4px 22px 16px; animation: reveal .4s ease; }
@keyframes reveal { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: none; } }
.wiki-spoiler.lv2 { border-color: #d0402a; }
.wiki-spoiler .lv { color: #ffcf8a; font-family: var(--body); font-weight: 800; font-size: .9rem; }
.wiki-spoiler.lv2 .lv { color: #ff7a5a; }

/* --- Noticias ------------------------------------------------------------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.posts-full { grid-template-columns: 1fr; }
.post {
  background: linear-gradient(180deg, var(--wood), var(--wood2)); border: 2px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.post-img { aspect-ratio: 16 / 8; background: #000 center / cover; border-bottom: 2px solid var(--border); }
.post-full .post-img { aspect-ratio: 16 / 6; }
.post-in { padding: 20px 22px; }
.post-meta { color: var(--dim); font-size: .88rem; margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tag { background: rgba(139, 209, 77, .12); border: 1px solid var(--green2); border-radius: 20px; padding: 1px 10px; color: var(--green); font-weight: 800; font-size: .76rem; }
.more { font-weight: 800; text-decoration: none; }

/* --- Desarrollo ----------------------------------------------------------- */
.dev-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 44px; align-items: start; }
.dev-text ul { padding-left: 1.1em; }
.dev-text li { margin-bottom: 6px; }
.dev-text li::marker { color: var(--green); }
.made { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip { padding: 4px 12px; border-radius: 6px; background: #0f0c08; border: 1px solid var(--border-hi); font-weight: 800; font-family: Consolas, monospace; color: var(--gold); }
.dev-now {
  position: relative; background: linear-gradient(180deg, var(--wood), var(--wood2)); border: 2px solid var(--border-hi);
  border-radius: var(--radius); padding: 26px; margin-top: 90px; box-shadow: var(--shadow);
}
.dev-now ul { list-style: none; padding: 0; margin: 0; }
.dev-now li { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-weight: 800; }
.dev-goblin { position: absolute; right: 18px; top: -150px; height: 160px; width: auto; animation: bob 3s ease-in-out infinite; }

/* --- Cabecera de las paginas interiores ----------------------------------- */
.banner {
  position: relative; overflow: hidden; isolation: isolate;
  padding: 90px 22px 70px; min-height: 300px; display: flex; align-items: flex-end;
  border-bottom: 2px solid var(--border);
}
.banner-bg { position: absolute; inset: 0; z-index: -2; background: #0c0a07 center 40% / cover no-repeat; filter: saturate(.9); }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 11, 8, .92), rgba(14, 11, 8, .55) 60%, rgba(14, 11, 8, .25)), linear-gradient(0deg, var(--bg), transparent 55%); }
.banner-in { max-width: 1160px; width: 100%; margin: 0 auto; }
.banner h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); color: var(--gold); -webkit-text-stroke: 4px #1d1208; paint-order: stroke fill; text-shadow: 0 6px 0 #0d0905; margin-bottom: .2em; }
.banner p { font-size: 1.15rem; max-width: 620px; color: #f3ead6; }
.banner-goblin { position: absolute; right: max(16px, 8vw); bottom: -6px; height: clamp(150px, 20vw, 250px); width: auto; animation: bob 3.4s ease-in-out infinite; }

/* --- Wiki ----------------------------------------------------------------- */
.wiki-tools { margin: 0 0 14px; }
#wiki-q { width: 100%; padding: 13px 16px; font: inherit; color: var(--text); background: var(--bg2); border: 2px solid var(--border); border-radius: var(--radius); }
#wiki-q:focus { outline: none; border-color: var(--gold); }
.wiki-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.wiki-cats a { display: inline-flex; gap: 6px; align-items: center; text-decoration: none; padding: 6px 14px; border: 2px solid var(--border); border-radius: 20px; font-weight: 800; color: var(--text); background: var(--wood2); }
.wiki-cats a:hover { border-color: var(--gold); color: var(--gold); }
.wiki-cat { display: flex; align-items: center; gap: 12px; margin-top: 1.7em; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.wiki-entry {
  background: linear-gradient(180deg, var(--wood), var(--wood2)); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; margin: 14px 0; box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
}
.wiki-entry.wiki-spoiler { padding: 0; background: rgba(80, 28, 12, .35); }
.wiki-entry p:last-child { margin-bottom: 0; }
.wiki-entry.hidden { display: none; }

/* --- Pie: dos goblins asomados por encima ---------------------------------- */
.foot { position: relative; margin-top: 140px; background: linear-gradient(180deg, #1d1610, #140f0b); border-top: 2px solid var(--border); text-align: center; }
.foot-goblins { position: absolute; left: 0; right: 0; top: -128px; height: 130px; pointer-events: none; }
.foot-goblin { position: absolute; bottom: 0; height: 130px; width: auto; }
.foot-goblin-0 { left: 12%; animation: bob 3.3s ease-in-out infinite; }
.foot-goblin-1 { right: 12%; animation: bob 3.3s ease-in-out infinite -1.5s; }
.foot-in { padding: 34px 20px 30px; }
.foot-brand { font-size: 2rem; margin-bottom: 14px; }
.foot p { margin: 4px 0; }

/* --- Pantallas medianas y movil ------------------------------------------- */
@media (max-width: 980px) {
  .features, .posts { grid-template-columns: 1fr 1fr; }
  .about, .dev-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-goblin { left: -10px; height: 160px; }
  .hero-cast .goblin.g1 { display: none; }
  .dev-now { margin-top: 110px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .top { padding: 10px 16px; flex-wrap: wrap; }
  .brand { font-size: 1.35rem; }
  .menu-btn { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .nav a.on { box-shadow: inset 3px 0 0 var(--gold); border-radius: 0; }
  .nav a.lang { margin: 6px 0 0; justify-content: center; }
  .menu-open .nav { display: flex; }
  .wrap { padding: 56px 16px; }
  .features, .posts { grid-template-columns: 1fr; }
  .hero { padding: 50px 16px 180px; min-height: auto; }
  .hero-cast { bottom: 18px; }
  .hero-cast .goblin { height: 150px; }
  .parchment { padding: 30px 22px; font-size: 1.03rem; }
  .parchment-goblin { height: 130px; top: -110px; right: 12px; }
  .lore-teaser { padding-top: 110px; }
  .banner { padding: 60px 16px 50px; min-height: 240px; }
  .banner-goblin { height: 130px; right: 8px; opacity: .9; }
  .banner p { max-width: 65%; }
  .btn-steam-txt { font-size: 1.2rem; }
  .foot-goblin { height: 100px; }
  .foot-goblins { top: -98px; height: 100px; }
  .spoiler-hint { margin-left: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .goblin { animation: none !important; }
}
