:root {
  --bg: #FFFFFF;
  --surface: #F5F7FA;
  --surface-strong: #EEF1F5;
  --accent: #00B37E;
  --accent-soft: #E4F7EF;
  --accent-2: #4F6EF7;
  --accent-2-soft: #EBEFFE;
  --accent-3: #E5484D;
  --accent-3-soft: #FCEAEB;
  --text: #12141C;
  --text-muted: #5B5F6B;
  --border: #E4E7EC;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;

  /* Dark tokens reserved for the phone mockup, matching the real app UI */
  --app-bg: #0D0D0F;
  --app-surface: #1A1A1F;
  --app-accent: #00E5A0;
  --app-accent-2: #4F6EF7;
  --app-text: #FFFFFF;
  --app-text-muted: #8A8A9A;
  --app-border: #2A2A35;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 { font-weight: 800; margin: 0 0 16px; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); line-height: 1.2; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }
p { color: var(--text-muted); margin: 0 0 16px; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.accent { color: var(--accent); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.eyebrow.center { display: block; text-align: center; }
h2.center, .center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #FFFFFF; box-shadow: 0 8px 20px -8px rgba(0,179,126,0.55); }
.btn-primary:hover { background: #009A6C; }
.btn-ghost { background: #FFFFFF; color: var(--text); border-color: #FFFFFF; box-shadow: 0 4px 14px -6px rgba(18,20,28,0.25); }
.btn-ghost:hover { color: var(--accent); }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-lg { padding: 18px 32px; font-size: 1rem; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }
.logo-img {
  height: 28px;
  width: auto;
  display: block;
}
.logo-img--home {
  height: 38px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a:not(.btn) { color: var(--text-muted); font-weight: 500; font-size: 0.95rem; transition: color .15s ease; }
.nav-links a:not(.btn):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; }

/* Hero — real pitch photo, washed with a translucent white overlay so text stays legible */
.hero {
  position: relative;
  padding: 96px 0 104px;
  overflow: hidden;
  background-image:
    linear-gradient(100deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.65) 32%, rgba(255,255,255,0.22) 55%, rgba(255,255,255,0.05) 100%),
    url('images/hero-fondo.jpg');
  background-size: cover;
  background-position: center;
}
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-glow::before {
  content: "";
  position: absolute;
  top: -180px; right: -160px;
  width: 560px; height: 560px;
  border-radius: 50%;
  border: 1px solid rgba(18,20,28,0.08);
}
.hero-glow::after {
  content: "";
  position: absolute;
  top: -180px; right: 120px;
  width: 1px; height: 560px;
  background: rgba(18,20,28,0.08);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.lead { font-size: 1.1rem; max-width: 46ch; color: var(--text); font-weight: 500; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-note { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 0.9rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

/* Phone mockup — fixed frame, cycling through raw screenshots with a fade */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 300px;
  background: #000;
  border-radius: 40px;
  padding: 14px;
  box-shadow: 0 40px 70px -30px rgba(18,20,28,0.35), 0 0 0 1px var(--border);
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 26px; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 24px;
  background: #000;
  border-radius: 20px;
  z-index: 3;
}
.phone-screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 28px;
  overflow: hidden;
  background: var(--app-bg);
}
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: hero-slide-fade 25s infinite;
}
.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }
.hero-slide:nth-child(4) { animation-delay: 15s; }
.hero-slide:nth-child(5) { animation-delay: 20s; }

/* Each slide's 1.5s fade-out overlaps the next slide's 1.5s fade-in — a true
   crossfade with no shared instant where both are transparent (no flash to black). */
@keyframes hero-slide-fade {
  0% { opacity: 0; }
  6% { opacity: 1; }
  20% { opacity: 1; }
  26% { opacity: 0; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; opacity: 0; }
  .hero-slide:first-child { opacity: 1; }
}

/* Identity / white-label section */
.identity { padding: 24px 0 88px; }
.identity-inner {
  display: flex;
  flex-direction: column;
  gap: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
}
.identity-copy { max-width: 620px; margin: 0 auto; text-align: center; }
.identity-copy p { margin: 0 auto; max-width: 58ch; }
.identity-copy strong { color: var(--text); }

/* Interactive crest-upload demo — a single flattened mockup image, with the
   uploaded crest composited into it on a <canvas>. Client-side only: nothing
   is ever sent to a server. */
.icon-demo { display: flex; flex-direction: column; align-items: center; }
.mockup-canvas {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -30px rgba(18,20,28,0.35);
}
.demo-controls { margin-top: 28px; }
.sr-only-input {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.demo-hint { max-width: 40ch; text-align: center; color: var(--text-muted); font-size: 0.75rem; margin: 12px 0 0; }

/* Problem */
.problem { padding: 88px 0; border-top: 1px solid var(--border); }
.problem h2 { max-width: 26ch; margin: 0 auto 48px; text-align: center; }
.problem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.problem-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.problem-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.problem-icon svg { width: 22px; height: 22px; }
.problem-card p { margin: 0; font-size: 0.92rem; }

/* Wide banner */
.banner { width: 100%; aspect-ratio: 3.2 / 1; overflow: hidden; background: var(--surface); }
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* Gallery */
.gallery { padding: 0 0 88px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item {
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Shared section intro sub-line */
.section-sub { text-align: center; max-width: 58ch; margin: 0 auto 48px; }

/* Features */
.features { padding: 96px 0; }
.features h2 { max-width: 34ch; margin: 0 auto 56px; }

/* Audience: Jugadores / Familias / Club — soft tinted wash per card (same
   language as the gold "compromiso" box / green sponsor box elsewhere on
   the page), solid-color icon chip, deepened heading color. Colorful but
   not a full saturated block. */
.audience { padding: 96px 0; border-top: 1px solid var(--border); }
.audience h2 { max-width: 40ch; margin: 0 auto 16px; }
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.audience-card {
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: 0 1px 2px rgba(18,20,28,0.03);
}
.audience-card.players { background: var(--accent-2-soft); border: 1.5px solid #C3D0FC; }
.audience-card.families { background: var(--accent-3-soft); border: 1.5px solid #F7C4C6; }
.audience-card.club { background: var(--accent-soft); border: 1.5px solid #A9E9D1; }
.audience-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: #FFFFFF;
}
.audience-card.players .audience-icon { background: var(--accent-2); }
.audience-card.families .audience-icon { background: var(--accent-3); }
.audience-card.club .audience-icon { background: var(--accent); }
.audience-icon svg { width: 22px; height: 22px; }
.audience-eyebrow { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.audience-card.players .audience-eyebrow { color: var(--accent-2); }
.audience-card.families .audience-eyebrow { color: var(--accent-3); }
.audience-card.club .audience-eyebrow { color: var(--accent); }
.audience-card.players h3 { color: #2A3B8F; }
.audience-card.families h3 { color: #8B2023; }
.audience-card.club h3 { color: #04563C; }
.audience-card h3 { font-size: 1.35rem; margin-bottom: 0; }
.audience-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.audience-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; line-height: 1.45; color: var(--text); opacity: 0.85; }
.audience-list svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; }
.audience-card.players .audience-list svg { color: var(--accent-2); }
.audience-card.families .audience-list svg { color: var(--accent-3); }
.audience-card.club .audience-list svg { color: var(--accent); }

/* Gestión de clubes — reuses .feature-grid/.feature-card below */
.panel { padding: 96px 0; border-top: 1px solid var(--border); background: var(--surface); }
.panel h2 { max-width: 34ch; margin: 0 auto 16px; }
.panel-screenshot {
  margin: 56px auto 0;
  max-width: 900px;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-strong) center / cover no-repeat url('images/panel-admin-screenshot.jpg');
  box-shadow: 0 30px 60px -30px rgba(18,20,28,0.25);
}

/* Feature cards — shared by the "gestión de clubes" grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(18,20,28,0.03);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(18,20,28,0.18); }
.feature-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card p { margin: 0; font-size: 0.92rem; }

/* Showcase marquee — continuous, CSS-only, never touches page scroll */
.showcase { padding: 96px 0; border-top: 1px solid var(--border); overflow: hidden; }
.showcase h2 { margin-bottom: 40px; }

.marquee {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 36s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 24px; padding-right: 24px; flex-shrink: 0; }
.marquee-item {
  flex: 0 0 auto;
  width: 260px;
  aspect-ratio: 9 / 19.5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.marquee-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* How it works */
.how { padding: 96px 0; border-top: 1px solid var(--border); background: var(--surface); }
.how h2 { margin-bottom: 56px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { text-align: center; }
.step-num {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 auto 18px;
  font-variant-numeric: tabular-nums;
}
.steps .step:nth-child(2) .step-num { background: var(--accent-2); }
.steps .step:nth-child(3) .step-num { background: var(--accent-3); }
.step p { font-size: 0.92rem; }

/* Pricing */
.pricing { padding: 96px 0; border-top: 1px solid var(--border); }
.pricing h2 { max-width: 40ch; margin: 0 auto 16px; }
.price-card {
  max-width: 520px;
  margin: 0 auto 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.price-rows { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.95rem; color: var(--text-muted); }
.price-row strong { color: var(--text); font-weight: 600; }
.price-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 20px; border-top: 1px solid var(--border); }
.price-total-label { font-weight: 700; font-size: 1.05rem; }
.price-total-value { font-size: 1.8rem; font-weight: 900; color: var(--accent); }
.price-total-note { display: block; font-size: 0.78rem; color: var(--text-muted); text-align: right; margin-top: 2px; }

.sponsor-highlight {
  max-width: 720px;
  margin: 0 auto 32px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
}
.sponsor-highlight h3 { color: #04563C; margin-bottom: 4px; }
.sponsor-highlight ul { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sponsor-highlight li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; line-height: 1.45; color: #04563C; }
.sponsor-highlight li svg { flex-shrink: 0; margin-top: 3px; width: 18px; height: 18px; color: var(--accent); }
.sponsor-highlight strong { color: #04563C; }

.price-notes { max-width: 720px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.price-note { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; text-align: center; }
.price-note strong { display: block; font-size: 1.3rem; color: var(--accent-2); margin-bottom: 4px; }
.price-note span { font-size: 0.85rem; color: var(--text-muted); }

/* Status */
.status { padding: 72px 0; }
.status-inner {
  max-width: 760px;
  text-align: center;
  background: linear-gradient(135deg, #FFF8E8, #FBEDC8);
  border: 1px solid #E8C878;
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: 0 12px 32px -16px rgba(184,134,11,0.3);
}
.status-inner h2 { color: #8A6512; }
.status-inner p { margin: 0 auto; max-width: 58ch; color: #6B5316; }
.status-inner strong { color: #8A6512; }

/* CTA final */
.cta-final { padding: 96px 0 120px; text-align: center; }
.cta-inner { max-width: 560px; margin: 0 auto; }
.cta-inner p { margin-bottom: 32px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-tagline { font-size: 0.8rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-muted); font-size: 0.85rem; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

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

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 16px; }
  .identity-inner { padding: 32px; }
  .problem-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .audience-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .problem-grid { grid-template-columns: 1fr; }
  .banner { aspect-ratio: 2 / 1; }
  .gallery-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .price-notes { grid-template-columns: 1fr; }
  .price-card, .sponsor-highlight { padding: 28px 24px; }
  .phone { width: 260px; }
  .marquee-item { width: 180px; }
  .status-inner { padding: 32px 24px; }
  .footer-inner { justify-content: center; text-align: center; }
  .footer-brand { align-items: center; }
}
