/* Idle Padel Tycoon: paleta del juego (Palette.swift / Theme.swift), Anton para titulares y Nunito para el texto. */
@font-face {
  font-family: "Anton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/anton-latin.woff2?v=23aab0b2) format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/nunito-latin-var.woff2?v=2529be33) format("woff2");
}

:root {
  --night: #1f1931;      /* MapPalette.night: fondo */
  --night-2: #2b2343;    /* night2 */
  --deep: #141026;       /* night más oscuro para el pie */
  --card: #33294f;
  --line: #4b406f;
  --ink: #f4efff;        /* texto: 15:1 sobre --night */
  --muted: #b6abd8;      /* texto secundario: 7,9:1 */
  --ball: #e6ff5a;       /* pelota: acento principal, 15:1 */
  --cash: #ffc929;       /* dinero $/s · €/s */
  --court: #3e7be0;      /* pista: solo superficies y líneas */
  --court-d: #2a56a8;    /* pista oscura: fondo de texto blanco (7:1) */
  --glass: rgba(199, 237, 255, 0.08);
  --glass-edge: rgba(235, 250, 255, 0.24);
  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --text: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
  --gutter: clamp(20px, 5vw, 40px);
  --header-h: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(120% 70% at 85% -10%, rgba(62, 123, 224, 0.35), transparent 60%),
    radial-gradient(90% 60% at -10% 30%, rgba(42, 86, 168, 0.28), transparent 60%),
    var(--night);
  color: var(--ink);
  font: 500 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ball); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--ball); color: var(--night); font-weight: 800; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Cabecera opaca: si fuera translúcida, la pastilla lima del CTA se transparentaba y el blur la convertía
   en un resplandor detrás del logo al hacer scroll. */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: #1b1530;
  border-bottom: 1px solid rgba(235, 250, 255, 0.1);
  box-shadow: 0 8px 24px rgba(10, 8, 20, 0.35);
}
.header-row { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-ball {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fbffd0 0 18%, var(--ball) 45%, #b8cf2c 100%);
  box-shadow: 0 0 14px rgba(230, 255, 90, 0.55);
  position: relative; overflow: hidden;
}
.brand-ball::after {
  content: ""; position: absolute; inset: -30%;
  border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 50%;
  transform: translateX(46%);
}
.brand-name {
  font-family: var(--display); font-size: 1.25rem; line-height: 1;
  letter-spacing: 0.02em; text-transform: uppercase;
}

/* Selector de idioma: dos pastillas */
.lang-switch {
  display: inline-flex; padding: 3px; gap: 2px;
  border: 1px solid var(--glass-edge); border-radius: 999px;
  background: var(--glass);
}
.lang-switch a {
  min-width: 44px; min-height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; text-decoration: none;
  font-weight: 800; font-size: 0.875rem; letter-spacing: 0.08em; color: var(--muted);
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="page"] { background: var(--ball); color: var(--night); }

/* Pie: corte diagonal y líneas de pista */
.site-footer {
  position: relative;
  margin-top: 64px;
  padding: 72px 0 calc(32px + env(safe-area-inset-bottom));
  background: var(--deep);
  clip-path: polygon(0 32px, 100% 0, 100% 100%, 0 100%);
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 46px; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16) 20%, rgba(255, 255, 255, 0.16) 80%, transparent);
  transform: rotate(-1.2deg);
}
.footer-grid { display: grid; gap: 18px; }
.site-footer .brand { color: var(--ink); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer-links a, .footer-mail a {
  display: inline-block; padding: 8px 0; color: var(--ink);
  font-weight: 700; text-decoration-color: rgba(230, 255, 90, 0.5); text-underline-offset: 4px;
}
.footer-links a:hover, .footer-mail a:hover { color: var(--ball); }
.footer-mail, .footer-legal { margin: 0; }
.footer-legal { font-size: 0.8125rem; }

@media (min-width: 800px) {
  .footer-grid { grid-template-columns: auto 1fr; align-items: center; column-gap: 48px; }
  .footer-grid nav { justify-self: end; }
  .footer-mail { grid-column: 1; }
  .footer-legal { grid-column: 2; justify-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Landing ---------- */
/* line-height 1.18: en Anton la tilde de Á É Í Ó Ú sube 1,10 em sobre la línea base; con 1.18 queda un hueco
   de 0,08 em hasta la línea anterior a cualquier tamaño (medido con canvas.measureText). */
.display { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1.18; letter-spacing: 0.005em; margin: 0; }
.kicker, .eyebrow {
  margin: 0 0 12px; font-weight: 700; font-size: 0.8125rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ball);
}
.section-title { font-size: clamp(2.5rem, 9vw, 4.5rem); margin-bottom: 28px; }
.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 55%), var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 20px;
}
.icon { width: 26px; height: 26px; flex: none; color: var(--ball); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 28px 0 56px; }
.hero-court {
  position: absolute; z-index: -1; color: rgba(255, 255, 255, 0.07);
  width: 520px; right: -170px; top: 40px; transform: rotate(-28deg);
}
.hero-grid { display: grid; gap: 0; align-items: center; }
.hero-title { font-size: clamp(3.5rem, 15.5vw, 7rem); margin: 0 0 16px; }
.hero-title span { display: block; }
.hero-title .accent { color: var(--ball); }
.lead { margin: 0 0 22px; font-size: 1.0625rem; color: var(--ink); max-width: 34em; }

.cta { display: grid; justify-items: start; gap: 14px; }
.cta-main {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 0 28px; border-radius: 999px;
  background: var(--ball); color: var(--night); text-decoration: none;
  font-weight: 800; font-size: 1.125rem;
  box-shadow: 0 10px 30px rgba(230, 255, 90, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-main:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(230, 255, 90, 0.35), inset 0 -3px 0 rgba(0, 0, 0, 0.12); }
.cta-main:active { transform: translateY(1px); }
.cta-arrow { font-size: 1.25em; line-height: 1; transition: transform 0.15s ease; }
.cta-main:hover .cta-arrow { transform: translateX(3px); }
.cta-note { margin: 0; font-size: 0.875rem; font-weight: 700; color: var(--muted); }
.store-badge { display: inline-block; }
.store-badge img { width: 180px; height: auto; }


/* iPhone en CSS */
/* En móvil, hueco para la pelota entre la nota del CTA y el iPhone (el suelo queda justo encima del teléfono). */
.hero-visual { position: relative; display: grid; place-items: center; padding-top: 120px; }
.hero-visual::before {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 123, 224, 0.55), transparent 65%); filter: blur(10px);
}
.phone {
  position: relative; margin: 0; width: 72%; max-width: 300px; aspect-ratio: 9 / 19.5;
  padding: 10px; border-radius: 48px;
  background: linear-gradient(145deg, #3a3354, #110d1f 60%);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.18), 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(62, 123, 224, 0.25);
  transform: rotate(-4deg);
}
.phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 38px; overflow: hidden;
  background: linear-gradient(180deg, var(--court) 0%, var(--court-d) 100%);
  display: grid; place-items: center;
}
/* El vídeo trae su propia barra de estado y Dynamic Island: el mockup no dibuja otra. */
.hero-video { width: 100%; height: 100%; object-fit: cover; background: var(--court-d); }
.video-toggle {
  position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(20, 16, 38, 0.6); cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center;
}
.video-toggle span { width: 12px; height: 14px; border-left: 4px solid var(--ink); border-right: 4px solid var(--ink); }
.video-toggle.is-paused span { width: 0; height: 0; border: 0; border-left: 13px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 4px; }

/* Highlights */
.highlights { padding: 0 0 56px; }
.highlight-list { list-style: none; margin: 0 auto; display: grid; gap: 12px; }
.highlight-list li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; font-weight: 700; }

/* Secciones con corte diagonal */
.cut { position: relative; padding: 96px 0; clip-path: polygon(0 48px, 100% 0, 100% calc(100% - 48px), 0 100%); }
.build { background: linear-gradient(180deg, #241d3b, #1b1530); }

.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.feature { overflow: hidden; display: flex; flex-direction: column; }
.feature-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--court-d); }
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-num { display: block; margin-bottom: 6px; font-family: var(--display); font-size: 1.5rem; line-height: 1.1; color: var(--ball); }
.feature-body { padding: 20px 22px 26px; }
.feature-title { font-size: 1.875rem; margin-bottom: 10px; }
.feature-body p { margin: 0; color: var(--muted); }

/* Ritmo del club: franja azul pista (texto blanco sobre --court-d, 7:1) */
.loop { background: linear-gradient(120deg, var(--court-d), #23488e); }
.loop .kicker { color: var(--ball); }
.loop-steps { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.loop-steps li {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--display); font-size: 1.75rem; text-transform: uppercase; line-height: 1;
}
.step-num {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--ball); color: var(--night); font-size: 1.25rem;
}
.counter {
  margin: 0 0 20px; padding: 18px 22px; border-radius: 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
  background: rgba(20, 16, 38, 0.55); border: 1px solid rgba(255, 255, 255, 0.18);
}
.counter-label { font-weight: 700; color: var(--ink); }
.counter-value { font-family: var(--display); font-size: clamp(2.5rem, 11vw, 4rem); line-height: 1; color: var(--cash); font-variant-numeric: tabular-nums; }
.loop-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-weight: 700; }
.loop-notes li::before { content: "●"; color: var(--ball); margin-right: 10px; font-size: 0.75em; vertical-align: 0.1em; }

/* Más ciudades */
.cities { padding: 88px 0 56px; text-align: center; }
.cities-inner { position: relative; }
.cities .section-title { font-size: clamp(2.75rem, 11vw, 5.5rem); margin-bottom: 14px; }
/* padding-top: deja sitio a la tilde de MÁS, que si no queda fuera del fondo recortado al texto */
.cities .section-title { padding-top: 0.12em; background: linear-gradient(90deg, var(--ink), var(--ball)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cities-text { margin: 0 auto; max-width: 30em; color: var(--muted); font-size: 1.125rem; }

/* FAQ */
.faq { padding: 40px 0 24px; }
.faq-inner { max-width: 820px; display: grid; gap: 12px; }
.faq details { padding: 0 20px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-weight: 800; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-size: 1.75rem; color: var(--ball); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }
.faq details a { color: var(--ink); font-weight: 800; text-decoration-color: var(--ball); text-underline-offset: 4px; }

/* Llamada final */
.final { margin-top: 48px; text-align: center; background: radial-gradient(80% 120% at 50% 100%, rgba(230, 255, 90, 0.14), transparent 60%), #241d3b; }
.final-inner { display: grid; justify-items: center; gap: 14px; }
.final-title { font-size: clamp(3rem, 13vw, 6rem); }
.final-inner > p { margin: 0 0 10px; color: var(--muted); font-size: 1.125rem; }
.final .cta { justify-items: center; }
.final + * { margin-top: 0; }

@media (min-width: 720px) {
  .highlight-list { grid-template-columns: repeat(3, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .loop-steps { grid-template-columns: repeat(4, auto); justify-content: start; gap: 14px 36px; }
  .loop-steps li:not(:last-child)::after { content: "→"; margin-left: 22px; color: var(--ball); font-family: var(--text); font-weight: 800; }
}
@media (min-width: 1000px) {
  .hero { padding: 64px 0 88px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
  .hero-visual { padding-top: 0; }
  .hero-title { font-size: clamp(5rem, 8vw, 7.5rem); }
  .lead { font-size: 1.1875rem; }
  .hero-court { width: 760px; right: -120px; top: -60px; }
  .phone { width: 300px; max-width: none; }
}

/* ---------- Movimiento (site.js) ---------- */
/* El canvas cubre todo el hero; site.js calcula la zona donde bota (siempre fuera de la pantalla del iPhone). */
.ball-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.will-reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.will-reveal.is-in { opacity: 1; transform: none; }
.feature-grid .will-reveal:nth-child(2n) { transition-delay: 0.08s; }
.highlight-list .will-reveal:nth-child(2) { transition-delay: 0.06s; }
.highlight-list .will-reveal:nth-child(3) { transition-delay: 0.12s; }
[data-tilt] { transition: transform 0.25s ease, opacity 0.6s ease; transform-style: preserve-3d; will-change: transform; position: relative; }
[data-tilt]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(400px circle at var(--glare-x, 50%) var(--glare-y, 50%), rgba(255, 255, 255, 0.12), transparent 50%);
}
[data-tilt]:hover::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1; transform: none; }
  [data-tilt] { transform: none !important; }
}

/* ---------- Páginas legales ---------- */
.legal { padding: 40px 0 24px; }
.legal-inner { max-width: 780px; }
.legal-back { margin: 0 0 20px; font-weight: 700; }
.legal-back a { color: var(--muted); text-decoration: none; }
.legal-back a:hover { color: var(--ball); }
.legal-title { font-size: clamp(2.5rem, 10vw, 4rem); margin-bottom: 8px; }
.legal-updated { margin: 0 0 28px; color: var(--muted); font-weight: 700; font-size: 0.9375rem; }
.legal-lead { font-size: 1.1875rem; margin: 0 0 20px; }
.legal h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; line-height: 1.18; font-size: 1.875rem; margin: 40px 0 12px; color: var(--ink); }
.legal h3 { font-size: 1.125rem; font-weight: 800; margin: 26px 0 8px; color: var(--ball); }
.legal p, .legal li { color: #ddd6f3; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 6px 0; }
.legal li::marker { color: var(--ball); }
.legal strong { color: var(--ink); }
.legal p a, .legal li a { color: var(--ink); font-weight: 700; text-decoration-color: var(--ball); text-underline-offset: 4px; }
.legal .cta-main, .legal p a.cta-main { margin: 4px 0 6px; color: var(--night); text-decoration: none; font-weight: 800; }
.legal-email { display: block; margin-top: 10px; color: var(--muted); font-weight: 700; }
.legal details { padding: 0 20px; margin-bottom: 12px; }
.legal summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-weight: 800; font-size: 1.0625rem; color: var(--ink); }
.legal summary::-webkit-details-marker { display: none; }
.legal summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--display); font-size: 1.75rem; color: var(--ball); transition: transform 0.2s; }
.legal details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.legal details p { margin: 0 0 18px; }

/* ---------- 404 ---------- */
.not-found { padding: 72px 0 24px; text-align: center; }
.not-found-inner { display: grid; justify-items: center; gap: 4px; }
.not-found-title { font-size: clamp(2.75rem, 12vw, 5.5rem); margin-bottom: 14px; }
.not-found-title-es { display: block; margin-top: 4px; font-size: 0.5em; color: var(--ball); }
.not-found p { margin: 0; color: var(--muted); font-size: 1.125rem; }
.not-found .kicker { color: var(--ball); }
.not-found-links { display: grid; justify-items: center; gap: 14px; margin-top: 24px !important; }
.not-found-es { color: var(--ink); font-weight: 800; text-decoration-color: var(--ball); text-underline-offset: 5px; }
