/* LigaFantasy.es — base + variables */
:root {
  --brand-primary: #00e5a0;
  --brand-secondary: #7c3aff;
  --brand-accent: #ff6b35;
  --bg-dark: #07090f;
  --bg-card: #0f1218;
  --bg-surface: #161b26;
  --text-primary: #f0f4ff;
  --text-secondary: #8892aa;
  --border-subtle: #1e2535;
  --gradient-hero: linear-gradient(135deg, #07090f 0%, #0d1220 50%, #0a0e1a 100%);
  --gradient-brand: linear-gradient(135deg, #00e5a0 0%, #7c3aff 100%);
  --gradient-card: linear-gradient(145deg, #0f1218 0%, #161b26 100%);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.75rem;
  --text-hero: clamp(2.5rem, 6vw, 5rem);
  --header-h: 72px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --focus-ring: 2px solid var(--brand-primary);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg-dark);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--brand-primary);
  color: #000;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.is-hidden {
  display: none !important;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
  color: #5fffc9;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--text-hero);
}
h2 {
  font-size: clamp(1.75rem, 4vw, var(--text-4xl));
}
h3 {
  font-size: var(--text-2xl);
}

p {
  margin: 0 0 1em;
  color: var(--text-secondary);
}

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 9vw, 6.5rem) 0;
  position: relative;
}

.section--surface {
  background: var(--bg-surface);
}

.bg-grid {
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
}

/* Navbar */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-h);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(7, 9, 15, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
}

.nav-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.logo span.tld {
  font-weight: 600;
  opacity: 0.9;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(0.35rem, 2vw, 1.25rem);
}
.nav-menu a {
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.5rem 0.35rem;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--brand-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-actions__auth {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Auth duplicada solo en drawer; en escritorio oculta */
.nav-menu__auth {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu__auth-inner {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.nav-menu__auth .btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 700px) {
  .nav-actions__auth {
    display: none !important;
  }
  .nav-menu__auth {
    display: list-item;
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
  }
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-burger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-burger.active span:nth-child(2) {
  opacity: 0;
}
.nav-burger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1024px) {
  .nav-burger {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.25rem 2rem;
    gap: 1rem;
    background: rgba(7, 9, 15, 0.97);
    border-top: 1px solid var(--border-subtle);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
  }
  .nav-menu.open {
    transform: translateX(0);
  }
  .nav-menu > li:not(.nav-menu__auth) {
    flex: 0 0 auto;
  }
  .nav-menu > li > a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-sizing: border-box;
  }
  .nav-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  display: grid;
  align-items: center;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero__gradient {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  z-index: 0;
}
.hero__gradient--animated {
  background: linear-gradient(
    -45deg,
    #07090f,
    #0d1220,
    #0a1530,
    #0f1a24,
    #07090f
  );
  background-size: 400% 400%;
  animation: lfGradientShift 18s ease infinite;
}
.hero__parallax {
  position: absolute;
  inset: -10% -5% -5% -5%;
  z-index: 1;
  pointer-events: none;
  will-change: transform;
}
.hero__parallax picture {
  display: block;
  width: 100%;
  height: 100%;
}
.sport-chip picture,
.flip-face picture,
.card picture,
.t-slide picture {
  display: contents;
}
.hero__parallax img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.05) contrast(1.05);
}
#particleCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 4;
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 4rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
@media (max-width: 900px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 160, 0.35);
  background: rgba(0, 229, 160, 0.08);
  color: var(--brand-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  animation: lfFloatBadge 4s ease-in-out infinite;
}

.hero h1 {
  margin-top: 0.75rem;
  position: relative;
}
.hero h1 .glitch {
  position: relative;
  display: inline-block;
}
.hero h1 .typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 4px;
  background: var(--brand-primary);
  vertical-align: -0.05em;
  animation: lfBlink 1s step-end infinite;
}

.hero-lead {
  font-size: var(--text-lg);
  max-width: 40ch;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.25rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
@media (max-width: 768px) {
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-mini {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
}
.stat-mini strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--text-primary);
}

.hero-cards {
  display: grid;
  gap: 1rem;
}
.hero-float-card {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: rgba(15, 18, 24, 0.88);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  animation: lfFloatCard 5s ease-in-out infinite;
}
.hero-float-card:nth-child(2) {
  animation-delay: 1.2s;
}
.hero-float-card:nth-child(3) {
  animation-delay: 2.4s;
}

.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  color: var(--text-secondary);
  animation: lfBounce 2s ease-in-out infinite;
}
.scroll-indicator svg {
  width: 28px;
  height: 28px;
}

/* Sports strip */
.sports-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scroll-snap-type: x mandatory;
}
.sport-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-width: 160px;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  text-align: center;
}
.sport-chip:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 160, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.sport-chip img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.65rem;
}

/* Marquee */
.marquee-wrap {
  overflow: hidden;
  border-block: 1px solid var(--border-subtle);
  background: linear-gradient(90deg, rgba(0, 229, 160, 0.08), rgba(124, 58, 255, 0.08));
}
.marquee {
  display: flex;
  gap: 3rem;
  padding: 0.85rem 0;
  animation: lfMarquee 32s linear infinite;
  width: max-content;
}
.marquee:hover {
  animation-play-state: paused;
}

/* Footer */
.site-footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--border-subtle);
  background: #05070c;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr repeat(3, 1fr);
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}
.social-row a {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.social-row a:hover {
  transform: translateY(-3px);
  color: var(--brand-primary);
  border-color: rgba(0, 229, 160, 0.5);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

@keyframes lfGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
@keyframes lfFloatBadge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}
@keyframes lfFloatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
@keyframes lfBounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 8px);
  }
}
@keyframes lfBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
@keyframes lfMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.stack-lg {
  display: grid;
  gap: 2rem;
  grid-template-columns: 240px 1fr;
  align-items: start;
}
@media (max-width: 900px) {
  .stack-lg {
    grid-template-columns: 1fr;
  }
}

.two-col {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

.blog-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 2.2fr 1fr;
  align-items: start;
}
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }
}
