/* RaquetGO — página web. Mismos colores que la app (src/theme/colors.ts). */

:root {
  --bg: #F6F7FB;
  --surface: #FFFFFF;
  --surface-alt: #EEF1F6;
  --border: #E3E7EE;
  --text: #0F172A;
  --text-2: #5B6476;
  --navy: #0B1530;
  --primary: #0A6CFF;
  --primary-2: #0076FD;
  --primary-muted: #E6EEFF;
  --go: #B9D82B;
  --cta: #16A34A;
  --pin-single: #2F7BEA;
  --pin-doubles: #E9508C;
  --court-free: #16A34A;
  --court-private: #7C3AED;
  --shadow: 0 1px 2px rgb(15 23 42 / .04), 0 8px 24px rgb(15 23 42 / .06);
  --shadow-lg: 0 30px 60px -20px rgb(11 21 48 / .35);
  /* Mapa (estilo claro de Mapbox de RaquetGO) */
  --map-land: #EEF3F8;
  --map-street: #FFFFFF;
  --map-avenue: #E6F59A;
  --map-park: #CFEFCB;
  --map-water: #A9D8F7;
  --radius: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0F17;
    --surface: #151A24;
    --surface-alt: #1E2532;
    --border: #2A3242;
    --text: #F1F5F9;
    --text-2: #9AA4B5;
    --navy: #F1F5F9;
    --primary: #4D8DFF;
    --primary-2: #4D8DFF;
    --primary-muted: #1A2A4D;
    --go: #D4FF3A;
    --cta: #22A355;
    --pin-single: #4D8DFF;
    --pin-doubles: #F06A9F;
    --court-free: #22C55E;
    --court-private: #A78BFA;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .3);
    --shadow-lg: 0 30px 60px -20px rgb(0 0 0 / .7);
    --map-land: #141B2D;
    --map-street: #2B3650;
    --map-avenue: #4A5A1E;
    --map-park: #1E3A33;
    --map-water: #16304F;
  }
}

/* Idioma: html[data-lang] decide qué versión se ve. */
html[data-lang="es"] [data-l="en"],
html[data-lang="en"] [data-l="es"] { display: none !important; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; color: var(--text); letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--text-2); font-size: .95rem; }

/* ---------- barra superior */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand:hover { text-decoration: none; }
.brand-icon { width: 36px; height: 36px; border-radius: 10px; }
.brand-word { width: 128px; height: auto; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--text-2); font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--surface-alt); text-decoration: none; }
.lang { display: flex; background: var(--surface-alt); border-radius: 999px; padding: 3px; }
.lang button {
  font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .03em;
  border: 0; background: transparent; color: var(--text-2);
  padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
html[data-lang="es"] .lang [data-set-lang="es"],
html[data-lang="en"] .lang [data-set-lang="en"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- hero */
.hero { padding: 56px 0 24px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-size: .85rem; font-weight: 700; letter-spacing: .02em; color: var(--primary);
  background: var(--primary-muted); padding: 6px 12px; border-radius: 999px;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(90deg, var(--primary), var(--primary-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .12em; margin-right: -.06em;
}
.lead { font-size: 1.15rem; color: var(--text-2); max-width: 34em; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--navy); color: var(--bg);
  padding: 10px 18px 10px 14px; border-radius: 14px;
  cursor: default; user-select: none;
}
.store svg { width: 26px; height: 26px; flex: none; }
.store > span { display: flex; flex-direction: column; line-height: 1.15; }
.store small { font-size: .72rem; opacity: .75; font-weight: 500; }
.store strong { font-size: 1.05rem; font-weight: 700; }

/* ---------- teléfono con el mapa */
.phone {
  justify-self: center;
  width: min(300px, 78vw); aspect-ratio: 300 / 620;
  border-radius: 46px; padding: 10px;
  background: #0B1530;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px #26324f;
  position: relative;
}
.phone::before { /* isla */
  content: ""; position: absolute; z-index: 3; top: 20px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 26px; border-radius: 999px; background: #0B1530;
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 37px; overflow: hidden; background: var(--map-land); }
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .land { fill: var(--map-land); }
.map .water { fill: var(--map-water); }
.map .park { fill: var(--map-park); }
.map .court-lines rect { fill: none; stroke: color-mix(in srgb, var(--map-street) 85%, transparent); stroke-width: 1.5; }
.map .street path { stroke: var(--map-street); stroke-width: 9; fill: none; stroke-linecap: round; }
.map .avenue path { stroke: var(--map-avenue); stroke-width: 13; fill: none; stroke-linecap: round; }

.search {
  position: absolute; top: 58px; left: 14px; right: 14px; z-index: 2;
  background: var(--surface); color: var(--text-2);
  border-radius: 999px; padding: 10px 16px; font-size: .78rem; box-shadow: var(--shadow);
}
.chips { position: absolute; top: 104px; left: 14px; right: 0; z-index: 2; display: flex; gap: 6px; overflow: hidden; }
.chip {
  flex: none; background: var(--surface); color: var(--text);
  font-size: .68rem; font-weight: 600; border-radius: 999px; padding: 5px 10px; box-shadow: var(--shadow);
}
.chip.on { background: var(--primary); color: #fff; }

.pin { position: absolute; width: 30px; height: 30px; transform: translate(-50%, -100%); --c: var(--pin-single); }
.pin.doubles { --c: var(--pin-doubles); }
.pin i { /* gota */
  position: absolute; inset: 0; background: var(--c);
  border: 3px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgb(0 0 0 / .25);
}
.pin::before, .pin::after { /* halo que late */
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 44px; height: 16px;
  margin-left: -22px; border-radius: 50%; background: var(--c); opacity: 0;
  animation: pulse 2.4s ease-out infinite;
}
.pin::after { animation-delay: 1.2s; }
.pin .tag {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: .62rem; font-weight: 700;
  background: var(--surface); color: var(--text); padding: 3px 8px; border-radius: 999px; box-shadow: var(--shadow);
}
@keyframes pulse {
  0% { transform: scale(.3); opacity: .55; }
  100% { transform: scale(1.8); opacity: 0; }
}
.court-pin {
  position: absolute; width: 16px; height: 16px; transform: translate(-50%, -50%);
  border-radius: 6px; border: 2.5px solid #fff; background: var(--court-free); box-shadow: 0 2px 6px rgb(0 0 0 / .25);
}
.court-pin.private { background: var(--court-private); }
.cta {
  position: absolute; left: 18px; right: 18px; bottom: 26px; z-index: 2;
  background: var(--cta); color: #fff; text-align: center;
  font-weight: 700; font-size: .9rem; padding: 13px; border-radius: 999px;
  box-shadow: 0 10px 20px -6px rgb(22 163 74 / .55);
}

@media (prefers-reduced-motion: reduce) {
  .pin::before, .pin::after { animation: none; opacity: .18; transform: scale(1.2); }
  html { scroll-behavior: auto; }
}

/* ---------- secciones */
.section { padding: 56px 0; }
.section-title { text-align: center; margin-bottom: 32px; }
.section-title.left { text-align: left; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card img { width: 56px; height: 56px; margin-bottom: 14px; }
.card p { color: var(--text-2); margin: 0; font-size: .98rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps .num {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800;
  background: var(--go); color: #0B1530;
}
.steps h3 { margin-bottom: .25em; }
.steps p { margin: 0; color: var(--text-2); font-size: .98rem; }

.privacy-card {
  display: flex; gap: 24px; align-items: center;
  background: var(--primary-muted); border-radius: 28px; padding: 32px;
}
.privacy-card img { width: 72px; height: 72px; flex: none; }
.privacy-card h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); }
.privacy-card p { color: var(--text-2); }
.link { font-weight: 700; }

.cta-band { text-align: center; }
.band {
  background: #0B1530; color: #fff; border-radius: 32px; padding: 48px 24px;
  background-image: radial-gradient(circle at 85% 20%, rgb(10 108 255 / .55), transparent 55%), radial-gradient(circle at 10% 90%, rgb(212 255 58 / .18), transparent 45%);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgb(255 255 255 / .75); }
.cta-band .stores { justify-content: center; }
.cta-band .store { background: #fff; color: #0B1530; }

/* ---------- soporte */
.page-head { padding-bottom: 8px; }
.page-head img { width: 72px; height: 72px; margin-bottom: 12px; }
.button {
  display: inline-block; background: var(--primary); color: #fff; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; box-shadow: 0 10px 20px -8px rgb(10 108 255 / .6);
}
.button:hover { text-decoration: none; filter: brightness(1.05); }
.faq { display: grid; gap: 12px; margin-bottom: 28px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 4px 20px; box-shadow: var(--shadow); scroll-margin-top: 80px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-weight: 800; font-size: 1.2rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); }
.faq details:target { border-color: var(--primary); }

/* ---------- textos legales */
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.legal .updated { color: var(--text-2); font-size: .95rem; margin-bottom: 2em; }
.legal section { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; margin-bottom: 14px; box-shadow: var(--shadow); }
.legal h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .4em; }
.legal p, .legal li { color: var(--text-2); }
.legal p:last-child, .legal ul:last-child { margin-bottom: 0; }
.legal ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: .35em; }
mark.pending { background: #FDE68A; color: #78350F; padding: 0 4px; border-radius: 4px; }

/* ---------- pie */
.footer { border-top: 1px solid var(--border); padding: 28px 0 40px; margin-top: 24px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: .92rem; }
.footer-brand img { border-radius: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: var(--text-2); font-weight: 600; font-size: .92rem; }

/* ---------- celular */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero .stores { justify-content: center; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar-inner { gap: 8px; height: 58px; }
  .brand-word { width: 92px; }
  .nav a:first-child { display: none; }
  .nav a { padding: 6px 9px; font-size: .88rem; }
  .hero { padding-top: 36px; }
  .grid { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .privacy-card { flex-direction: column; align-items: flex-start; padding: 24px; }
  .band { border-radius: 24px; padding: 36px 18px; }
  .legal section { padding: 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
