/* ============================================================
   New Catanium — Landing pública (home_public)
   Estilos específicos del tope (hero + stats + torneos abiertos + CTA).
   El bottom (ranking+fixture+modals) sigue usando home_public.css legacy
   hasta el Bloque 2.
   ============================================================ */

/* Reset suave para la nueva landing (no afecta otras páginas porque body
   solo se reseteará si tiene la clase nc-landing). */
body.nc-landing {
  background: var(--nc-page);
  color: var(--nc-text);
  font-family: var(--nl-font-sans);
}

/* ============== HERO ============== */
.nc-hero {
  position: relative;
  background: var(--nc-hero-grad);
  color: var(--nc-band-text);
  overflow: hidden;
}
.nc-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(91, 156, 246, 0.18), transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(248, 172, 89, 0.14), transparent 50%);
  pointer-events: none;
}
.nc-hero-pattern {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: 0.4;
  pointer-events: none;
}
.nc-hexnet {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

.nc-hero-content {
  position: relative;
  z-index: 1;
  /* Padding lateral generoso: deja un cinturón libre en los bordes
     donde viven las figuritas flotantes pegadas a los extremos. */
  padding: 70px clamp(40px, 7vw, 140px) 90px;
}
@media (max-width: 720px) {
  .nc-hero-content { padding: 50px 16px 60px; }
}

/* Hero grid: imagen a la derecha (layout 'image-right' del demo) */
.r-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 960px) {
  .r-hero { grid-template-columns: 1fr; gap: 32px; }
}

/* Hero copy (lado izquierdo) */
.nc-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(248, 172, 89, 0.18);
  border: 1px solid rgba(248, 172, 89, 0.35);
  color: #fde0b8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.nc-hero-eyebrow-dot {
  width: 6px; height: 6px;
  background: #f8ac59;
  border-radius: 50%;
}
.nc-hero-title {
  font-family: var(--nl-font-poppins);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
  font-size: clamp(36px, 5.2vw, 64px);
  margin: 0;
  max-width: 14ch;
  text-wrap: balance;
}
.nc-hero-title-accent { color: var(--nc-accent); }
.nc-hero-lede {
  margin-top: 22px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 460px;
  line-height: 1.55;
}
.nc-hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Hero featured (card derecha — torneo destacado) */
.nc-hero-featured {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  padding: 8px;
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform var(--nl-ease-md);
}
.nc-hero-featured:hover { transform: translateY(-2px); }
.nc-hero-featured-img {
  --game-color: #23238b;
  --game-accent: #1d4ed8;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--game-color), var(--game-accent));
}
.nc-hero-featured-img-overlay {
  position: absolute; inset: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='48' viewBox='0 0 84 48'><g fill='none' stroke='white' stroke-opacity='0.55' stroke-width='1'><polygon points='28,0 56,0 70,24 56,48 28,48 14,24'/><polygon points='84,24 70,0 84,0'/><polygon points='84,24 70,48 84,48'/><polygon points='0,0 14,24 0,24'/><polygon points='0,24 14,24 0,48'/></g></svg>");
  background-size: 84px 48px;
  background-repeat: repeat;
  pointer-events: none;
}
.nc-hero-featured-top {
  position: absolute; top: 14px; left: 14px;
  z-index: 1;
}
.nc-hero-featured-bottom {
  position: absolute; bottom: 14px; left: 14px; right: 14px;
  color: #fff;
  z-index: 1;
}
.nc-hero-featured-game {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.nc-hero-featured-title {
  font-family: var(--nl-font-poppins);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  margin-top: 6px;
}
.nc-hero-featured-meta {
  padding: 14px 12px 8px;
  display: flex;
  gap: 14px;
  color: #fff;
  font-size: 12px;
  flex-wrap: wrap;
}
.nc-hero-featured-meta .meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nc-hero-featured-meta .meta-link {
  margin-left: auto;
  color: var(--nc-accent);
}

/* ============== STATS ============== */
.nc-stats-section {
  padding: 64px 0;
  background: var(--nc-card);
}
.r-stats4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.r-stats4 .nc-stats-intro {
  grid-column: 1 / -1;
  max-width: 720px;
  margin-bottom: 8px;
}
@media (max-width: 980px) {
  .r-stats4 { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 520px) {
  .r-stats4 { grid-template-columns: 1fr; }
}
.nc-stat {
  text-align: left;
}
.nc-stat-num {
  font-family: var(--nl-font-poppins);
  font-weight: 800;
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--nc-text-strong);
}
.nc-stat-num .unit {
  font-size: 0.45em;
  color: var(--nc-accent-dark);
  margin-left: 4px;
  vertical-align: super;
}
.nc-stat-label {
  font-family: var(--nl-font-sans);
  font-weight: 700;
  font-size: 13px;
  color: var(--nc-text-strong);
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nc-stat-sublabel {
  font-size: 12px;
  color: var(--nc-text-muted);
  margin-top: 4px;
}

/* ============== EVENT CARDS ============== */
.nc-events-section {
  padding: 56px 0;
}
.nc-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}
.nc-section-title {
  font-family: var(--nl-font-poppins);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(24px, 3vw, 36px);
  color: var(--nc-text-strong);
  line-height: 1.1;
  margin-top: 8px;
}
.nc-section-sub {
  color: var(--nc-text-muted);
  font-size: 14px;
  margin-top: 8px;
  max-width: 640px;
}
.nc-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.nc-event-card {
  display: flex;
  flex-direction: column;
  background: var(--nc-card);
  border-radius: 16px;
  border: 1px solid var(--nc-border);
  box-shadow: var(--nc-shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: var(--nl-ease-md);
}
.nc-event-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--nc-shadow-lg);
}
.nc-event-img {
  --game-color: var(--nc-brand);
  --game-accent: var(--nc-brand-ink);
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--game-color) 0%, var(--game-accent) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Patrón hex grande sobre el gradiente (SVG dataURI tileable 84x48) */
.nc-event-img-pattern {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='48' viewBox='0 0 84 48'><g fill='none' stroke='white' stroke-opacity='0.55' stroke-width='1'><polygon points='28,0 56,0 70,24 56,48 28,48 14,24'/><polygon points='84,24 70,0 84,0'/><polygon points='84,24 70,48 84,48'/><polygon points='0,0 14,24 0,24'/><polygon points='0,24 14,24 0,48'/></g></svg>");
  background-size: 84px 48px;
  background-repeat: repeat;
  opacity: 0.55;
  pointer-events: none;
}
/* Chip de tipo de juego en la esquina superior izquierda */
.nc-event-img-eyebrow {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  font-family: var(--nl-font-sans);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: none;
}
.nc-event-img-title {
  position: relative;
  color: #fff;
  font-family: var(--nl-font-poppins);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  text-align: center;
  padding: 0 20px;
  line-height: 1.15;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.nc-event-img-logo {
  position: absolute; top: 12px; right: 12px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  padding: 6px;
  object-fit: contain;
  z-index: 2;
}
.nc-event-meta {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nc-event-title {
  font-family: var(--nl-font-poppins);
  font-weight: 700;
  font-size: 16px;
  color: var(--nc-text-strong);
  line-height: 1.25;
}
.nc-event-desc {
  font-family: var(--nl-font-sans);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--nc-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}
.nc-event-more {
  align-self: flex-start;
  background: transparent;
  border: none;
  padding: 0;
  margin: 2px 0 0;
  color: var(--nc-brand-ink);
  font-family: var(--nl-font-sans);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: color var(--nl-ease);
}
.nc-event-more:hover { color: var(--nc-brand); text-decoration: underline; }
.nc-event-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--nc-text-muted);
}
.nc-event-row svg {
  flex-shrink: 0;
  width: 13px; height: 13px;
}
.nc-event-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--nc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.nc-event-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nc-brand-ink);
  font-weight: 700;
}

/* ============== CTA TIENDA ============== */
.nc-cta-section {
  padding: 40px 0;
}
.r-cta {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, var(--nc-brand), var(--nc-brand-ink));
  color: #fff;
  border-radius: 16px;
  padding: clamp(28px, 4vw, 48px);
  border: none;
}
@media (max-width: 760px) {
  .r-cta { grid-template-columns: 1fr; text-align: center; }
  .r-cta .nc-cta-side { text-align: center; }
}
.nc-cta-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nc-accent);
}
.nc-cta-title {
  font-family: var(--nl-font-poppins);
  font-weight: 800;
  color: #fff;
  font-size: clamp(22px, 3.2vw, 32px);
  margin-top: 10px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.nc-cta-body {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  max-width: 560px;
  line-height: 1.55;
}
.nc-cta-side {
  text-align: right;
}

/* ============== INVITACIÓN FALLBACK (cuando no hay torneos abiertos) ============== */
.nc-invite-section {
  padding: 60px 0;
}
.nc-invite-box {
  background: var(--nc-card);
  border: 1px solid var(--nc-border);
  border-radius: 18px;
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--nc-shadow);
  max-width: 720px;
  margin: 0 auto;
}
.nc-invite-rune {
  font-size: 48px;
  color: var(--nc-brand);
  line-height: 1;
  margin-bottom: 16px;
}
.nc-invite-title {
  font-family: var(--nl-font-poppins);
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--nc-text-strong);
  letter-spacing: -0.02em;
}
.nc-invite-body {
  margin-top: 12px;
  color: var(--nc-text-muted);
  font-size: 15px;
  line-height: 1.55;
}
.nc-invite-actions {
  margin-top: 24px;
}

/* ============== HERO ORNAMENTS (figuritas Catan flotantes) ============== */
.nc-orn {
  /* Full-bleed: las figuritas viven en los bordes EXTREMOS del hero.
     El contenido (nc-hero-content) tiene padding generoso así no chocan. */
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.nc-orn-fig {
  position: absolute;
  width: var(--s);
  height: auto;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, 0.45));
  opacity: 0.97;
  user-select: none;
  transform-origin: 50% 85%;
}
@keyframes ncbob {
  0%   { transform: translateY(0) rotate(-1.5deg); }
  100% { transform: translateY(-22px) rotate(1.5deg); }
}
@keyframes ncsway {
  0%   { transform: translate(-10px, -4px) rotate(-3deg); }
  50%  { transform: translate(8px, -14px) rotate(2deg); }
  100% { transform: translate(-6px, -2px) rotate(-2deg); }
}
@keyframes ncrock {
  0%   { transform: translateY(0) rotate(-7deg); }
  50%  { transform: translateY(-12px) rotate(1deg); }
  100% { transform: translateY(-4px) rotate(7deg); }
}
@keyframes ncrockflip {
  0%   { transform: translateY(0) rotate(-7deg) scaleX(-1); }
  50%  { transform: translateY(-12px) rotate(1deg) scaleX(-1); }
  100% { transform: translateY(-4px) rotate(7deg) scaleX(-1); }
}
@keyframes ncbreathe {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-9px) scale(1.015); }
}
@keyframes ncdrift {
  0%   { transform: translate(0, 0) rotate(-2deg); }
  25%  { transform: translate(9px, -10px) rotate(1deg); }
  50%  { transform: translate(2px, -22px) rotate(3deg); }
  75%  { transform: translate(-8px, -10px) rotate(0deg); }
  100% { transform: translate(0, 0) rotate(-2deg); }
}
.nc-orn .o1 { top: 9%;    right: 3%;   transform-origin: 50% 90%; animation: ncbob 4.8s ease-in-out infinite alternate; }
.nc-orn .o2 { top: 55%;   right: 1.5%; animation: ncsway 7s ease-in-out infinite; }
.nc-orn .o3 { bottom: -2%; left: 0%; transform-origin: 50% 80%; animation: ncrockflip 5.5s ease-in-out infinite alternate; animation-delay: -1.2s; }
.nc-orn .o4 { top: 6%;    left: 0%;    animation: ncbreathe 6.5s ease-in-out infinite alternate; }
.nc-orn .o5 { bottom: 1%; right: 2%;   transform-origin: 50% 80%; animation: ncrock 4.4s ease-in-out infinite alternate; animation-delay: -2.6s; }
.nc-orn .o6 { top: 32%;   left: 38%;   animation: ncdrift 9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .nc-orn-fig { animation: none; } }
@media (max-width: 1200px) { .nc-orn .o6 { display: none; } }
@media (max-width: 1000px) { .nc-orn .o2, .nc-orn .o5 { display: none; } }
/* En mobile dejamos SOLO el barquito rojo (.o5) arriba a la derecha */
@media (max-width: 760px) {
  .nc-orn .o1,
  .nc-orn .o2,
  .nc-orn .o3,
  .nc-orn .o4,
  .nc-orn .o6 { display: none; }
  .nc-orn .o5 {
    display: block;
    top: 40px;
    right: 6px;
    bottom: auto;
    left: auto;
    --s: 72px;
    animation: ncrock 4.4s ease-in-out infinite alternate;
  }
}

/* ============== NAV pública (solo landing) ============== */
.nc-pub-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nc-card);
  border-bottom: 1px solid var(--nc-border);
  backdrop-filter: saturate(180%) blur(8px);
}
.nc-pub-nav-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
  padding: 0 24px;
}
.nc-pub-nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Pista visual: la landing apaga el body legacy bg con !important para evitar canvas oscuro detrás */
body.nc-landing #bg-canvas { display: none !important; }
body.nc-landing #app-bg-canvas { display: none !important; }

/* Forzar fondo claro en wrappers legacy de la landing (para que las secciones
   sin background propio no hereden el dark heredado de pub-body / pub-scroll-wrap) */
body.nc-landing,
body.nc-landing .pub-scroll-wrap {
  background: var(--nc-page);
}
