/* ==========================================================================
   Portada y acceso. Todo sale del arte del juego: cielo y rayos de la pantalla de carga, pradera,
   madera de los carteles, pergamino del panel inferior, cintas azules del HUD.
   ========================================================================== */

.relative { position: relative; }

/* ---------- Pantalla de espera mientras se confirma la sesión ---------- */
.bs { display: none; position: fixed; inset: var(--hdr-h, 60px) 0 0 0; z-index: 40; place-items: center; align-content: center; gap: 12px;
  background: linear-gradient(180deg, #bfe3f6, #eaf7fd); color: var(--tinta-2); font-weight: 800; }
.bs__globe { width: min(40vw, 190px); height: auto; }
.bs p { margin: 0; font-family: var(--f-display); font-size: 1.3rem; }
html.se-has-token:not(.se-ready) .bs { display: grid; }
html.se-has-token:not(.se-ready) #landing-section,
html.se-has-token:not(.se-ready) #landing-nav-actions { display: none !important; }

.lp { background: var(--pradera); color: var(--texto); }
.lp-wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* ---------- Portada: cielo con rayos, la isla y el titular ---------- */
.lp-hero {
  position: relative; isolation: isolate; overflow: hidden; padding: 30px 0 118px;
  background: linear-gradient(180deg, #b7def2 0%, #d6edf9 48%, #eaf7fd 100%);
}
.lp-hero__sun {
  position: absolute; inset: -10% -6% 0 -6%; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from -90deg at 66% 58%, rgba(255, 255, 255, 0.62) 0 6.5deg, rgba(255, 255, 255, 0) 6.5deg 13deg);
  -webkit-mask-image: radial-gradient(circle at 66% 58%, #000 0, #000 30%, transparent 72%);
  mask-image: radial-gradient(circle at 66% 58%, #000 0, #000 30%, transparent 72%);
}
.lp-hero__in { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: clamp(12px, 3vw, 44px); align-items: center; }
.lp-hero__copy { padding-top: 6px; }
.lp-h1 { font-size: clamp(2.5rem, 5.1vw, 4.7rem); text-wrap: balance; margin-bottom: 0.38em; }
.lp-lead { margin: 0 0 26px; max-width: 33em; font-size: clamp(1.02rem, 1.35vw, 1.2rem); line-height: 1.6; color: #153250; }
.lp-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.lp-cta--center { justify-content: center; }
.lp-btn-big { min-height: 58px; padding: 0 30px; font-size: 1.12rem; border-radius: 14px; }
.lp-btn-ghost { background: #fff; color: var(--tinta-2); border-color: var(--tinta-2); box-shadow: 0 4px 0 var(--tinta-2), 0 8px 16px rgba(0, 0, 0, 0.14); }
.lp-btn-ghost:hover { background: #f3fbff; }
.lp-btn-ghost:active { box-shadow: 0 2px 0 var(--tinta-2); }
.lp-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 26px 0 0; padding: 0; list-style: none; font-weight: 800; font-size: 0.93rem; color: #2b4a68; }
.lp-facts li { display: flex; align-items: center; gap: 9px; }
.lp-facts li::before { content: ""; width: 9px; height: 9px; background: var(--oro); border: 2px solid var(--oro-borde); transform: rotate(45deg); flex: none; }

/* La isla (se compone con scripts/web_scene.py) */
.lp-hero__scene { position: relative; min-width: 0; }
.lp-scene { position: relative; width: 100%; aspect-ratio: 1160 / 930; }
.lp-plate { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lp-spot, .lp-deco { position: absolute; display: block; margin: 0; padding: 0; border: 0; background: none; line-height: 0; }
.lp-spot img, .lp-deco img { display: block; width: 100%; height: auto; pointer-events: none; transition: transform 0.16s ease, filter 0.16s ease; }
.lp-spot { cursor: pointer; border-radius: 6px; }
.lp-spot:hover img, .lp-spot:focus-visible img, .lp-spot.is-on img {
  transform: translateY(-6px);
  filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 7px rgba(255, 255, 255, 0.95));
}
.lp-spot:focus-visible { outline: 3px solid var(--tinta-3); outline-offset: 3px; }
.lp-sign {
  position: relative; z-index: 2; width: min(100%, 560px); min-height: 92px; margin: -14px auto 0; padding: 13px 20px 15px;
  display: flex; flex-direction: column; gap: 3px; color: #fbeeca; font-size: 0.98rem; line-height: 1.45;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.05) 0 3px, rgba(255, 255, 255, 0.03) 3px 9px), linear-gradient(180deg, #7d5429, #5b3a1a);
  border: 3px solid #3a230e; border-radius: 10px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.2), 0 5px 0 #2a1709, 0 14px 22px rgba(0, 0, 0, 0.2);
}
.lp-sign b { font-family: var(--f-display); font-size: 1.22rem; color: var(--oro); letter-spacing: 0.01em; font-weight: 700; }
.lp-hero__edge { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 76px; display: block; }

/* ---------- Secciones ---------- */
.lp-sec { position: relative; padding: 92px 0 84px; }
.lp-h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); text-wrap: balance; }
.lp-sec__lead { margin: 14px 0 0; max-width: 40em; font-size: 1.1rem; line-height: 1.6; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.lp-sec__lead--light { color: #e7f2fb; text-shadow: none; }

/* Cómo se juega: camino de tierra con cinco paradas */
.lp-how { background: var(--pradera) radial-gradient(rgba(255, 255, 255, 0.07) 2px, transparent 3px) 0 0 / 40px 40px; padding-top: 80px; }
.lp-how .lp-sec__lead { text-align: center; margin-inline: auto; }
.lp-plank {
  display: table; margin: 0 auto; position: relative; padding: 14px 44px 18px;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.06) 0 3px, rgba(255, 255, 255, 0.03) 3px 10px), linear-gradient(180deg, #93673a, #6a4421);
  border: 4px solid #3a230e; border-radius: 12px; box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.22), 0 8px 0 #2a1709, 0 20px 26px rgba(0, 0, 0, 0.22);
}
.lp-plank::before, .lp-plank::after {
  content: ""; position: absolute; top: -74px; width: 7px; height: 74px;
  background: repeating-linear-gradient(180deg, #d8bd82 0 5px, #8f7443 5px 10px); border-radius: 2px;
}
.lp-plank::before { left: 22%; } .lp-plank::after { right: 22%; }
.lp-plank h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
.lp-steps { list-style: none; counter-reset: paso; margin: 56px 0 0; padding: 0; position: relative; display: grid; gap: 38px; }
.lp-steps::before {
  content: ""; position: absolute; left: 50%; top: 10px; bottom: 10px; width: 16px; transform: translateX(-50%);
  background: repeating-linear-gradient(180deg, #dcc48f 0 16px, transparent 16px 32px); border-radius: 10px; opacity: 0.9;
}
.lp-step { counter-increment: paso; position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 96px; align-items: center; }
.lp-step::after {
  content: counter(paso); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; background: var(--oro); border: 3px solid var(--oro-borde); color: #3b2300;
  font: 700 1.25rem/1 var(--f-num); box-shadow: 0 3px 0 var(--oro-borde), 0 0 0 5px rgba(95, 155, 43, 0.9);
}
.lp-step:nth-child(even) .lp-patch { order: 2; }
.lp-patch {
  margin: 0; min-height: 250px; display: flex; align-items: flex-end; justify-content: center; gap: 10px; padding: 0 20px 30px; position: relative;
}
.lp-patch::before {
  content: ""; position: absolute; left: 6%; right: 6%; bottom: 8px; height: 62%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 40%, #9ed04a 0, #86bb3a 60%, #6aa02e 100%); box-shadow: 0 8px 0 #4a7d1f, inset 0 0 0 3px rgba(255, 255, 255, 0.14);
}
.lp-patch img { position: relative; display: block; height: auto; max-width: 62%; }
.lp-patch .lp-px { width: 84px; }
.lp-patch__tree { margin-left: -24px; }
.lp-note {
  position: relative; padding: 18px 24px 20px; background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); color: #3a2a10;
  border: 3px solid var(--pergamino-borde); border-radius: 14px; box-shadow: 0 5px 0 #7d5d28, 0 16px 24px rgba(0, 0, 0, 0.16);
}
.lp-note h3 { margin: 0 0 6px; font: 700 1.55rem/1.1 var(--f-display); color: var(--rojo-hondo); }
.lp-note p { margin: 0; font-size: 1.04rem; line-height: 1.55; }
.lp-note em { font-style: normal; font-weight: 800; color: #6b3d00; background: rgba(255, 194, 26, 0.35); padding: 0 4px; border-radius: 4px; }

/* Escalera de títulos */
.lp-ladder { background: linear-gradient(180deg, var(--tinta-2), var(--tinta)); color: var(--claro); padding-bottom: 96px; }
.lp-ladder .lp-sec__lead { max-width: 46em; }
.lp-ladder em { font-style: normal; font-weight: 800; color: var(--oro-claro); }
.lp-stairs { list-style: none; display: flex; align-items: flex-end; gap: 8px; height: 330px; margin: 42px 0 0; padding: 0; }
.lp-stairs li {
  flex: 1 1 0; min-width: 0; height: calc(var(--h) * 31px + 56px); display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; padding: 10px 8px 0;
  background: linear-gradient(180deg, var(--oro-claro), var(--oro) 40%, var(--oro-hondo)); border: 3px solid var(--oro-borde); border-bottom: 0;
  border-radius: 10px 10px 0 0; color: #3b2300; text-align: center; position: relative;
}
.lp-stairs b { font: 700 clamp(0.78rem, 1.3vw, 1.18rem)/1.1 var(--f-display); overflow-wrap: anywhere; }
.lp-stairs__lv { font: 700 0.74rem/1 var(--f-num); letter-spacing: 0.04em; opacity: 0.8; }
.lp-stairs li:last-child { background: linear-gradient(180deg, #ffefa0, #ffc21a 40%, #e59800); }
.lp-stairs li:last-child::before {
  content: ""; position: absolute; left: 50%; bottom: 100%; width: 34px; height: 76px; transform: translateX(-50%) translateY(2px);
  background: url("/img/landing/bandera.webp") center bottom / contain no-repeat;
}

/* El chat junto a la partida */
.lp-inside { background: var(--pradera-honda) radial-gradient(rgba(255, 255, 255, 0.05) 2px, transparent 3px) 0 0 / 40px 40px; }
.lp-inside__in { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 52px; align-items: center; }
.lp-inside .lp-sec__lead { margin-top: 14px; }
.lp-shot { margin: 0; }
.lp-shot img { display: block; width: 100%; height: auto; border-radius: 10px; border: 6px solid var(--madera); box-shadow: 0 0 0 2px #2a1709, 0 18px 34px rgba(0, 0, 0, 0.4); background: var(--pradera); }
.lp-shot figcaption { margin-top: 12px; font-size: 0.85rem; color: #cfe5bc; }

/* Eventos */
.lp-events { background: var(--pradera); }
.lp-events .lp-h2 { margin-bottom: 26px; }
.lp-ev-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.lp-ev, .lp-ev-empty {
  margin: 0; padding: 18px 22px; background: linear-gradient(180deg, #f6e9b9, var(--pergamino)); color: #3a2a10;
  border: 3px solid var(--pergamino-borde); border-radius: 14px; box-shadow: 0 5px 0 #7d5d28, 0 14px 22px rgba(0, 0, 0, 0.16);
}
.lp-ev-empty { grid-column: 1 / -1; font-size: 1.05rem; }
.lp-ev h3 { margin: 0 0 4px; font: 700 1.4rem/1.1 var(--f-display); color: var(--rojo-hondo); }
.lp-ev p { margin: 0 0 10px; }
.lp-ev__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-ev__tags span { padding: 3px 11px; border-radius: 99px; font: 700 0.85rem var(--f-num); background: var(--tinta-2); color: var(--oro-claro); }

/* Cierre y pie */
.lp-final { background: var(--tinta); color: var(--claro); padding: 78px 0 84px; border-top: 6px solid var(--madera-clara); text-align: center; }
.lp-final__in { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lp-final p { margin: 0 0 14px; font-size: 1.1rem; color: var(--apagado); }
.lp-foot { background: #06121f; color: var(--apagado); padding: 34px 0 40px; font-size: 0.88rem; }
.lp-foot__in { display: flex; align-items: center; gap: 22px; }
.lp-foot p { margin: 0; max-width: 56em; line-height: 1.5; }
.lp-foot img { height: 52px; width: auto; flex: none; }

/* ---------- Acceso ---------- */
.au {
  position: relative; isolation: isolate; min-height: calc(100dvh - var(--hdr-h, 60px)); padding: 44px 0 70px; display: grid; align-items: center;
  background: linear-gradient(180deg, #b7def2 0%, #d6edf9 55%, #7fb742 100%);
}
.au::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: repeating-conic-gradient(from -90deg at 30% 50%, rgba(255, 255, 255, 0.55) 0 6.5deg, rgba(255, 255, 255, 0) 6.5deg 13deg);
  -webkit-mask-image: radial-gradient(circle at 30% 50%, #000 0, transparent 70%); mask-image: radial-gradient(circle at 30% 50%, #000 0, transparent 70%);
}
.au-wrap { width: min(1020px, calc(100% - 32px)); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 470px); gap: 48px; align-items: center; }
.au-side { display: grid; place-items: center; }
.au-side__globe { width: min(100%, 380px); height: auto; filter: drop-shadow(0 18px 18px rgba(11, 42, 70, 0.28)); }
.au-card {
  background: linear-gradient(180deg, var(--tinta-2), var(--tinta)); color: var(--claro); border: 3px solid var(--madera-clara); border-radius: 18px;
  padding: 22px 28px 28px; box-shadow: 0 8px 0 var(--madera), 0 24px 40px rgba(4, 14, 26, 0.4);
}
.au-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 22px; background: #06121f; border-radius: 12px; }
.au-tabs button { min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--apagado); font-weight: 800; font-size: 0.95rem; }
.au-tabs button:hover { color: var(--claro); background: rgba(255, 255, 255, 0.07); }
.au-tabs button[aria-pressed="true"] { background: var(--oro); color: #3b2300; box-shadow: 0 2px 0 var(--oro-borde); }
.au-h { margin: 0 0 18px; font: 700 1.7rem/1.1 var(--f-display); color: var(--oro); text-shadow: 0 2px 0 var(--rojo-hondo); }
.au-forgot { margin: -4px 0 18px; text-align: right; font-size: 0.88rem; }
.au-forgot a, .au-link, .au-back button { color: #9fd0f4; background: none; border: 0; text-decoration: underline; padding: 0; font-size: 0.88rem; }
.au-forgot a:hover, .au-link:hover, .au-back button:hover { color: #fff; }
.au-link { margin-bottom: 12px; display: inline-block; }
.au-back { margin: 18px 0 0; text-align: center; }
.au-ok p { margin: 0 0 18px; color: var(--apagado); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .lp-hero__in { grid-template-columns: minmax(0, 1fr); }
  .lp-hero__copy { max-width: 640px; }
  .lp-hero__scene { max-width: 720px; margin-inline: auto; width: 100%; }
  .lp-hero { padding-bottom: 96px; }
  .lp-inside__in { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .au-wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 520px; }
  .au-side { display: none; }
}
@media (max-width: 760px) {
  .lp-sec { padding: 76px 0 64px; }
  .lp-steps { gap: 30px; margin-top: 44px; }
  .lp-steps::before { left: 23px; transform: none; }
  .lp-step { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-left: 62px; }
  .lp-step::after { left: 23px; top: 24px; transform: translate(-50%, 0); }
  .lp-step:nth-child(even) .lp-patch { order: 0; }
  .lp-patch { min-height: 190px; }
  .lp-stairs { height: 270px; gap: 4px; }
  .lp-stairs li { height: calc(var(--h) * 24px + 48px); padding: 8px 3px 0; }
  .lp-stairs b { font-size: 0.7rem; }
  .lp-stairs__lv { font-size: 0.62rem; }
  .lp-foot__in { flex-direction: column; text-align: center; }
  .lp-btn-big { width: 100%; }
  .lp-h1 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .au-card { padding: 18px 18px 22px; }
}
