/* Base compartida de los bonos: fondo, barra superior y puerta de acceso. */
:root {
  --bx-bg-0: #0A0A0B;
  --bx-bg-1: #111113;
  --bx-bg-2: #1A1A1E;
  --bx-gold: #D4A843;
  --bx-gold-light: #E8C96A;
  --bx-gold-dark: #B8922E;
  --bx-gold-soft: rgba(212, 168, 67, 0.10);
  --bx-gold-line: rgba(212, 168, 67, 0.18);
  --bx-gold-line-on: rgba(212, 168, 67, 0.45);
  --bx-text: #F5F5F5;
  --bx-text-sec: #B0B0B8;
  --bx-text-mut: #78787F;
  --bx-danger: #E24B4A;
  --bx-serif: 'Playfair Display', Georgia, serif;
  --bx-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bx-bar-h: 58px;
}

html { background: var(--bx-bg-0); }
body { background: var(--bx-bg-0); }

/* Sin acceso confirmado: el contenido no se ve */
html:not(.bx-ok) body > *:not(.bx-gate):not(.portal-bg) { visibility: hidden; }

/* ── Fondo ── */
.portal-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background: var(--bx-bg-0);
}
.portal-bg__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(212,168,67,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212,168,67,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
.portal-bg__glow { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.25; }
.portal-bg__glow--1 {
  width: 600px; height: 600px; top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(212,168,67,0.3), transparent 70%);
}
.portal-bg__glow--2 {
  width: 400px; height: 400px; bottom: -100px; right: -100px;
  background: radial-gradient(circle, rgba(212,168,67,0.15), transparent 70%);
}

/* ── Barra superior ── */
.bx-bar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bx-bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 clamp(16px, 4vw, 32px);
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bx-gold-line);
  font-family: var(--bx-sans);
}
.bx-bar__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.86rem; font-weight: 600; color: var(--bx-text-sec);
  text-decoration: none; padding: 8px 12px; margin-left: -12px; border-radius: 60px;
  transition: color .2s ease, background .2s ease;
}
.bx-bar__back:hover { color: var(--bx-gold); background: var(--bx-gold-soft); }
.bx-bar__brand {
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.18em; color: var(--bx-text);
  white-space: nowrap;
}
.bx-bar__brand span { color: var(--bx-gold); }
.bx-bar__out {
  font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--bx-text-mut);
  background: none; border: 1px solid rgba(255,255,255,0.08); border-radius: 60px;
  padding: 6px 12px; cursor: pointer; transition: color .2s ease, border-color .2s ease;
}
.bx-bar__out:hover { color: var(--bx-gold); border-color: var(--bx-gold-line-on); }
@media (max-width: 420px) { .bx-bar__back + .bx-bar__brand { display: none; } }

/* ── Puerta de acceso ── */
.bx-gate {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px; overflow-y: auto;
  background: radial-gradient(circle at 30% 10%, rgba(212,168,67,0.10), transparent 45%), var(--bx-bg-0);
  font-family: var(--bx-sans); color: var(--bx-text);
}
.bx-gate[hidden] { display: none; }
.bx-gate__card {
  width: 100%; max-width: 400px; text-align: center;
  background: linear-gradient(165deg, var(--bx-bg-2), var(--bx-bg-1));
  border: 1px solid var(--bx-gold-line); border-radius: 20px;
  padding: 32px clamp(20px, 5vw, 32px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.bx-gate__brand { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.2em; margin-bottom: 22px; }
.bx-gate__brand span { color: var(--bx-gold); }
.bx-gate__title {
  font-family: var(--bx-serif); font-size: 1.7rem; font-weight: 800; line-height: 1.15;
  margin: 0 0 10px;
}
.bx-gate__lead { color: var(--bx-text-sec); font-size: 0.95rem; line-height: 1.55; margin: 0 0 22px; }
.bx-gate__lead strong { color: var(--bx-text); }
.bx-gate__muted { color: var(--bx-text-mut); font-size: 0.86rem; line-height: 1.5; margin: 0 0 18px; }
.bx-gate__provider {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 0.95rem; font-weight: 600; color: var(--bx-text);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 60px; padding: 13px 18px; margin-bottom: 10px; cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.bx-gate__provider:hover { border-color: var(--bx-gold-line-on); background: var(--bx-gold-soft); }
.bx-gate__sep {
  display: flex; align-items: center; gap: 12px; margin: 16px 0 14px;
  color: var(--bx-text-mut); font-size: 0.78rem;
}
.bx-gate__sep::before, .bx-gate__sep::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08); }
.bx-gate__form { display: flex; flex-direction: column; gap: 10px; }
.bx-gate__input {
  width: 100%; box-sizing: border-box;
  font: inherit; font-size: 16px; color: var(--bx-text);
  background: var(--bx-bg-0); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 13px 14px; outline: none; transition: border-color .2s ease;
}
.bx-gate__input:focus { border-color: var(--bx-gold); }
.bx-gate__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; box-sizing: border-box; text-decoration: none;
  font: inherit; font-size: 0.98rem; font-weight: 700; color: var(--bx-bg-0);
  background: linear-gradient(135deg, var(--bx-gold-light), var(--bx-gold), var(--bx-gold-dark));
  border: none; border-radius: 60px; padding: 14px 20px; margin-top: 4px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(212,168,67,0.25); transition: transform .2s ease, box-shadow .2s ease;
}
.bx-gate__btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(212,168,67,0.4); }
.bx-gate__link {
  font: inherit; font-size: 0.84rem; color: var(--bx-text-sec); background: none; border: none;
  margin-top: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.bx-gate__link:hover { color: var(--bx-gold); }
.bx-gate__msg { min-height: 1.2em; margin: 12px 0 0; font-size: 0.85rem; color: var(--bx-gold-light); line-height: 1.45; }
.bx-gate__msg:empty { display: none; }
.bx-gate__spinner {
  width: 34px; height: 34px; margin: 6px auto 16px; border-radius: 50%;
  border: 3px solid var(--bx-gold-line); border-top-color: var(--bx-gold);
  animation: bx-spin 0.8s linear infinite;
}
@keyframes bx-spin { to { transform: rotate(360deg); } }
