/* ============================================================
   bookmi-brand.css
   Sistema de diseño compartido por la landing, signup, contacto
   y futuras páginas con branding bookmi (dark mode).
   Incluye: fuentes, variables, sistema de botones y header.
   No incluye estilos específicos de cada página.
   ============================================================ */

/* Tipografía oficial: Inter (UI) + Space Grotesk (display). Mismo set
   que la landing — al estar en el CSS compartido, cualquier página que
   lo importe hereda automáticamente la misma tipografía. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@500;600;700&display=swap');

/* Reset base idéntico al de la landing — clave para que las alturas
   de los botones y los espaciados sean idénticos en todas las páginas
   que usan este sistema. */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bm-black);
  color: var(--bm-white-pure, #ffffff);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
/* Reset universal para <button>: la clave para que su font-family,
   font-size, line-height y peso coincidan con el resto. Sin esto, los
   browsers aplican una fuente nativa (system) con line-height normal
   que altera la altura computada del botón. */
button { font: inherit; border: 0; background: transparent; cursor: pointer; color: inherit; }
a { color: inherit; }

:root {
  --bm-black: #0d0d0d;
  --bm-black-soft: #161616;
  --bm-black-softer: #1c1c1c;
  --bm-white-pure: #ffffff;
  --bm-lime: #d9f81b;
  --bm-lime-hot: #c9e000;
  --bm-border: rgba(255, 255, 255, .1);
  --bm-border-hover: rgba(255, 255, 255, .22);
  --bm-text-muted: rgba(255, 255, 255, .55);
  --bm-text-dim: rgba(255, 255, 255, .35);
  --bm-danger: #ef4444;
  --bm-success: #22c55e;
}

/* ============================================================
   NAV — header fixed compartido
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 10, 10, .82);
  border-bottom: 1px solid var(--bm-border);
  transition: background .25s, border-color .25s;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
@media (min-width: 768px) { .nav-inner { padding: 18px 40px; } }
.nav-brand img {
  height: 26px; width: auto;
  filter: brightness(0) invert(1);
  display: block;
}
.nav-brand img.lit { filter: none; }
/* En móvil el logo se ve un pelín más grande para que tenga peso
   visual junto a los botones a la derecha. */
@media (max-width: 660px) {
  .nav-brand img { height: 32px; }
}
.nav-links { display: none; gap: 32px; font-size: 14px; font-weight: 500; }
.nav-links a {
  color: rgba(255,255,255,.7);
  transition: color .15s;
  position: relative; padding: 4px 0;
  text-decoration: none;
}
.nav-links a:hover { color: var(--bm-lime); }
@media (min-width: 880px) { .nav-links { display: flex; } }
.nav-actions { display: flex; gap: 10px; align-items: center; }
/* En desktop sale el botón de texto ("Iniciar sesión" o "Ir a mi panel"),
   en móvil su versión compacta como icono circular. JS pinta ambos y
   el CSS decide cuál se muestra según el ancho. */
.nav-actions .nav-ghost-mobile { display: none; }
@media (max-width: 660px) {
  .nav-actions .nav-ghost-desktop { display: none; }
  .nav-actions .nav-ghost-mobile { display: inline-flex; }
}

/* ============================================================
   BUTTONS — sistema pill compartido (idéntico al de la landing)
   ============================================================ */
/* Igualado exactamente a la landing: SIN border base, SIN line-height
   explícito, SIN background transparent. El border solo aparece en .btn-ghost,
   y la altura final del botón es 13+13(padding) + 14×fuente nativa = ~42px,
   idéntica entre todas las variantes. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; font-size: 14px; font-weight: 700;
  border-radius: 999px;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s, background .15s, color .15s, box-shadow .2s;
  white-space: nowrap; letter-spacing: -0.01em;
  text-decoration: none;
  /* Reset para <button>: evita estilos nativos del browser sin alterar tamaño */
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-lime {
  background: var(--bm-lime); color: var(--bm-black);
  box-shadow: 0 0 0 0 rgba(217, 248, 27, .35);
}
.btn-lime:hover:not(:disabled) {
  background: var(--bm-lime-hot);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -10px rgba(217, 248, 27, .5);
}
.btn-ghost {
  background: rgba(255, 255, 255, .06); color: var(--bm-white-pure);
  border: 1px solid rgba(255, 255, 255, .12);
}
.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, .12);
  transform: translateY(-1px);
}
.btn-dark { background: var(--bm-black); color: var(--bm-white-pure); }
.btn-dark:hover:not(:disabled) { background: var(--bm-black-soft); transform: translateY(-1px); }
.btn-block { width: 100%; }

/* Botón circular con icono — solo se usa para el acceso login/panel
   en el nav cuando la pantalla es pequeña (móvil). 42×42 igual la
   altura de los pills normales.
   IMPORTANTE: usamos `.btn.btn-icon` (2 clases = especificidad 20)
   para ganar a reglas locales que algunas páginas (como index.html)
   tienen inline para `.btn { padding: 13px 22px }`. */
.btn.btn-icon {
  padding: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  color: var(--bm-white-pure);
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
  flex-shrink: 0;
  gap: 0;
}
.btn.btn-icon:hover:not(:disabled) {
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}
.btn.btn-icon svg { width: 20px; height: 20px; display: block; }
.btn.btn-icon.has-dot::after {
  content: '';
  position: absolute;
  right: 2px; bottom: 2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bm-lime);
  border: 2px solid var(--bm-black);
}
.btn-lg { padding: 16px 28px; font-size: 15px; }
.btn-arrow::after {
  content: "→"; font-weight: 400;
  transition: transform .15s;
  display: inline-block;
}
.btn:hover .btn-arrow::after,
.btn-arrow:hover:not(:disabled)::after { transform: translateX(3px); }

/* ============================================================
   LOGIN MODAL — compartido por todas las páginas (lo inyecta
   /js/bookmi-login.js cuando se llama a window.openBookmiLogin()).
   ============================================================ */
.bm-login-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  animation: bmFadeIn .2s;
}
.bm-login-overlay.open { display: flex; }
@keyframes bmFadeIn { from { opacity: 0; } to { opacity: 1; } }
.bm-login-card {
  background: var(--bm-black); color: var(--bm-white-pure);
  border-radius: 24px; padding: 36px 28px;
  width: 100%; max-width: 420px;
  border: 1px solid var(--bm-border); position: relative;
  animation: bmSlideUp .25s cubic-bezier(.2, .7, .2, 1);
}
@keyframes bmSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.bm-login-card h2 { font-size: 28px; margin-bottom: 6px; font-weight: 800; letter-spacing: -.5px; }
.bm-login-sub { color: rgba(255, 255, 255, .55); font-size: 14px; margin-bottom: 24px; }
/* Botón "Continuar con Google" — blanco con icono multicolor y borde
   sutil. Se usa también en otros modales del producto, pero aquí lo
   definimos para el modal compartido. */
.bm-login-card .btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 12px 18px;
  background: #fff; color: #1f2937;
  border-radius: 12px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  border: 1px solid rgba(0,0,0,.1);
  text-decoration: none;
  margin-bottom: 14px;
  transition: background .15s, transform .08s, box-shadow .15s;
}
.bm-login-card .btn-google:hover { background: #f7f9fc; box-shadow: 0 4px 16px -8px rgba(0,0,0,.2); }
.bm-login-card .btn-google:active { transform: scale(.98); }
.bm-login-card .bm-login-divider {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,.4); font-size: 12px; margin: 4px 0 16px;
}
.bm-login-card .bm-login-divider::before,
.bm-login-card .bm-login-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.1);
}
.bm-login-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255, 255, 255, .05); color: inherit;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: background .15s;
  border: none; cursor: pointer;
}
.bm-login-close:hover { background: rgba(255, 255, 255, .1); }
.bm-login-field { margin-bottom: 14px; }
.bm-login-card label {
  display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px;
  color: rgba(255, 255, 255, .7); letter-spacing: .3px;
}
.bm-login-card input {
  width: 100%; padding: 14px 16px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--bm-border);
  color: var(--bm-white-pure); font-size: 15px; font-family: inherit;
  transition: border-color .15s, background .15s;
}
.bm-login-card input:focus {
  outline: none; border-color: var(--bm-lime); background: rgba(217, 248, 27, .04);
}
.bm-login-foot { margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .5); text-align: center; }
.bm-login-foot a { color: var(--bm-lime); text-decoration: none; }
.bm-login-foot a:hover { text-decoration: underline; }
/* Spinner reutilizable */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: bmSpin .6s linear infinite;
}
@keyframes bmSpin { to { transform: rotate(360deg); } }
