/* AllFitness — Hoja de estilos PÚBLICA (landing / contacto / login)
 * NO se usa en el panel de administración (app.css). Diseño propio, pulido (impeccable).
 * Reutiliza las variables neon del tema (/api/theme/css) para mantener la marca. */

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/Poppins-regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  src: url('/fonts/Poppins-medium.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  src: url('/fonts/Poppins-semibold.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/Poppins-Bold.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Julietta Messie';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/Julietta-Messie-Demo.ttf') format('truetype');
  font-display: swap;
}

:root {
  --pub-bg: #050507;
  --pub-bg-soft: #0b0b13;
  --pub-surface: rgba(18, 18, 26, 0.7);
  --pub-line: rgba(255, 255, 255, 0.09);
  --pub-line-strong: rgba(255, 255, 255, 0.16);
  --pub-text: #eef0f8;
  --pub-muted: #a7abbe;
  --pub-radius: 20px;
  --pub-radius-sm: 14px;
  --pub-font: "Poppins", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --pub-glow: 0 22px 70px -22px rgba(0, 0, 0, 0.85);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  min-height: 100dvh;
  background: var(--pub-bg);
  color: var(--pub-text);
  font-family: var(--pub-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body {
  background-image:
    radial-gradient(1000px 520px at 90% -8%, rgba(122, 212, 255, 0.09), transparent 55%),
    radial-gradient(900px 560px at -6% 30%, rgba(61, 255, 46, 0.1), transparent 55%),
    radial-gradient(700px 500px at 55% 110%, rgba(191, 90, 242, 0.08), transparent 55%);
  background-attachment: fixed;
}
a { color: var(--neon-green, #3dff2e); text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

/* ---------- Layout base ---------- */
.pub-page { min-height: 100dvh; display: flex; flex-direction: column; }
.pub-main { flex: 1; }

/* ---------- Navbar ---------- */
.pub-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  padding: 0.9rem clamp(1rem, 4vw, 2.4rem);
  background: rgba(6, 6, 9, 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--pub-line);
}
.pub-nav-links { display: flex; align-items: center; gap: 0.4rem; }
.pub-menu-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--pub-line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--pub-text);
  font-size: 1.25rem;
}
.pub-brand {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--neon-green, #3dff2e);
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-shadow: 0 0 22px rgba(61, 255, 46, 0.35);
}
.pub-brand .dot {
  width: 9px; height: 9px; border-radius: 999px;
  background: var(--neon-green, #3dff2e);
  box-shadow: 0 0 12px rgba(61, 255, 46, 0.8);
}
.pub-brand .brand-logo {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.5));
}

/* Logo en la tarjeta de login */
.login-logo { display: inline-block; margin-bottom: 0.6rem; }
.login-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}
.pub-link {
  color: var(--pub-muted);
  padding: 0.5rem 0.95rem;
  min-height: 42px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.pub-link:hover { color: var(--pub-text); background: rgba(255, 255, 255, 0.05); }
.pub-link.active {
  color: var(--neon-green, #3dff2e);
  background: rgba(61, 255, 46, 0.08);
  box-shadow: inset 0 0 0 1px rgba(61, 255, 46, 0.35);
}

@media (max-width: 640px) {
  .pub-nav { min-height: 62px; }
  .pub-menu-toggle { display: grid; margin-left: 0.35rem; }
  .pub-nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0.75rem;
    left: 0.75rem;
    padding: 0.45rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    border: 1px solid var(--pub-line-strong);
    border-radius: var(--pub-radius-sm);
    background: rgba(10, 10, 15, 0.98);
    box-shadow: var(--pub-glow);
  }
  .pub-nav.menu-open .pub-nav-links { display: flex; z-index: 1; }
  .pub-link { width: 100%; }
}

/* ---------- Hero (imagen de fondo desde el header hasta el main) ---------- */
.hero-shell {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.05);
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(760px 540px at 16% 78%, rgba(5, 5, 7, 0.72), transparent 60%),
    linear-gradient(105deg, rgba(5, 5, 7, 0.95) 0%, rgba(5, 5, 7, 0.78) 42%, rgba(5, 5, 7, 0.28) 100%);
}
.pub-nav, .pub-main { position: relative; }
.pub-main { z-index: 1; }
.pub-nav {
  background: linear-gradient(180deg, rgba(5, 5, 7, 0.78), rgba(5, 5, 7, 0.35));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(1.6rem, 6vw, 4rem) clamp(1rem, 5vw, 3.6rem) clamp(2.4rem, 5vw, 4rem);
}
.hero-copy { max-width: 600px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neon-cyan, #7ad4ff);
  background: rgba(122, 212, 255, 0.12);
  border: 1px solid rgba(122, 212, 255, 0.36);
  margin-bottom: 1.3rem;
  backdrop-filter: blur(6px);
}
.hero-copy h1 {
  font-size: clamp(2.2rem, 6vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 0 0 0.9rem;
  text-wrap: balance;
  color: #fff;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.55);
}
.hero-copy h1 .accent {
  background: linear-gradient(115deg, var(--neon-green, #3dff2e), var(--neon-cyan, #7ad4ff));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-quote {
  font-family: "Julietta Messie", "Comic Sans MS", cursive;
  font-size: clamp(1.7rem, 4.6vw, 2.6rem);
  line-height: 1.26;
  font-weight: 700;
  margin: 0.4rem 0 1.05rem;
  max-width: 20ch;
  background: linear-gradient(115deg, var(--neon-green, #3dff2e), var(--neon-cyan, #7ad4ff), var(--neon-purple, #bf5af2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(61, 255, 46, 0.24));
}
.hero-sub {
  color: var(--pub-muted);
  font-size: 1.02rem;
  max-width: 42ch;
  margin: 0 0 1.8rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  min-height: 48px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 0;
  transition: transform 150ms ease, box-shadow 180ms ease, background 180ms ease, filter 180ms ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: linear-gradient(115deg, var(--neon-green, #3dff2e), #7ef25a);
  color: #051105;
  box-shadow: 0 10px 32px -10px rgba(61, 255, 46, 0.6);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 14px 44px -10px rgba(61, 255, 46, 0.75); }
.btn-ghost {
  background: rgba(20, 20, 30, 0.6);
  color: var(--pub-text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Social ---------- */
.hero-socials { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.6rem; }
.hero-socials .label {
  width: 100%;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pub-muted);
  margin-bottom: 0.2rem;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--pub-line-strong);
  background: var(--pub-surface);
  color: var(--pub-text);
  font-weight: 600;
  font-size: 0.85rem;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.social-btn:hover { transform: translateY(-2px); }
.social-btn svg { width: 18px; height: 18px; fill: currentColor; }
.social-btn.wa { color: #25d366; border-color: rgba(37, 211, 102, 0.4); }
.social-btn.wa:hover { background: rgba(37, 211, 102, 0.12); }
.social-btn.ig { color: #e1306c; border-color: rgba(225, 48, 108, 0.4); }
.social-btn.ig:hover { background: rgba(225, 48, 108, 0.12); }
.social-btn.fb { color: #1877f2; border-color: rgba(24, 119, 242, 0.4); }
.social-btn.fb:hover { background: rgba(24, 119, 242, 0.12); }

/* ---------- Features strip ---------- */
.features {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2.4rem);
}
@media (min-width: 720px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--pub-surface);
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius-sm);
  padding: 1.3rem 1.3rem 1.4rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.feature .f-ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 1.4rem;
  background: rgba(61, 255, 46, 0.1);
  border: 1px solid rgba(61, 255, 46, 0.28);
  color: var(--neon-green, #3dff2e);
  margin-bottom: 0.8rem;
}
.feature h3 { margin: 0 0 0.3rem; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--pub-muted); font-size: 0.9rem; }

/* ---------- Footer ---------- */
.pub-footer {
  text-align: center;
  padding: 1.4rem clamp(1rem, 4vw, 2.4rem);
  color: #fff;
  font-size: 0.88rem;
  border-top: 1px solid var(--pub-line);
  background: rgba(6, 6, 9, 0.6);
}
.pub-footer a { color: #fff; }
.pub-footer a:hover { color: var(--neon-green, #3dff2e); }
.pub-footer .sep { color: var(--pub-muted); margin: 0 0.4rem; }

/* ---------- Página de contacto ---------- */
.contact-wrap {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2rem);
}
.contact-card {
  width: 100%;
  max-width: 560px;
  background: var(--pub-surface);
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius);
  padding: clamp(1.4rem, 4vw, 2rem);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--pub-glow);
}
.contact-card h1 { margin: 0 0 0.2rem; font-size: 1.7rem; letter-spacing: 0.04em; }
.contact-card .sub { color: var(--pub-muted); margin-bottom: 1.4rem; }
.field { min-width: 0; }
.field label { display: block; font-size: 0.8rem; color: var(--pub-muted); margin-bottom: 0.4rem; font-weight: 600; }
input, select, textarea {
  background: #101020;
  border: 1px solid var(--pub-line-strong);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  width: 100%;
  min-height: 46px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
  color: var(--pub-text);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--neon-green, #3dff2e);
  box-shadow: 0 0 0 3px rgba(61, 255, 46, 0.14);
}
textarea { min-height: 132px; resize: vertical; }
.stack { display: flex; flex-direction: column; gap: 0.85rem; }
.alert { padding: 0.8rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: rgba(255, 45, 85, 0.12); border: 1px solid var(--neon-red, #ff2d55); color: #ffb0be; }
.alert-ok { background: rgba(61, 255, 46, 0.1); border: 1px solid var(--neon-green, #3dff2e); color: #c8ffbf; }
.btn-block { width: 100%; }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.hidden { display: none !important; }
.mt-1 { margin-top: 0.5rem; }

/* ---------- Página de login (pública) ---------- */
.login-wrap { flex: 1; display: grid; place-items: center; padding: 1.5rem; }
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--pub-surface);
  border: 1px solid var(--pub-line);
  border-radius: var(--pub-radius);
  padding: 1.9rem 1.6rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--pub-glow);
}
.login-card h1 { margin: 0 0 0.15rem; font-size: 1.6rem; letter-spacing: 0.05em; color: var(--neon-green, #3dff2e); text-shadow: 0 0 24px rgba(61, 255, 46, 0.28); }
.login-card .sub { color: var(--pub-muted); margin-bottom: 1.5rem; font-size: 0.92rem; }
.password-input-wrap { position: relative; }
.password-input-wrap input { padding-right: 3.35rem; }
.password-visibility {
  position: absolute;
  top: 50%;
  right: 0.25rem;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--pub-muted);
}
.password-visibility:hover { color: var(--pub-text); background: rgba(255, 255, 255, 0.07); }
.password-visibility:focus-visible { outline: 2px solid var(--neon-green, #3dff2e); outline-offset: 1px; }
.password-visibility svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Animaciones ---------- */
@keyframes pubRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.hero-copy, .hero-media, .features, .contact-card, .login-card {
  animation: pubRise 640ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero-media { animation-delay: 90ms; }
.features { animation-delay: 140ms; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
