/* ============================================================
   TChess · UI Kit
   Tokens, tipografía, navbar y botones compartidos
   (landing + login)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg:        #ffffff;
  --bg-soft:   #f6f6f3;
  --ink:       #0e0e0f;
  --ink-2:     #2a2a2e;
  --muted:     #6c6c74;
  --muted-2:   #9a9aa2;
  --line:      #ececea;
  --line-2:    #e2e2df;
  --gold:      #b0875a;
  --gold-soft: #c7a47a;
  --gold-bg:   #f4ede2;
  --radius:    18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 17, 20, .05);
  --shadow:    0 18px 50px -22px rgba(17, 17, 20, .28);
  --shadow-lg: 0 40px 90px -30px rgba(17, 17, 20, .35);
  --maxw:      1180px;
}

* { box-sizing: border-box; }

/* Etiqueta accesible sin presencia visual (mismo patrón que .visually-hidden
   de Bootstrap) — para inputs cuyo propósito ya es obvio visualmente (un
   ícono de lupa, un placeholder) pero necesitan nombre accesible real. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ---------- Navbar ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: flex; align-items: center; gap: 10px; color: #111; text-decoration: none; }
.brand__logo { flex: none; color: #111; display: block; }
.brand__img { height: 34px; width: auto; display: block; }
.brand__name { font-size: 1.28rem; font-weight: 800; letter-spacing: -.03em; color: #111; }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: 14px;
}
.site-nav__links a {
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color .15s ease;
}
.site-nav__links a:hover { color: var(--gold); }

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
}
.lang-switch__caret { font-size: .6rem; color: var(--muted-2); }

.lang-switcher {
  position: relative;
}
.lang-switcher__current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  font-size: .94rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.lang-switcher__current::-webkit-details-marker { display: none; }
.lang-switcher__current i.fa-globe { font-size: .95rem; color: var(--ink); }
.lang-switcher__caret {
  font-size: .65rem;
  color: var(--muted-2);
  transition: transform .15s ease;
}
.lang-switcher[open] .lang-switcher__caret { transform: rotate(180deg); }

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  z-index: 60;
}
.lang-switcher__menu a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background .15s ease, color .15s ease;
}
.lang-switcher__menu a:hover { background: var(--bg-2, #f5f5f4); color: var(--ink); }
.lang-switcher__menu a.active { color: var(--ink); font-weight: 700; }

.site-nav__burger {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: 10px;
  width: 42px;
  height: 42px;
  font-size: 1.05rem;
  cursor: pointer;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: inherit;
  font-size: .94rem;
  font-weight: 600;
  line-height: 1;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.7,.2,1), background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px) scale(1.02); }
.btn:active { transform: translateY(0) scale(.99); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: background .15s ease, border-color .15s ease; }
  .btn:hover, .btn:active { transform: none; }
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}
.btn--dark:hover { background: #000; box-shadow: var(--shadow-sm); }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--ink); }

.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--block { width: 100%; }

@media (max-width: 920px) {
  .site-nav__links,
  .site-nav__actions { display: none; }
  .site-nav__burger { display: inline-flex; }
}
