/* =====================================================================
   World of Legends · graficos y mejoras (hoja propia; no toca site.css)
   Usa los tokens de site.css (:root). Negro azulado y oro; nunca gris.
   Carga: graficos.html, mejoras.html e index.html (bloque de graficos).
   ===================================================================== */

/* ---------------------------------------------------------------- imagen y hueco */
.gfx-img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* hueco dibujado: cielo de atardecer y colinas en negro azulado, hasta que llegue la captura real */
.gfx-hueco {
  --sun-x: 68%;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  width: 100%;
  height: 100%;
  min-height: 160px;
  padding: clamp(14px, 3vw, 28px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 36% 46% at var(--sun-x) 62%, oklch(78% 0.15 78 / 0.55), transparent 70%),
    radial-gradient(ellipse 80% 60% at var(--sun-x) 70%, oklch(48% 0.14 40 / 0.5), transparent 72%),
    linear-gradient(180deg, oklch(17% 0.04 262) 0%, oklch(26% 0.07 300) 46%, oklch(38% 0.1 40) 70%, oklch(14% 0.03 250) 71%, oklch(11% 0.02 252) 100%);
}
.gfx-hueco::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  z-index: -1;
  background: oklch(10.5% 0.018 252);
  clip-path: polygon(0 62%, 9% 48%, 21% 58%, 36% 30%, 49% 52%, 63% 38%, 78% 56%, 90% 42%, 100% 54%, 100% 100%, 0 100%);
}
.gfx-hueco__tag {
  align-self: flex-start;
  padding: 0.45em 0.7em 0.4em;
  border: 1px solid var(--gold);
  font-size: 0.6875rem;
  font-weight: 650;
  font-stretch: 75%;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--gold);
  background: oklch(11% 0.02 252 / 0.7);
}
.gfx-hueco__name {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}
.gfx-hueco--frost { --sun-x: 30%; }

/* ---------------------------------------------------------------- cabecera de la pagina */
.g-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: min(82svh, 760px);
  padding: calc(var(--space-2xl) + 24px) var(--gutter) var(--space-xl);
  overflow: clip;
}
.g-hero__media { position: absolute; inset: 0; z-index: -2; }
.g-hero__media .gfx-hueco { min-height: 100%; }
.g-hero__media .gfx-hueco__tag,
.g-hero__media .gfx-hueco__name { display: none; }
.g-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, var(--ink-900) 0%, oklch(13.5% 0.022 250 / 0.86) 26%, oklch(13.5% 0.022 250 / 0.5) 58%, transparent 88%),
    linear-gradient(90deg, oklch(10.5% 0.018 252 / 0.78) 0%, oklch(10.5% 0.018 252 / 0.35) 45%, transparent 75%);
}
.g-hero__title, .g-hero__lead { text-shadow: 0 2px 18px oklch(8% 0.02 252 / 0.85), 0 1px 2px oklch(8% 0.02 252 / 0.6); }
.g-hero__copy { display: grid; gap: var(--space-sm); max-width: var(--wrap); width: 100%; margin-inline: auto; }
.g-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 1rem + 12vw, 9.5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.g-hero__lead { max-width: 46ch; margin: var(--space-2xs) 0 0; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.4rem); line-height: 1.55; color: var(--text); }
.g-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-2xs); }
.g-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin: var(--space-sm) 0 0;
  padding: var(--space-sm) 0 0;
  list-style: none;
  border-top: 1px solid oklch(81% 0.115 84 / 0.4);
}
.g-hero__stats li { display: grid; gap: 2px; }
.g-hero__stats b { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem); font-weight: 700; line-height: 1; color: var(--gold); }
.g-hero__stats span { font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; font-stretch: 80%; color: var(--text-2); }

/* ---------------------------------------------------------------- secciones */
.g-sec { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding: var(--space-3xl) var(--gutter) 0; }
.g-sec__head { display: grid; gap: var(--space-sm); max-width: 50rem; margin-bottom: var(--space-xl); }
.g-sec__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.3rem + 4vw, 4.5rem);
  font-weight: 700;
  line-height: 0.98;
  text-wrap: balance;
}
.g-sec__lead { margin: 0; max-width: 56ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); color: var(--text-2); }
.g-sec__note { margin-top: var(--space-lg); max-width: 62ch; }
.cmp-stack + .credit { margin-top: var(--space-2xl); }
.g-sec--wide { max-width: none; padding-inline: 0; }
.g-sec--wide .g-sec__head { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------------- efectos del cliente (imagen + texto alternos) */
.fx { display: grid; gap: var(--space-xl); }
.fx__item { display: grid; gap: var(--space-md); align-items: center; }
.fx__shot { aspect-ratio: 16 / 9; border: 1px solid var(--ink-700); overflow: hidden; background: var(--ink-950); }
.fx__text { display: grid; gap: var(--space-xs); align-content: center; color: var(--text-2); }
.fx__name {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
}
.fx__text p { margin: 0; max-width: 46ch; }
.fx__fine { font-size: 0.875rem; color: var(--text-3); }
@media (min-width: 900px) {
  .fx__item { grid-template-columns: 7fr 5fr; gap: var(--space-xl); }
  .fx__item:nth-child(even) { grid-template-columns: 5fr 7fr; }
  .fx__item:nth-child(even) .fx__shot { order: 2; }
}

/* ---------------------------------------------------------------- comparador sin / con */
.cmp { margin: 0; display: grid; gap: var(--space-xs); --pos: 50%; }
.cmp__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid oklch(81% 0.115 84 / 0.45);
  background: var(--ink-950);
  user-select: none;
  -webkit-user-select: none;
}
.cmp__layer { position: absolute; inset: 0; }
.cmp__layer .gfx-hueco { min-height: 100%; }
.cmp__layer--sin { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
/* hueco: el lado "sin" es plano y frio, el "con" calido, para que el deslizador ya diga algo */
.cmp__layer--sin .gfx-hueco {
  background:
    radial-gradient(ellipse 60% 30% at 50% 66%, oklch(40% 0.05 235 / 0.5), transparent 70%),
    linear-gradient(180deg, oklch(21% 0.035 250) 0%, oklch(30% 0.045 240) 68%, oklch(15% 0.025 250) 69%, oklch(12% 0.02 252) 100%);
}
.cmp__label {
  position: absolute;
  top: 12px;
  z-index: 3;
  padding: 0.5em 0.8em 0.45em;
  font-size: 0.6875rem;
  font-weight: 700;
  font-stretch: 75%;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  background: oklch(10.5% 0.018 252 / 0.82);
  pointer-events: none;
}
.cmp__label--sin { left: 12px; color: var(--frost); border: 1px solid var(--frost-2); }
.cmp__label--con { right: 12px; color: var(--gold); border: 1px solid var(--gold-2); }
.cmp__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: var(--gold);
  box-shadow: 0 0 0 1px oklch(10.5% 0.018 252 / 0.6);
  pointer-events: none;
}
.cmp__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  translate: -50% -50%;
  background: var(--gold);
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  box-shadow: inset 0 0 0 3px var(--ink-950);
}
.cmp__knob::before,
.cmp__knob::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  translate: 0 -50%;
  border: 6px solid transparent;
}
.cmp__knob::before { left: 7px; border-right-color: var(--ink-950); border-left-width: 0; }
.cmp__knob::after { right: 7px; border-left-color: var(--ink-950); border-right-width: 0; }
.cmp__range {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-appearance: none;
  appearance: none;
}
.js .cmp__range { display: block; }
.cmp__range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100vh; }
.cmp__range::-moz-range-thumb { width: 44px; height: 100vh; border: 0; background: transparent; }
.cmp__range:focus-visible ~ .cmp__bar .cmp__knob { box-shadow: inset 0 0 0 3px var(--ink-950), 0 0 0 3px var(--text); }
.cmp__cap { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.9375rem; color: var(--text-2); }
.cmp__cap b { font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--text); }
.cmp-stack { display: grid; gap: var(--space-xl); }

/* ---------------------------------------------------------------- galeria de paisajes a pantalla ancha */
.gal { display: grid; gap: 6px; padding-inline: 0; }
.gal__item { position: relative; margin: 0; overflow: hidden; aspect-ratio: 4 / 3; background: var(--ink-950); }
.gal__item .gfx-hueco { min-height: 100%; }
.gal__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 2px;
  padding: var(--space-xl) var(--gutter) var(--space-sm);
  background: linear-gradient(0deg, oklch(10.5% 0.018 252 / 0.88), transparent);
  pointer-events: none;
}
.gal__cap b { font-family: var(--font-display); font-size: clamp(1.125rem, 1rem + 0.7vw, 1.625rem); font-weight: 650; color: var(--text); }
.gal__cap span { font-size: 0.875rem; color: var(--text-2); }
.gal__item .gfx-hueco__name,
.gal__item .gfx-hueco__tag { position: relative; z-index: 1; }
@media (min-width: 760px) {
  .gal { grid-template-columns: repeat(2, 1fr); }
  .gal__item { aspect-ratio: 16 / 10; }
  .gal__item:nth-child(3n + 1) { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
}

/* ---------------------------------------------------------------- credito del pack HD */
.credit {
  display: grid;
  gap: var(--space-md);
  padding: clamp(20px, 4vw, 44px);
  border: 1px solid oklch(81% 0.115 84 / 0.55);
  border-left-width: 6px;
  background: linear-gradient(100deg, oklch(17% 0.03 80 / 0.55), var(--ink-950) 70%);
}
.credit__name { margin: 0; font-family: var(--font-display); font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem); font-weight: 700; line-height: 1.05; }
.credit p { margin: 0; max-width: 62ch; color: var(--text-2); }
.credit strong { color: var(--text); }
.credit__link { display: inline-flex; align-items: center; min-height: 44px; gap: 0.5em; font-weight: 700; color: var(--gold); }
.credit__links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); }

/* ---------------------------------------------------------------- hoy / con la v21 (dos columnas con filetes) */
.avail { display: grid; gap: var(--space-xl); }
.avail__col { display: grid; gap: var(--space-sm); align-content: start; }
.avail__col h3 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); font-weight: 700; line-height: 1.1; }
.avail__list { margin: 0; padding: 0; list-style: none; display: grid; }
.avail__list li { padding: 14px 0 13px; border-top: 1px solid var(--ink-700); color: var(--text-2); }
.avail__list li:last-child { border-bottom: 1px solid var(--ink-700); }
.avail__list b { color: var(--text); font-weight: 650; }
@media (min-width: 860px) { .avail { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); } }

/* ---------------------------------------------------------------- cierre */
.g-end { text-align: center; display: grid; justify-items: center; gap: var(--space-md); padding: var(--space-3xl) var(--gutter) var(--space-3xl); }
.g-end__title { margin: 0; font-family: var(--font-display); font-size: clamp(2.25rem, 1.3rem + 4vw, 4.5rem); font-weight: 700; line-height: 1; text-wrap: balance; }
.g-end p { margin: 0; max-width: 50ch; color: var(--text-2); }

/* ---------------------------------------------------------------- bloque de la portada */
.gfxhome { position: relative; padding-top: var(--space-3xl); padding-bottom: var(--space-xl); }
.gfxhome__inner { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); display: grid; gap: var(--space-xl); }
.gfxhome__head { display: grid; gap: var(--space-sm); }
.gfxhome__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 1.4rem + 6vw, 6.25rem);
  font-weight: 700;
  line-height: 0.94;
  text-wrap: balance;
}
.gfxhome__lead { margin: 0; max-width: 52ch; font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem); color: var(--text-2); }
.gfxhome__fx { display: grid; margin: 0; padding: 0; list-style: none; }
.gfxhome__fx li { display: grid; gap: 4px; padding: 16px 0 15px; border-top: 1px solid var(--ink-700); color: var(--text-2); }
.gfxhome__fx li:last-child { border-bottom: 1px solid var(--ink-700); }
.gfxhome__fx b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); font-weight: 600; line-height: 1.15; color: var(--text); }
.gfxhome__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-lg); }
.gfxhome__credit { margin: 0; max-width: 62ch; font-size: 0.9375rem; color: var(--text-3); }
.gfxhome__credit a { font-weight: 650; }
.gfxhome__body { display: grid; gap: var(--space-lg); }
@media (min-width: 960px) {
  .gfxhome__body { grid-template-columns: 7fr 5fr; gap: var(--space-xl); align-items: start; }
}

/* ---------------------------------------------------------------- mejoras (pagina) */
.m-group { display: grid; gap: var(--space-md); padding-top: var(--space-2xl); }
.m-group__head { display: grid; gap: var(--space-xs); max-width: 36rem; }
.m-group__head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.875rem, 1.3rem + 2.4vw, 3.25rem); font-weight: 700; line-height: 1; }
.m-group__head p { margin: 0; color: var(--text-2); }
.m-list { margin: 0; display: grid; }
.m-list > div { display: grid; gap: 4px; padding: 16px 0 15px; border-top: 1px solid var(--ink-700); }
.m-list > div:last-child { border-bottom: 1px solid var(--ink-700); }
.m-list dt { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem); font-weight: 600; line-height: 1.15; color: var(--text); }
.m-list dd { margin: 0; max-width: 52rem; color: var(--text-2); }
.m-list code { white-space: nowrap; }
@media (min-width: 960px) {
  .m-group { grid-template-columns: 4fr 8fr; gap: var(--space-xl); }
}
.m-soon .m-list dt { color: var(--gold); }
.vision {
  margin: var(--space-2xl) 0 0;
  padding: var(--space-lg) 0 0;
  border-top: 1px solid oklch(81% 0.115 84 / 0.5);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  max-width: 32ch;
  text-wrap: balance;
  color: var(--text);
}
.vision em { font-style: normal; color: var(--gold); }
.soon-strip { margin-top: var(--space-xl); padding: var(--space-lg); border: 1px dashed oklch(81% 0.115 84 / 0.5); display: grid; gap: var(--space-sm); }
.soon-strip .m-list > div:first-child { border-top: 0; }

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