/* ============================================================
   TChess · Landing
   ============================================================ */

.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 72px 0 40px;
}
/* El texto del hero queda por encima del tablero (que puede sangrar detrás) */
.hero-copy { position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: #fff;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ink);
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.02;
  margin: 22px 0 0;
}
.hero-title .accent { color: var(--gold); }

.hero-desc {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.6;
  max-width: 30ch;
  margin: 22px 0 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-top: 36px;
}
.hero-feature {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-2);
}
.hero-feature i {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--gold);
  font-size: .9rem;
}

/* ===========================================================
   Hero · escena interactiva (capas, parallax, animaciones)
   Solo transform / opacity para mantener 60 FPS.
   =========================================================== */
.hero-stage {
  position: relative;
  min-height: 540px;
  perspective: 1200px;
}

/* --- Capa 0 · círculos decorativos --- */
.stage-rings {
  position: absolute;
  inset: -10px;
  z-index: 0;
  overflow: hidden;
  border-radius: 36px;
  pointer-events: none;
}
.stage-rings::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 52% at 60% 44%, rgba(17,17,20,.05), transparent 72%);
}
.ring {
  position: absolute;
  top: 46%;
  left: 56%;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.05);
  transform: translate(-50%, -50%);
}
.ring--lg { width: 500px; height: 500px; animation: spin 90s linear infinite; }
.ring--sm {
  width: 330px; height: 330px;
  border-color: rgba(0,0,0,.04);
  animation: spin 70s linear infinite reverse;
}

/* Puntos decorativos (estilo Linear/Stripe) */
.stage-dots {
  position: absolute;
  z-index: 0;
  width: 92px;
  height: 92px;
  background-image: radial-gradient(rgba(17,17,20,.16) 1.4px, transparent 1.5px);
  background-size: 13px 13px;
  pointer-events: none;
}
.stage-dots--tr { top: 6px; right: 6px; }
.stage-dots--bl { bottom: 4px; left: 2px; }

/* --- Capa parallax (movida por JS via --px/--py) --- */
.float-item {
  position: absolute;
  transform: translate3d(var(--px, 0), var(--py, 0), 0);
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
  will-change: transform;
}
.board-item, .piece-item { pointer-events: none; }
.bob { will-change: transform; }

/* --- Capa 1 · escena 3D (render PNG, fondo blanco → flota sin marco, estática) --- */
.board-item {
  position: absolute;
  top: 50%;
  left: auto;
  right: -36px;
  width: 142%;
  z-index: 1;
  transform: translateY(-50%);
}
.board-img {
  display: block;
  width: 100%;
  height: auto;
  /* Difuminado de los 4 bordes → la imagen se funde con el fondo blanco */
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0%, #000 11%, #000 89%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%,  #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right,  transparent 0%, #000 11%, #000 89%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%,  #000 91%, transparent 100%);
  mask-composite: intersect;
}

/* --- Capa 3 · tarjetas (blanco sólido, sombra Apple) --- */
.glass {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 18px;
  box-shadow:
    0 30px 60px -30px rgba(17,17,20,.22),
    0 2px 6px -2px rgba(17,17,20,.06);
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
}
.glass:hover {
  transform: perspective(700px) rotateX(2.5deg) rotateY(-4deg) scale(1.025);
  box-shadow:
    0 46px 80px -28px rgba(17,17,20,.3),
    0 4px 12px -3px rgba(17,17,20,.08);
}

.card-item--standings { top: 0;    right: 0;    z-index: 3; }
.card-item--round     { top: 230px; right: 30px; z-index: 5; }
.card-item--table     { bottom: 0;  left: 0;     z-index: 3; }
.bob--a { animation: bobA 8s  ease-in-out infinite; }
.bob--b { animation: bobB 10s ease-in-out infinite .6s; }
.bob--c { animation: bobC 9s  ease-in-out infinite 1.2s; }

.mock-standings {
  width: 330px;
  padding: 20px 22px;
}
.mock-standings__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.mock-standings__head h4 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--ink-2);
}
.live-pill::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.standing {
  display: grid;
  grid-template-columns: 18px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  font-size: .95rem;
}
.standing:first-of-type { border-top: none; }
.standing__rank { color: var(--muted-2); font-weight: 600; }
.standing__name { font-weight: 500; }
.standing__score { font-weight: 800; }
.standing__delta { color: var(--gold); font-size: .8rem; font-weight: 600; min-width: 30px; text-align: right; }

.mock-round {
  width: 205px;
  padding: 20px;
  text-align: center;
}
.mock-round__label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
}
.mock-round__value {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 4px 0 6px;
}
.mock-round__foot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  color: var(--gold);
  font-weight: 600;
}
.mock-round__foot::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.mock-table {
  width: 290px;
  padding: 18px 20px;
}
.mock-table h4 { margin: 0 0 12px; font-size: 1.05rem; font-weight: 700; }
.mock-table__vs {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted-2);
  text-align: center;
  margin: 2px 0;
}
.mock-table__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  font-size: .95rem;
}
.mock-table__row + .mock-table__row { border-top: 1px solid var(--line); }
.mock-table__no { color: var(--muted-2); font-weight: 700; font-size: .85rem; width: 22px; }
.chip-color {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: .72rem; font-weight: 800;
}
.chip-color.b { background: #f1f1ee; color: var(--ink); border: 1px solid var(--line-2); }
.chip-color.n { background: var(--ink); color: #fff; }
.mock-table__name { flex: 1; font-weight: 500; }
.mock-table__dots { color: var(--muted-2); letter-spacing: 3px; }

/* ---------- Trust strip ---------- */
.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  margin-top: 30px;
}
.trust-strip__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.trust-strip__label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 500;
  max-width: 160px;
}
.trust-logos {
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
  flex: 1;
}
.trust-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  filter: grayscale(1);
  opacity: .7;
}
.trust-logo i { font-size: 1.15rem; color: var(--ink-2); }
.trust-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
  margin-left: auto;
}
.trust-more:hover { color: var(--gold); }

/* ---------- Secciones ---------- */
.section { padding: 78px 0; }
.section-head { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0 0 12px;
}
.section-subtitle { color: var(--muted); font-size: 1.05rem; line-height: 1.55; margin: 0; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.info-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.info-card:hover {
  border-color: var(--line-2);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.info-card__icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--gold-bg);
  color: var(--gold);
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.info-card__title { font-size: 1.12rem; font-weight: 700; margin: 0 0 8px; }
.info-card__text { color: var(--muted); line-height: 1.55; margin: 0; font-size: .96rem; }

/* ---------- Torneos ---------- */
.torneos-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.torneos-head .section-head { margin: 0; text-align: left; }
.section-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}

.tournament-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.tournament-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.tournament-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.tournament-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.status-pill {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 5px 11px;
  border-radius: 999px;
}
.status-open { background: #eaf6ee; color: #1f7a44; }
.status-live { background: var(--gold-bg); color: var(--gold); }
.status-end  { background: #f1f1ee; color: var(--muted); }
.tournament-id { font-size: .78rem; font-weight: 700; color: var(--muted-2); }
.tournament-title { font-size: 1.18rem; font-weight: 700; margin: 0 0 14px; letter-spacing: -.01em; }
.tournament-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 18px;
}
.tournament-meta i { color: var(--muted-2); width: 16px; }
.capacity-block { margin-bottom: 18px; }
.capacity-block .cap-row {
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  margin-bottom: 7px;
  color: var(--ink-2);
}
.capacity-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.capacity-fill { height: 100%; border-radius: 999px; background: var(--ink); }
.tournament-copy { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0 0 18px; flex: 1; }

/* ---------- Empty ---------- */
.empty-state {
  text-align: center;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: 60px 24px;
  background: var(--bg-soft);
}
.empty-icon { font-size: 2.4rem; color: var(--muted-2); margin-bottom: 14px; }
.empty-title { font-size: 1.3rem; font-weight: 700; margin: 0 0 8px; }
.empty-text { color: var(--muted); max-width: 420px; margin: 0 auto; }

/* ---------- Steps ---------- */
.step-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  height: 100%;
}
.step-badge {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: 16px;
}
.step-title { font-size: 1.08rem; font-weight: 700; margin: 0 0 8px; }
.step-text { color: var(--muted); line-height: 1.5; margin: 0; font-size: .94rem; }

/* ---------- CTA ---------- */
.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 28px;
  margin: 0 28px;
  padding: 64px 24px;
  text-align: center;
}
.cta-band .shell { padding: 0; }
.cta-title {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -.025em;
  max-width: 740px;
  margin: 0 auto;
  line-height: 1.18;
}
.cta-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f1f1ee; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { border-color: #fff; }

/* ---------- Footer ---------- */
.footer-dark {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  margin-top: 78px;
}
.footer-dark .shell { padding-top: 56px; padding-bottom: 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}
.footer-brand { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.footer-text { color: var(--muted); line-height: 1.55; max-width: 36ch; margin: 0; }
.footer-head { font-size: .8rem; font-weight: 700; letter-spacing: .1em; color: var(--muted-2); margin-bottom: 14px; text-transform: uppercase; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-links li { color: var(--ink-2); font-size: .94rem; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 22px;
  color: var(--muted-2);
  font-size: .85rem;
}

/* ---------- Animaciones (transform/opacity → 60 FPS) ---------- */
@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes bobA {
  0%, 100% { transform: translateY(0)     rotate(0)       scale(1); }
  50%      { transform: translateY(-12px) rotate(-1.2deg) scale(1.012); }
}
@keyframes bobB {
  0%, 100% { transform: translateY(0)     rotate(0)      scale(1); }
  50%      { transform: translateY(-16px) rotate(1.4deg) scale(1.015); }
}
@keyframes bobC {
  0%, 100% { transform: translateY(0)     rotate(0)     scale(1); }
  50%      { transform: translateY(-10px) rotate(-1deg) scale(1.01); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 50px 0 30px; }
  .hero-desc { max-width: none; }
  .hero-stage { min-height: 520px; max-width: 420px; margin: 0 auto; width: 100%; }
  .grid-3, .tournament-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  .hero-stage { transform: scale(.82); transform-origin: top center; }
  .card-item--standings { right: -6px; }
  .cta-band { margin: 0 16px; }
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .ring,
  .bob,
  .bob--a, .bob--b, .bob--c,
  .bob--knight, .bob--king, .bob--pawn {
    animation: none !important;
  }
  .float-item { transition: none; }
  .glass:hover { transform: scale(1.01); }
}
