/* AFTERA — sitio público. Mismos tokens visuales que la app (mobile/src/theme/index.ts). */
:root {
  --bg: #09070f;
  --bg-deep: #07050d;
  --card: #151419;
  --row: #1e1a26;
  --border: rgba(255, 255, 255, 0.09);
  --violet: #a25bf5;
  --violet-light: #af6dfa;
  --violet-dark: #974fea;
  --glow: rgba(162, 91, 245, 0.45);
  --text: #fff;
  --silver: #d8d8de;
  --muted: #9b9aa3;
  --star: #f5c451;
  --wrap: 1180px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg-deep); }
body { margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--silver); background: var(--bg); min-height: 100vh; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--violet-light); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--violet-light); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { color: #fff; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: .6rem 1rem; z-index: 99; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- cabecera ---------- */
.top { position: sticky; top: 0; z-index: 30; background: rgba(9, 7, 15, .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand img { height: 34px; width: auto; }
.top nav { display: flex; gap: .4rem; }
.top nav a { color: var(--silver); text-decoration: none; font-size: .95rem; padding: .55rem .9rem; border-radius: 999px; border: 1px solid transparent; }
.top nav a:hover, .top nav a[aria-current] { color: #fff; border-color: var(--border); background: rgba(255, 255, 255, .04); }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('bg-club-800.webp') center / cover no-repeat; opacity: .55; }
@media (min-width: 900px) { .hero::before { background-image: url('bg-club-1600.webp'); } }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60% 50% at 78% 38%, rgba(162, 91, 245, .38), transparent 70%),
  radial-gradient(50% 40% at 8% 90%, rgba(120, 50, 200, .35), transparent 70%),
  linear-gradient(180deg, rgba(9, 7, 15, .55) 0%, rgba(9, 7, 15, .75) 55%, var(--bg) 100%); }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
.hero-copy { text-align: center; }
.logo-hero { width: min(420px, 84%); height: auto; margin: 0 auto 1.6rem; filter: drop-shadow(0 0 28px rgba(162, 91, 245, .45)); }
h1 { font-size: clamp(2rem, 6.2vw, 3.6rem); font-style: italic; font-weight: 400; color: var(--silver); }
h1 strong { font-style: italic; font-weight: 700; color: var(--violet-light); }
.lead { font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: var(--silver); max-width: 34rem; margin: 0 auto 2rem; opacity: .92; }
.stores { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.note18 { margin-top: 1.4rem; font-size: .85rem; color: var(--muted); }

/* botones de descarga */
.store { position: relative; display: inline-flex; align-items: center; gap: .85rem; min-width: 220px; padding: .8rem 1.5rem .8rem 1.2rem; border-radius: 18px; text-decoration: none; color: #fff; background: linear-gradient(160deg, #1b1527, #0f0b17); border: 1px solid rgba(175, 109, 250, .55); box-shadow: 0 10px 30px -10px rgba(162, 91, 245, .55), inset 0 1px 0 rgba(255, 255, 255, .12); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.store::before { content: ''; position: absolute; inset: -1px; border-radius: 18px; padding: 1px; background: linear-gradient(120deg, rgba(175, 109, 250, .0), rgba(175, 109, 250, .9), rgba(175, 109, 250, 0)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .2s; pointer-events: none; }
.store:hover { color: #fff; transform: translateY(-3px); border-color: var(--violet-light); box-shadow: 0 16px 40px -10px rgba(162, 91, 245, .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
.store:hover::before { opacity: 1; }
.store svg { width: 34px; height: 34px; flex: none; }
.store small { display: block; font-size: .72rem; letter-spacing: .04em; color: var(--silver); opacity: .85; line-height: 1.1; }
.store b { display: block; font-size: 1.28rem; font-weight: 650; letter-spacing: -.01em; line-height: 1.15; }
.store.soon::after { content: 'Muy pronto'; position: absolute; top: -10px; right: 14px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #1a1030; background: var(--star); padding: .15rem .55rem; border-radius: 999px; box-shadow: 0 4px 12px rgba(245, 196, 81, .4); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #1b1527; color: #fff; border: 1px solid var(--violet); padding: .8rem 1.2rem; border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); transition: opacity .25s, transform .25s; z-index: 50; max-width: calc(100% - 2rem); text-align: center; font-size: .95rem; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* teléfonos */
.phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 440px; }
.phone { position: relative; flex: none; width: 200px; border-radius: 34px; padding: 7px; background: linear-gradient(160deg, #3a2b52, #130f1c); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 70px -10px var(--glow), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.phone img { border-radius: 28px; width: 100%; aspect-ratio: 390 / 844; object-fit: cover; background: #09070f; }
.phone.c { width: 232px; z-index: 3; animation: float 7s ease-in-out infinite; }
.phone.l { transform: translateX(34px) rotate(-7deg) scale(.88); z-index: 1; opacity: .95; }
.phone.r { transform: translateX(-34px) rotate(7deg) scale(.88); z-index: 2; opacity: .95; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.stars i { position: absolute; width: var(--s); height: var(--s); left: var(--x); top: var(--y); background: radial-gradient(circle, #fff 0 18%, #d9b8ff 45%, rgba(162, 91, 245, 0) 72%); clip-path: polygon(50% 0, 60% 38%, 100% 50%, 60% 62%, 50% 100%, 40% 62%, 0 50%, 40% 38%); opacity: .5; animation: tw var(--t) ease-in-out var(--d) infinite; pointer-events: none; }
@keyframes tw { 0%, 100% { opacity: .15; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.1); } }

@media (min-width: 960px) {
  .hero .wrap { grid-template-columns: 1.05fr 1fr; gap: 2rem; }
  .hero-copy { text-align: left; }
  .hero-copy .logo-hero { margin-left: 0; }
  .lead { margin-left: 0; }
  .stores { justify-content: flex-start; }
  .phone { width: 230px; }
  .phone.c { width: 268px; }
  .phone.l { transform: translateX(46px) rotate(-7deg) scale(.88); }
  .phone.r { transform: translateX(-46px) rotate(7deg) scale(.88); }
  .phones { min-height: 560px; }
}
@media (max-width: 520px) {
  .phone { width: 150px; border-radius: 28px; padding: 6px; }
  .phone img { border-radius: 23px; }
  .phone.c { width: 190px; }
  .phone.l { transform: translateX(28px) rotate(-7deg) scale(.86); }
  .phone.r { transform: translateX(-28px) rotate(7deg) scale(.86); }
  .phones { min-height: 380px; }
  .store { width: min(100%, 320px); justify-content: center; }
}

/* ---------- secciones ---------- */
section.block { padding-block: clamp(3rem, 7vw, 5.5rem); }
.head { text-align: center; max-width: 40rem; margin: 0 auto 2.6rem; }
.head h2 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
.head h2 em { color: var(--violet-light); font-style: normal; }
.head p { color: var(--muted); }
.features { display: grid; gap: 1.1rem; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 1.6rem; border-radius: 22px; background: linear-gradient(180deg, rgba(30, 26, 38, .9), rgba(21, 20, 25, .9)); border: 1px solid var(--border); position: relative; overflow: hidden; }
.feature::before { content: ''; position: absolute; width: 180px; height: 180px; right: -60px; top: -70px; background: radial-gradient(circle, rgba(162, 91, 245, .35), transparent 70%); }
.feature .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 1rem; background: rgba(162, 91, 245, .14); border: 1px solid rgba(162, 91, 245, .45); color: var(--violet-light); }
.feature .ic svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.2rem; }
.feature p { margin: 0; color: var(--silver); opacity: .85; font-size: .96rem; }

.cta { text-align: center; }
.cta-box { position: relative; overflow: hidden; border-radius: 30px; padding: clamp(2.2rem, 6vw, 4rem) 1.5rem; border: 1px solid rgba(175, 109, 250, .4); background: radial-gradient(70% 90% at 50% 0%, rgba(162, 91, 245, .35), transparent 70%), linear-gradient(180deg, #140f1e, #0b0812); box-shadow: 0 30px 80px -30px var(--glow); }
.cta-box h2 { font-size: clamp(1.6rem, 4.6vw, 2.5rem); }
.cta-box p { color: var(--silver); max-width: 32rem; margin: 0 auto 1.8rem; opacity: .9; }

/* ---------- pie ---------- */
.foot { border-top: 1px solid var(--border); padding-block: 2.4rem; margin-top: 1rem; font-size: .9rem; color: var(--muted); background: var(--bg-deep); }
.foot .wrap { display: grid; gap: 1.2rem; justify-items: center; text-align: center; }
.foot img { height: 40px; width: auto; }
.foot nav { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: center; }
.foot a { color: var(--silver); }
.foot a:hover { color: #fff; }
.foot p { margin: 0; }

/* ---------- páginas legales ---------- */
.legal-hero { padding-block: clamp(2.2rem, 6vw, 4rem) 1.2rem; text-align: center; background: radial-gradient(60% 100% at 50% 0%, rgba(162, 91, 245, .25), transparent 70%); }
.legal-hero h1 { font-style: normal; font-weight: 700; color: #fff; font-size: clamp(1.9rem, 5vw, 3rem); }
.legal-hero p { color: var(--muted); margin: 0; }
.legal { display: grid; gap: 2rem; padding-block: 1.5rem 4rem; }
@media (min-width: 980px) { .legal { grid-template-columns: 260px 1fr; gap: 3rem; align-items: start; } }
.toc { padding: 1.2rem 1.3rem; border-radius: 18px; background: var(--card); border: 1px solid var(--border); font-size: .92rem; }
@media (min-width: 980px) { .toc { position: sticky; top: 90px; } }
.toc b { display: block; color: #fff; margin-bottom: .5rem; }
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: .3rem; }
.toc a { color: var(--silver); text-decoration: none; }
.toc a:hover { color: var(--violet-light); }
.doc { max-width: 46rem; }
.doc h2 { font-size: 1.35rem; margin-top: 2.2rem; padding-top: .4rem; scroll-margin-top: 90px; }
.doc h2:first-of-type { margin-top: 0; }
.doc p, .doc li { color: var(--silver); }
.doc ul { padding-left: 1.2rem; display: grid; gap: .4rem; margin: 0 0 1em; }
.doc strong { color: #fff; }
.draft-note { padding: .8rem 1rem; border-radius: 12px; border: 1px solid rgba(245, 196, 81, .4); background: rgba(245, 196, 81, .08); color: var(--star); font-size: .9rem; margin-bottom: 1.6rem; }
mark.todo { background: rgba(245, 196, 81, .16); color: var(--star); padding: 0 .3em; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- ajustes móvil ---------- */
.hero .wrap { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .hero .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.hero-copy { min-width: 0; }
.phones { max-width: 100%; }
.brand { display: inline-flex; align-items: center; min-height: 48px; }
.top nav a { min-height: 44px; display: inline-flex; align-items: center; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .3rem; }
h1 { overflow-wrap: anywhere; }
@media (min-width: 960px) { h1 { font-size: clamp(2.3rem, 3.3vw, 3.3rem); } .legal-hero h1 { font-size: clamp(1.9rem, 5vw, 3rem); } }
.cta .stores { justify-content: center; }
