/* Bayes · Nueva UI — Sitio público (home comercial). Fuente: bayes2/docs/nueva-ui/prototipo/landing.css
   Todas las clases llevan prefijo nui- (guía §12.2). */
:root {
  --brand: #1f1fe0;
  --brand-strong: #1414b8;
  --brand-soft: #ebebff;
  --navy: #0e0f3d;
  --accent: #c84a14;          /* naranjo Bayes oscurecido: texto blanco con contraste ≥ 4.5:1 */
  --accent-hover: #a83c0e;
  --accent-soft: #fdeee7;
  --bg: #ffffff;
  --bg-alt: #f4f5f9;
  --line: #e5e7ef;
  --text: #0f1222;
  --text-2: #545a70;
  --muted: #8a90a6;
  --shadow: 0 1px 2px rgba(16, 20, 50, .04), 0 8px 28px rgba(16, 20, 50, .07);
  --photo: url("../img/home-bayes-72.86b5a3f9098c.webp");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body.nui-public { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
svg { fill: currentColor; }
.nui-wrap { width: min(1200px, 100% - 48px); margin: 0 auto; }

/* ---------- Botones ---------- */
.nui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent;
  font: 600 15px Inter, sans-serif; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.nui-btn svg { width: 18px; height: 18px; }
.nui-btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.nui-btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.nui-btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(31, 31, 224, .28); }
.nui-btn-primary:hover { background: var(--brand-strong); }
.nui-btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(200, 74, 20, .28); }
.nui-btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.nui-btn-outline { border-color: var(--brand); color: var(--brand); background: #fff; }
.nui-btn-outline:hover { background: var(--brand-soft); }
.nui-btn-ghost { border-color: var(--line); background: #fff; color: var(--text); }
.nui-btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.nui-btn-white { background: #fff; color: var(--navy); }
.nui-btn-white:hover { background: var(--brand-soft); }
.nui-btn-ghost-dark { border-color: rgba(255, 255, 255, .35); color: #fff; }
.nui-btn-ghost-dark:hover { background: rgba(255, 255, 255, .1); }
.nui-btn-block { width: 100%; }
.nui-btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }

/* ---------- Cabecera ---------- */
.nui-nav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.nui-nav.nui-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(16, 20, 50, .06); }
.nui-nav-in { height: 72px; display: flex; align-items: center; gap: 28px; }
.nui-nav-logo img { height: 46px; display: block; }
.nui-nav-links { display: flex; gap: 6px; margin-left: 12px; }
.nui-nav-links a { padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14.5px; color: var(--text-2); }
.nui-nav-links a:hover { color: var(--brand); background: var(--brand-soft); }
.nui-nav-cta { margin-left: auto; display: flex; gap: 10px; }

/* ---------- Portada ---------- */
.nui-eyebrow { margin: 0 0 10px; font: 700 15px "Saira Condensed", sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.nui-hero { background: radial-gradient(800px 400px at 0% 0%, var(--brand-soft), transparent 70%), linear-gradient(180deg, #fff, var(--bg-alt)); padding: 56px 0 72px; }
.nui-hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.nui-hero h1 { margin: 0; font: 700 clamp(40px, 5vw, 62px)/1.02 "Saira Condensed", sans-serif; text-transform: uppercase; letter-spacing: -.005em; }
.nui-hero h1 span { color: var(--brand); display: block; }
.nui-lead { margin: 18px 0 0; font-size: 18px; color: var(--text-2); max-width: 560px; }
.nui-hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.nui-hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; max-width: 480px; }
.nui-hero-points li { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text-2); font-size: 14.5px; }
.nui-hero-points li::before { content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231f1fe0'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat; }

.nui-hero-side { position: relative; min-height: 540px; display: flex; align-items: flex-end; justify-content: flex-start; }
.nui-hero-photo {
  position: absolute; inset: 0 0 60px 70px; border-radius: 24px; overflow: hidden;
  background: #e1e1e1 var(--photo) no-repeat 84% 42% / auto 150%;   /* la imagen trae fondo #e1e1e1 */
  box-shadow: var(--shadow);
}
.nui-login-card {
  position: relative; width: min(360px, 100%); margin-bottom: 0;
  display: flex; flex-direction: column; gap: 14px;
  padding: 26px; border-radius: 20px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(16, 20, 50, .18);
}
.nui-login-card h2 { margin: 0; font-size: 20px; }
.nui-login-sub { margin: -8px 0 2px; color: var(--muted); font-size: 13.5px; }
.nui-field { display: flex; flex-direction: column; gap: 6px; }
.nui-field > span:first-child { font-size: 13px; font-weight: 600; color: var(--text-2); }
.nui-field input { width: 100%; height: 46px; padding: 0 14px; border-radius: 11px; border: 1px solid var(--line); background: #fff; font: 500 15px Inter, sans-serif; color: var(--text); transition: border-color .15s, box-shadow .15s; }
.nui-field input::placeholder { color: var(--muted); }
.nui-field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(31, 31, 224, .15); }
.nui-pwd { position: relative; display: block; }
.nui-pwd input { padding-right: 46px; }
.nui-pwd-toggle { position: absolute; right: 5px; top: 5px; width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.nui-pwd-toggle svg { width: 20px; height: 20px; }
.nui-pwd-toggle:hover, .nui-pwd-toggle[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); }
.nui-forgot { align-self: center; color: var(--brand); font-size: 14px; font-weight: 500; }
.nui-forgot:hover { text-decoration: underline; }
.nui-alerts:empty { display: none; }
.nui-alert { padding: 10px 12px; border-radius: 10px; font-size: 13.5px; border: 1px solid; }
.nui-alert-error { background: #fdeaea; border-color: #f0a9a9; color: #8f2020; }
.nui-alert-success { background: #e9f8e9; border-color: #9ed99e; color: #0b5e0b; }

/* ---------- Secciones ---------- */
.nui-section { padding: 88px 0; }
.nui-section-alt { background: var(--bg-alt); }
.nui-section-head { max-width: 680px; margin-bottom: 40px; }
.nui-section-head.nui-row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.nui-section-head h2 { margin: 0; font-size: clamp(28px, 3.2vw, 38px); line-height: 1.15; letter-spacing: -.02em; }
.nui-section-head p:not(.nui-eyebrow) { margin: 12px 0 0; font-size: 17px; color: var(--text-2); }
.nui-count { font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }

.nui-modules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.nui-module { padding: 26px 24px; border-radius: 18px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.nui-module:hover { transform: translateY(-3px); border-color: #c9c9ff; }
.nui-m-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: #fff; margin-bottom: 18px; }
.nui-m-icon svg { width: 26px; height: 26px; }
.nui-module:nth-child(3) .nui-m-icon { background: var(--accent); }
.nui-module h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.nui-module p { margin: 10px 0 0; color: var(--text-2); font-size: 14.5px; }
.nui-module ul { list-style: none; padding: 16px 0 0; margin: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.nui-module li { position: relative; padding-left: 18px; font-size: 14px; color: var(--text); }
.nui-module li::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; border-radius: 2px; background: var(--brand); }

.nui-tools { margin-top: 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.nui-tool { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 14px; background: var(--bg-alt); }
.nui-t-icon { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; background: #fff; color: var(--brand); border: 1px solid var(--line); }
.nui-t-icon svg { width: 20px; height: 20px; }
.nui-tool b { display: block; font-size: 15px; }
.nui-tool span { font-size: 13.5px; color: var(--text-2); }

.nui-roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.nui-role { padding: 28px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.nui-r-num { font: 700 40px/1 "Saira Condensed", sans-serif; color: var(--brand); opacity: .25; }
.nui-role h3 { margin: 10px 0 0; font-size: 19px; }
.nui-role p { margin: 8px 0 0; color: var(--text-2); font-size: 15px; }

/* Torneos */
.nui-cups { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.nui-cups a { display: flex; align-items: center; gap: 14px; height: 100%; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.nui-cups a:hover { transform: translateY(-2px); border-color: var(--accent); }
.nui-cup-icon { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.nui-cup-icon svg { width: 22px; height: 22px; }
.nui-cup-name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; line-height: 1.3; }
.nui-cup-go { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.nui-cup-go svg { width: 16px; height: 16px; transition: transform .15s; }
.nui-cups a:hover .nui-cup-go svg { transform: translateX(3px); }

/* Cierre */
.nui-cta-band { background: linear-gradient(135deg, var(--navy), #1d1f7a); color: #fff; padding: 56px 0; }
.nui-cta-in { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.nui-cta-band h2 { margin: 0; font: 700 34px/1.1 "Saira Condensed", sans-serif; text-transform: uppercase; }
.nui-cta-band p { margin: 6px 0 0; color: #b9bce6; }
.nui-cta-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.nui-footer { padding: 28px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.nui-footer-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.nui-footer-logo { height: 36px; opacity: .8; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nui-modules, .nui-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nui-cups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .nui-nav-links { display: none; }
  .nui-hero { padding: 32px 0 56px; }
  .nui-hero-in { grid-template-columns: 1fr; gap: 36px; }
  .nui-hero-side { min-height: 0; flex-direction: column; align-items: stretch; }
  .nui-hero-photo { position: relative; inset: auto; height: 220px; margin-bottom: -48px; background-size: auto 170%; background-position: 82% 38%; }
  .nui-login-card { width: auto; margin: 0 16px; }
  .nui-roles { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .nui-wrap { width: calc(100% - 32px); }
  .nui-nav-in { height: 64px; gap: 12px; }
  .nui-nav-logo img { height: 38px; }
  .nui-nav-cta .nui-btn { height: 36px; padding: 0 12px; font-size: 13.5px; }
  .nui-modules, .nui-tools, .nui-cups { grid-template-columns: 1fr; }
  .nui-hero-points { grid-template-columns: 1fr; }
  .nui-section { padding: 64px 0; }
  .nui-section-head.nui-row { flex-direction: column; align-items: flex-start; }
  .nui-hero-ctas .nui-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.nui-cups-empty { grid-column: 1 / -1; padding: 24px; border-radius: 16px; background: var(--bg-alt); color: var(--muted); text-align: center; }

/* Tablet (481–960 px): foto más alta y encuadrada en los deportistas (la imagen trae fondo gris a la izquierda) */
@media (min-width: 481px) and (max-width: 960px) {
  .nui-hero-photo { height: 320px; background-size: 185% auto; background-position: 96% 32%; }
}

/* Login dedicado (core/login.html): /login/ y reintentos tras un error de ingreso */
.nui-login-page { min-height: calc(100vh - 72px - 93px); display: grid; place-items: center; padding: 48px 16px;
  background: radial-gradient(700px 360px at 50% 0%, var(--brand-soft), transparent 70%), var(--bg-alt); }
.nui-login-page .nui-login-card { width: min(400px, 100%); padding: 32px; box-shadow: var(--shadow); }
.nui-login-page h1 { margin: 0; font: 700 34px/1 "Saira Condensed", sans-serif; text-transform: uppercase; color: var(--text); }
