/* ============================================================
   Liga EntrePoker — Temporada 1                       2026-10-12
   ------------------------------------------------------------
   Loaded ONLY by /es/liga/, the home page and /es/torneos.html (the promo
   strip). It sits on top of css/styles.css and reuses its tokens
   (--gold, --felt, --text ...) so the league page is the same brand, not a
   microsite.

   It is a separate file on purpose: every /css/ reference on the site carries
   ?v=<sha256[:12]> and _ci/validate-entrepoker-asset-versions.mjs fails the
   deploy on a stale one, so editing styles.css would mean re-stamping all
   ~150 Spanish pages and every English page. A new file touches only the pages
   that load it.
   ============================================================ */

/* ---------- Mobile gutters ----------
   The site default is 22px. The league page is mostly tables and a form, so on
   a phone it gets 16px, header and footer included so the edges line up. */
@media (max-width: 600px) {
  .liga-page .container { padding-left: 16px; padding-right: 16px; }
}
.liga-page { overflow-x: hidden; }
/* Anchor targets sit below the sticky 68px header. */
.liga-page [id] { scroll-margin-top: 84px; }

/* ---------- Hero ---------- */
.liga-hero { padding: 84px 0 64px; }
.liga-hero .container { max-width: 900px; }
.liga-hero h1 { margin-bottom: .25em; text-transform: none; }
.liga-hero h1 em { display: inline-block; }
.liga-prize {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(34px, 8vw, 64px);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 6px 0 18px;
  text-transform: uppercase;
}
.liga-hero .lead { margin-bottom: 14px; }
.liga-start {
  display: inline-block;
  margin: 0 0 30px;
  padding: 8px 18px;
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  background: rgba(255, 226, 10, .08);
  color: var(--gold-bright);
  font-weight: 700;
  font-size: 14.5px;
}
.liga-hero .fine { margin: 22px 0 0; font-size: 13.5px; color: var(--muted); }

/* ---------- Key facts ---------- */
.liga-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}
.liga-facts li {
  padding: 18px 16px;
  border: 1px solid var(--felt-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--felt-soft), var(--felt));
  text-align: center;
}
.liga-facts strong {
  display: block;
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.1;
  color: var(--gold-bright);
}
.liga-facts span { display: block; margin-top: 6px; font-size: 13.5px; color: var(--muted); }

/* ---------- Story ---------- */
.liga-story { max-width: 760px; }
.liga-story p { font-size: clamp(17px, 2.2vw, 20px); color: var(--text); margin: 0; }

/* ---------- Steps ---------- */
.liga-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  counter-reset: paso;
}
.liga-steps li {
  position: relative;
  counter-increment: paso;
  padding: 24px 22px 22px;
  border: 1px solid var(--felt-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--felt-soft), var(--felt));
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.liga-steps li::before {
  content: counter(paso);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 4px 14px rgba(255, 226, 10, .3);
}
.liga-steps h3 { font-size: 19px; margin: 0; text-transform: none; }
.liga-steps p { margin: 0; color: var(--muted); font-size: 15.5px; }
.liga-steps .btn { align-self: flex-start; margin-top: 10px; padding: 11px 22px; }
.liga-steps .fine { font-size: 12.5px; margin-top: 8px; }
.liga-steps p a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Two-column blocks (format / prizes) ---------- */
.liga-cols { display: grid; gap: 22px; grid-template-columns: repeat(2, 1fr); align-items: start; }
.liga-box {
  padding: 24px;
  border: 1px solid var(--felt-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--felt-soft), var(--felt));
}
.liga-box h3 { font-size: 20px; margin: 0 0 12px; text-transform: none; }
.liga-box > p:last-child { margin-bottom: 0; }
.liga-box .fine { margin-top: 12px; }
.liga-box .fine.first { margin-top: 14px; }
/* Scoring-rules grid (#puntos): boxes in a row share one height so the rows read as a set. */
.liga-cols.is-rules { align-items: stretch; }
.liga-box .tight { margin-bottom: 0; }
.liga-box .table-wrap { margin-top: 6px; }

.liga-list { list-style: none; margin: 0; padding: 0; }
.liga-list li { position: relative; padding: 0 0 12px 28px; color: var(--text); }
.liga-list li:last-child { padding-bottom: 0; }
.liga-list li::before { content: "♠"; position: absolute; left: 0; top: 0; color: var(--gold); }
.liga-list strong { color: var(--gold-bright); }

/* Tie-break order: a plain numbered list, same gold accent as the other lists. */
.liga-order { margin: 0; padding: 0 0 0 22px; }
.liga-order li { padding: 0 0 8px 4px; color: var(--text); }
.liga-order li:last-child { padding-bottom: 0; }
.liga-order li::marker { color: var(--gold-bright); font-weight: 800; }

/* Tables: styles.css gives .ep-table a 640px floor for the wide tournaments
   table. These are two-column tables that must fit a 320px phone. */
table.ep-table.liga-table { min-width: 0; }
.liga-table th, .liga-table td { padding: 11px 14px; }
.liga-table td.num, .liga-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.liga-table td.num { font-weight: 800; color: var(--gold-bright); }
.liga-table tfoot td { border-top: 1px solid var(--gold-deep); font-weight: 800; }

/* Calendar of fechas */
.liga-fechas { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.liga-fechas li { padding: 12px 14px; border: 1px solid var(--felt-line); border-radius: var(--radius-sm); background: var(--felt); }
.liga-fechas b { display: block; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-bright); }
.liga-fechas span { font-size: 15px; }
/* Fecha 8 = Gran Final (points x2) */
.liga-fechas li.is-final { border-color: var(--gold-deep); background: rgba(255, 226, 10, .08); }

/* Prize total */
.liga-total {
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  background: rgba(255, 226, 10, .07);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 18px;
}
.liga-total strong { font-size: clamp(22px, 3.4vw, 30px); color: var(--gold-bright); }
.liga-total span { color: var(--muted); font-size: 14.5px; }
.liga-bases { margin: 18px 0 0; font-weight: 700; }
/* Formula banner at the top of #puntos: same card as the prize total, but sits above its content. */
.liga-total.is-formula { margin: 0 0 22px; }

/* ---------- Requirements ---------- */
.liga-req { max-width: 760px; }

/* ---------- Signup form ---------- */
.liga-form-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--gold-deep);
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 100% -10%, rgba(255, 226, 10, .10) 0%, transparent 55%),
    linear-gradient(180deg, var(--felt-soft), var(--felt));
  box-shadow: var(--shadow);
}
.liga-form-card h2 { margin-bottom: .3em; text-transform: none; }
.liga-form-card > p { color: var(--muted); }
.liga-form .calc-field { margin-bottom: 16px; }
.liga-form .calc-field > span { font-size: 14px; }
.liga-form .calc-field > span small { color: var(--muted); font-weight: 400; }
.liga-form .calc-field input,
.liga-form .calc-field select { min-height: 48px; }
.liga-form .calc-field select { appearance: auto; }
.liga-form .hint { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); }
.liga-form .err { display: none; margin-top: 5px; font-size: 13.5px; color: #ff8a97; }
.liga-form .calc-field.has-error input,
.liga-form .calc-field.has-error select { border-color: var(--card-red); }
.liga-form .calc-field.has-error .err { display: block; }

.liga-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 4px 0 8px;
  padding: 14px;
  border: 1px solid var(--felt-line);
  border-radius: var(--radius-sm);
  background: var(--felt-deep);
  cursor: pointer;
}
.liga-consent input { flex: 0 0 auto; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--gold); }
.liga-consent span { font-size: 15px; line-height: 1.45; }
.liga-consent.has-error { border-color: var(--card-red); }
.liga-form .err-consent { display: none; margin: 0 0 12px; font-size: 13.5px; color: #ff8a97; }
.liga-form .err-consent.show { display: block; }

.liga-privacy { font-size: 13px; color: var(--muted); margin: 12px 0 18px; }
.liga-privacy a { text-decoration: underline; text-underline-offset: 2px; }
.liga-form .btn { width: 100%; text-align: center; padding: 16px 24px; font-size: 15.5px; }
.liga-form .btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.liga-msg { min-height: 1.4em; margin: 14px 0 0; font-size: 14.5px; }
.liga-msg.is-error { color: #ff8a97; }

/* Honeypot: off-screen, not display:none (some bots skip display:none fields) */
.liga-hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Success state (replaces the form) */
.liga-ok { text-align: center; }
.liga-ok[hidden], .liga-form[hidden], .liga-promo[hidden] { display: none; }
.liga-ok h2 { font-size: clamp(24px, 4vw, 32px); }
.liga-ok .check {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: var(--ink);
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 8px 24px rgba(255, 226, 10, .35);
}
.liga-ok p { color: var(--muted); }
.liga-ok .btn { margin-top: 6px; }
.liga-ok .fine { font-size: 12.5px; margin: 14px 0 1em; }

/* ---------- FAQ ---------- */
.liga-faq { max-width: 760px; }
.liga-faq h3 { font-size: 19px; margin: 1.4em 0 .35em; text-transform: none; }
.liga-faq h3:first-child { margin-top: 0; }
.liga-faq p { margin: 0; color: var(--muted); }
.liga-faq a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Legal block ---------- */
.liga-legal {
  max-width: 760px;
  padding: 20px 22px;
  border: 1px solid var(--felt-line);
  border-radius: var(--radius);
  background: var(--felt);
  font-size: 14px;
  color: var(--muted);
}
.liga-legal p { margin: 0 0 .8em; }
.liga-legal p:last-child { margin-bottom: 0; }
.liga-legal strong { color: var(--text); }
.liga-legal a { text-decoration: underline; text-underline-offset: 2px; }

.liga-page .fine { font-size: 12.5px; color: var(--muted); }
.liga-page .fine a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Promo strip (home + /es/torneos.html) ---------- */
.liga-promo {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 24px;
  align-items: center;
  margin: 0 0 30px;
  padding: 22px 26px;
  border: 1px solid var(--gold-deep);
  border-radius: 18px;
  background:
    radial-gradient(100% 160% at 92% -20%, rgba(255, 226, 10, .16) 0%, transparent 60%),
    linear-gradient(180deg, var(--felt-soft), var(--felt));
  box-shadow: var(--shadow);
}
.liga-promo .promo-kicker { grid-column: 1; margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-bright); }
.liga-promo h2 { grid-column: 1; margin: 0; font-size: clamp(22px, 3.4vw, 30px); text-transform: none; }
.liga-promo p { grid-column: 1; margin: 0; color: var(--muted); font-size: 15.5px; max-width: 62ch; }
.liga-promo .promo-cta { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.liga-promo .promo-fine { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.liga-promo .promo-fine .badge-18 { width: 26px; height: 26px; margin-right: 0; font-size: 10px; flex: 0 0 auto; }
.liga-promo .promo-fine a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .liga-hero { padding: 60px 0 48px; }
  .liga-facts { grid-template-columns: repeat(2, 1fr); }
  .liga-cols { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .liga-hero { padding: 44px 0 40px; }
  .liga-hero h1 { font-size: clamp(30px, 9vw, 40px); }
  .liga-hero .cta-row .btn { width: 100%; text-align: center; }
  .liga-start { font-size: 13.5px; padding: 8px 14px; }
  .liga-box { padding: 20px 16px; }
  .liga-form-card { padding: 22px 16px; border-radius: 16px; }
  .liga-steps li { padding: 20px 16px 18px; }
  .liga-promo { grid-template-columns: 1fr; padding: 20px 16px; }
  .liga-promo .promo-cta { grid-column: 1; grid-row: auto; justify-self: start; }
  .liga-promo .promo-cta.btn { width: 100%; text-align: center; }
}
@media (max-width: 380px) {
  .liga-facts { gap: 10px; }
  .liga-facts li { padding: 14px 10px; }
  .liga-fechas { grid-template-columns: 1fr 1fr; }
}
