/* ============================================================================
   RetoIA — plataforma de desafíos · un producto de Late.Ar
   Sistema de diseño según el Manual de Marca Late.Ar:
   3 colores (#000 / #0000FF / #fff), Big Shoulders Display en titulares,
   Inter en cuerpo, fondo negro, el azul se gana su lugar (un bloque por vista).
   ========================================================================== */

:root {
  /* Marca Late.Ar */
  --black:   #000000;
  --blue:    #0000FF;
  --white:   #FFFFFF;

  /* Superficies y neutros (solo apoyo, nunca protagonistas) */
  --card:      #111114;
  --card-alt:  #1C1C22;
  --muted:     #9AA0A6;
  --on-blue:   #E5E5FF;
  --tint:      #ECECFF;
  --line:      rgba(255,255,255,.12);
  --line-soft: rgba(255,255,255,.07);
  --glass:     rgba(255,255,255,.05);
  --glass-brd: rgba(255,255,255,.11);
  --glass-blur: blur(14px) saturate(135%);

  /* Tipografía */
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body:    Arial, Helvetica, "Helvetica Neue", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Forma */
  --radius:      16px;
  --radius-pill: 999px;
  --shadow:      0 10px 34px rgba(0,0,0,.45);
  --maxw:        1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;               /* el corazón del hero no genera scroll lateral */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* atmósfera: haz azul suave detrás de todo (profundidad, no gradiente de texto) */
body::before{
  content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(1100px 680px at 82% -8%, rgba(60,60,255,.16), transparent 62%),
    radial-gradient(820px 560px at 4% 106%, rgba(0,0,255,.10), transparent 58%);
}
img { max-width: 100%; display: block; }
a { color: var(--white); text-decoration: none; }
p { color: var(--muted); }

/* superficies del navegador tematizadas (selección, scrollbar) */
::selection { background: var(--blue); color: var(--white); }
* { scrollbar-color: var(--card-alt) var(--black); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--card-alt); border: 3px solid var(--black); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #2a2a34; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Tipografía de marca ─────────────────────────────────────────────── */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: .95;
  margin: 0;
  color: var(--white);
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 8vw, 92px); }
h2 { font-size: clamp(30px, 4.5vw, 52px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }

/* íconos de línea (Feather/Lucide): mono, stroke, azul o blanco */
.ico { color: var(--blue); line-height: 0; }
.ico svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; display: block; }
.card .ico { margin-bottom: 2px; }
.card.blue .ico { color: var(--white); }
.card.white { background: var(--white); border-color: var(--white); }
.card.white h3 { color: var(--black); }
.card.white p { color: #3a3d42; }
.card.white .k { color: #6a6d72; }
.card.white .ico { color: var(--blue); }

.lead { font-size: clamp(17px, 2vw, 21px); color: var(--muted); max-width: 62ch; }

/* ── Header / nav ────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0,0,0,.55);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 20px;
}
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; white-space: nowrap; }
.brand-lockup .logo { height: 18px; width: auto; display: block; }
.brand-lockup .product {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: 22px; letter-spacing: .02em; color: var(--white); line-height: 1;
}
.brand-lockup .by { font-size: 10px; color: var(--muted); letter-spacing: .04em; }
@media (max-width: 520px) { .brand-lockup .by { display: none; } }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; font-size: 15px; color: var(--muted);
  transition: color .15s ease;
}
.nav a:hover, .nav a.active { color: var(--white); }
.nav .btn { color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); cursor: pointer; padding: 6px; line-height: 0; }
.nav-toggle svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; display: block; }

@media (max-width: 820px) {
  .nav { display: none; }
  .nav.open {
    display: flex; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--black); border-bottom: 1px solid var(--line); padding: 16px 24px 24px;
  }
  .nav.open a { padding: 10px 0; font-size: 18px; }
  .nav-toggle { display: block; }
}

/* ── Botones ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; font-size: 15px;
  padding: 13px 22px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--white); background: transparent; color: var(--white);
  cursor: pointer; transition: transform .05s ease, background .15s ease, color .15s ease;
}
.btn:hover { background: var(--white); color: var(--black); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn.primary:hover { filter: brightness(1.12); background: var(--blue); color: var(--white); }
.btn.ghost { border-color: var(--line); color: var(--muted); }
.btn.ghost:hover { border-color: var(--white); background: transparent; color: var(--white); }
.btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ── Secciones ───────────────────────────────────────────────────────── */
section { padding: clamp(52px, 7.5vw, 88px) 0; }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; max-width: 70ch; }

/* foco visible en toda navegación por teclado */
a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(76px, 13vw, 156px) 0 clamp(60px, 9vw, 100px);
}
/* trama de corazones: fina y fundida hacia la izquierda para que el texto respire */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: url("assets/latear/pattern_dark.png");
  background-size: 300px; opacity: .22; pointer-events: none;
  -webkit-mask-image: linear-gradient(100deg, transparent 28%, #000 92%);
          mask-image: linear-gradient(100deg, transparent 28%, #000 92%);
}
/* filo azul inferior: la regla/acento de la marca */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--blue); opacity: .6; z-index: 1;
}
.hero .wrap { position: relative; z-index: 2; }
.hero .heart {
  position: absolute; right: -56px; top: 50%; transform: translateY(-50%);
  width: min(40vw, 380px); opacity: .28; z-index: 0; pointer-events: none;
}
@media (max-width: 700px) { .hero .heart { display: none; } }
.hero h1 { max-width: 15ch; }
.hero .lead { margin-top: 22px; }
.hero .cta-row { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }
/* corazón grande como marca de agua, recortado en el borde derecho */

/* ── Píldoras / chips ────────────────────────────────────────────────── */
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font-family: var(--display); font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; font-size: 13px;
  padding: 8px 15px; border-radius: var(--radius-pill);
  border: 1px solid var(--line); color: var(--white); background: var(--card-alt);
}
.pill.solid { background: var(--blue); border-color: var(--blue); color: var(--white); }

/* estados */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; font-size: 12px; padding: 6px 12px; border-radius: var(--radius-pill);
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; }
.badge.vigente { background: var(--blue); color: var(--white); }
.badge.vigente .dot { background: var(--white); box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: pulse 1.8s infinite; }
.badge.proximo { border: 1px solid var(--line); color: var(--white); }
.badge.proximo .dot { background: var(--muted); }
.badge.cerrado { border: 1px solid var(--line-soft); color: var(--muted); }
.badge.cerrado .dot { background: var(--muted); }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(255,255,255,0);} 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0);} }
@media (prefers-reduced-motion: reduce) { .badge .dot { animation: none; } }

/* ── Grillas / tarjetas ──────────────────────────────────────────────── */
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--glass); border: 1px solid var(--glass-brd);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  display: flex; flex-direction: column; gap: 12px;
}
.card.blue { background: var(--blue); border-color: var(--blue); }
.card.blue p, .card.blue .k { color: var(--on-blue); }
.card h3 { color: var(--white); }
.card .k { font-size: 14px; color: var(--muted); }

/* método (4 pasos) */
.step { display: flex; align-items: center; gap: 12px; }
.step .ico svg { width: 26px; height: 26px; }
.step .n { font-family: var(--display); font-weight: 900; font-size: 26px; color: var(--white); }

/* ── Desafíos ────────────────────────────────────────────────────────── */
.challenge {
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.challenge.is-vigente { border-color: var(--blue); }
.challenge { transition: transform .16s ease, border-color .16s ease; }
.challenge:hover { transform: translateY(-3px); border-color: var(--line); }
@media (prefers-reduced-motion: reduce) { .challenge:hover { transform: none; } }
.challenge .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.challenge .meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.challenge .foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.challenge .when { font-size: 14px; color: var(--muted); }
.challenge .partner { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.challenge .partner img { height: 22px; width: auto; opacity: .9; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Lockup socio (edición) ──────────────────────────────────────────── */
.partner-bar {
  display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap;
  padding: 22px; border: 1px solid var(--glass-brd); border-radius: var(--radius); background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}
.partner-bar .x { color: var(--muted); font-family: var(--display); font-weight: 900; font-size: 20px; }
.partner-bar img { height: 34px; width: auto; }
.partner-bar .cap { width: 100%; text-align: center; font-size: 13px; color: var(--muted); }

/* franja azul (un bloque de acento por vista) */
.band-blue { background: var(--blue); }
.band-blue h2, .band-blue h3, .band-blue .display { color: var(--white); }
.band-blue p { color: var(--on-blue); }
.band-blue .btn { border-color: var(--white); color: var(--white); }
.band-blue .btn:hover { background: var(--white); color: var(--blue); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line-soft); padding: 48px 0 40px; }
.site-footer .cols { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer .logo { height: 26px; margin-bottom: 12px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--white); }
.site-footer .fine { margin-top: 28px; font-size: 13px; color: var(--muted); }
.footlinks { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footlinks a { padding: 6px 0; }  /* tap target ≥24px (WCAG 2.5.8) */

/* ── Utilidades ──────────────────────────────────────────────────────── */
.center { text-align: center; }
.mt-s { margin-top: 12px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: 40px; }
.hide { display: none !important; }
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 0; }
.empty {
  border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 28px;
  text-align: center; background: var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
}


/* ── Voz técnica: IBM Plex Mono en datos y etiquetas (lenguaje consola, sin salir de la paleta) ── */
.brand-lockup .by, .card .k, .challenge .when, .partner-bar .cap, .site-footer .fine { font-family: var(--mono); }


/* botones de card alineados al pie (cards de igual alto en la grilla) */
.card .btn { margin-top: auto; align-self: flex-start; }
.ed-logo { height: 26px; width: auto; align-self: flex-start; margin-bottom: 4px; opacity: .95; }


/* sección a dos columnas: título a la izquierda, prosa a la derecha (usa el ancho) */
.split { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.split-body { display: flex; flex-direction: column; gap: 18px; max-width: 64ch; }
.split-body .lead { margin: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 16px; } }
/* toggle de idioma ES/EN */
.lang-toggle { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 5px 11px; cursor: pointer; }
.lang-toggle:hover { border-color: var(--white); }
.lang-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.lang-opt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.lang-opt.active { color: var(--white); }

/* lista de reglas numerada */
.rulelist { list-style: none; counter-reset: r; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; max-width: 72ch; }
.rulelist li { counter-increment: r; position: relative; padding-left: 48px; color: var(--muted); line-height: 1.6; }
.rulelist li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 13px; color: var(--white); letter-spacing: .04em; }

/* FAQ acordeón */
.faq { max-width: 72ch; border-top: 1px solid var(--line-soft); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-family: var(--display); font-weight: 700; font-size: clamp(18px, 2.2vw, 22px); color: var(--white); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); font-size: 20px; color: var(--muted); flex: none; }
.faq details[open] summary::after { content: "–"; color: var(--white); }
.faq summary:hover { color: var(--white); }
.faq details p { margin: 0; padding: 0 0 20px; color: var(--muted); max-width: 64ch; }
