/* ==========================================================================
   TuLigaLive — Landing page styles
   Paleta y tipografía tomadas de flutter/lib/core/theme/app_colors.dart
   para mantener consistencia visual con la app.
   ========================================================================== */

@font-face {
  font-family: "Sora";
  src: url("../assets/fonts/Sora-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("../assets/fonts/Sora-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("../assets/fonts/Sora-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca */
  --accent: #fdca40;
  --accent-dark: #e0ac1a;
  --azure: #0496ff;
  --blue: #2662f0;

  /* Fondos (dark-first, igual que el tema oscuro de la app) */
  --bg: #0c0c0c;
  --bg-alt: #111312;
  --surface: #17191b;
  --surface-2: #1e2123;
  --border: #24292b;

  /* Texto */
  --text: #ffffff;
  --text-muted: #8ea2ab;
  --text-dim: #5f6b70;
  --on-accent: #1b1f22;

  /* Deportes */
  --sport-football: #7ed321;
  --sport-volleyball: #34d1bf;

  /* Estados */
  --green: #13783e;
  --red: #ed0423;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --container: 1180px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Sora", "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

section {
  padding: 96px 0;
}

@media (max-width: 720px) {
  section {
    padding: 64px 0;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

h1,
h2,
h3,
h4 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
  max-width: 640px;
}

h3 {
  font-size: 20px;
}

p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 16px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.section-head p {
  max-width: 480px;
  margin: 0;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 12px 30px -10px rgba(253, 202, 64, 0.55);
}
.btn-primary:hover {
  background: var(--accent-dark);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--border);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 10px 18px;
  font-size: 13px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 12, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.brand img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
}
.lang-switch a {
  padding: 4px 8px;
  border-radius: 6px;
}
.lang-switch a.is-active {
  color: var(--on-accent);
  background: var(--accent);
}
.lang-switch a:not(.is-active):hover {
  color: var(--text);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

@media (max-width: 900px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
    gap: 22px;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
  }
  .nav-links.is-open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 18px;
    color: var(--text);
  }
  .nav-actions .btn-outline {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -160px;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(253, 202, 64, 0.28), transparent 65%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -260px;
  left: -180px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(4, 150, 255, 0.18), transparent 65%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  position: relative;
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
}
.hero-lead {
  font-size: 18px;
  max-width: 520px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 32px 0 28px;
}
.hero-note {
  font-size: 13px;
  color: var(--text-dim);
}
.hero-sports {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.tag-dot.football {
  background: var(--sport-football);
}
.tag-dot.volleyball {
  background: var(--sport-volleyball);
}

/* Mockup de "app en vivo" en el hero — ilustrativo, no datos reales */
.hero-visual {
  position: relative;
}
.phone-mock {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
  max-width: 380px;
  margin: 0 auto;
}
.phone-mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.phone-mock-header strong {
  font-size: 14px;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(237, 4, 35, 0.15);
  color: #ff5468;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff5468;
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
.match-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 12px;
}
.match-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
}
.match-card-row + .match-card-row {
  margin-top: 10px;
}
.match-team {
  display: flex;
  align-items: center;
  gap: 10px;
}
.team-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-dim);
}
.match-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
}
.notif-toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 16px;
}
.notif-toast .ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-toast strong {
  font-size: 13px;
  display: block;
}
.notif-toast span {
  font-size: 12px;
  color: var(--text-dim);
}

/* ---------- Logos / prueba social ---------- */
.trust-strip {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-strip .container {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.trust-strip p {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
}
.trust-logos {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.trust-logos span {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Grids genéricos ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(253, 202, 64, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg {
  width: 24px;
  height: 24px;
}
.card p:last-child {
  margin-bottom: 0;
}

/* ---------- Ventajas (alterno con imagen) ---------- */
.advantage-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
}
.advantage-row:not(:last-child) {
  margin-bottom: 64px;
}
.advantage-row.reverse {
  grid-template-columns: 1.1fr 0.9fr;
}
.advantage-row.reverse .advantage-panel {
  order: 2;
}
@media (max-width: 900px) {
  .advantage-row,
  .advantage-row.reverse {
    grid-template-columns: 1fr;
  }
  .advantage-row.reverse .advantage-panel {
    order: 0;
  }
}
.advantage-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.advantage-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 15px;
}
.advantage-list svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.advantage-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
}
.stat strong {
  font-size: 26px;
  display: block;
  color: var(--accent);
}
.stat span {
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- Logos de torneos/clientes ---------- */
.logo-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.logo-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.org-fullname {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 14px;
}

/* ---------- Torneos ---------- */
.tournament-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tournament-banner {
  height: 140px;
  padding: 18px;
  border-bottom: 4px solid var(--border);
}
.tournament-banner .logo-chip {
  width: 100%;
  height: 100%;
  padding: 14px;
}
.tournament-banner.football {
  border-bottom-color: var(--sport-football);
}
.tournament-banner.volleyball {
  border-bottom-color: var(--sport-volleyball);
}
.tournament-body {
  padding: 22px 24px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tournament-body h3 {
  margin-bottom: 4px;
}
.tournament-body .tag {
  align-self: flex-start;
  margin-bottom: 12px;
}
.tournament-body p {
  flex: 1;
}

/* ---------- Casos de éxito ---------- */
.case-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
}
.case-card .logo-chip {
  width: 64px;
  height: 64px;
  padding: 10px;
  margin-bottom: 16px;
}
.case-card h3 {
  margin-bottom: 6px;
}
.case-card .case-tag {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
  display: block;
}

/* ---------- CTA torneo propio ---------- */
.cta-block {
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: start;
  position: relative;
  overflow: hidden;
}
.cta-block::after {
  content: "";
  position: absolute;
  top: -120px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(253, 202, 64, 0.22), transparent 70%);
}
@media (max-width: 900px) {
  .cta-block {
    grid-template-columns: 1fr;
    padding: 36px 24px;
    text-align: left;
  }
}
.cta-block h2 {
  max-width: none;
}
.cta-side {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.cta-side ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}
.cta-side ul.feature-grid-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}
.cta-side li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  align-items: flex-start;
}
.feature-grid-list li {
  font-size: 13px;
}
@media (max-width: 480px) {
  .cta-side ul.feature-grid-list {
    grid-template-columns: 1fr;
  }
}
.cta-side svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Contacto ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}
.contact-item:first-of-type {
  border-top: none;
}
.contact-item .ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}
.contact-item span,
.contact-item a {
  font-size: 14px;
  color: var(--text-muted);
}
.contact-item a:hover {
  color: var(--accent);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .footer-top {
    grid-template-columns: 1fr;
  }
}
.footer-brand .brand {
  margin-bottom: 14px;
}
.footer-brand p {
  max-width: 320px;
  font-size: 14px;
}
.footer-col h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 14px;
  color: var(--text-muted);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px -8px rgba(37, 211, 102, 0.6);
  transition: transform 0.2s ease;
}
.wa-float:hover {
  transform: scale(1.08);
}
.wa-float svg {
  width: 28px;
  height: 28px;
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .live-dot {
    animation: none;
  }
}
