/*
 * Sitio de Anatomía 101. La paleta está copiada de src/constants/theme.ts (la app es solo
 * oscura, el sitio también). No hay nada que sincronice las dos cosas: si cambia el tema
 * de la app, actualizar estas variables a mano.
 */
:root {
  --bg: #0b1220;
  --scene: #070d18;
  --surface: #141d2e;
  --surface-2: #1d2940;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f7fb;
  --text-2: #94a3b8;
  --muted: #64748b;
  --accent: #38bdf8;
  --accent-deep: #0ea5e9;
  --bone: #efe7d6;
  --gold: #e6c34c;
  --radius: 14px;
  --radius-lg: 20px;
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--accent); color: #06121f; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }

/* Marcadores sin completar (entre llaves dobles): bien visibles para que no se publiquen sin querer. */
.todo { background: #fde047; color: #1a1a00; padding: 0 4px; border-radius: 4px; font-weight: 700; }

/* --- Barra superior --- */
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(11, 18, 32, 0.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.topbar nav { display: flex; gap: 20px; font-size: 15px; }
.topbar nav a { color: var(--text-2); font-weight: 600; }
.topbar nav a:hover, .topbar nav a[aria-current='page'] { color: var(--text); text-decoration: none; }
@media (max-width: 560px) { .topbar nav .optional { display: none; } }

/* Selector de idioma (ES · EN · PT). */
.topbar nav { align-items: center; }
.lang { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: rgba(20, 29, 46, 0.6); }
.topbar nav .lang a { padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); }
.topbar nav .lang a:hover { color: var(--text); }
.topbar nav .lang a[aria-current] { background: var(--surface-2); color: var(--text); }
/* En teléfonos, arriba quedan solo la marca y el idioma (Soporte sigue en el pie). */
@media (max-width: 440px) { .topbar nav > a { display: none; } }
@media (max-width: 340px) { .topbar nav .lang a { padding: 3px 7px; } }

/* --- Hero --- */
.hero { position: relative; overflow: hidden; padding: 56px 0 24px; }
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto auto;
  width: 900px;
  height: 900px;
  background: radial-gradient(closest-side, rgba(56, 189, 248, 0.16), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero { padding: 72px 0 40px; } .hero .wrap { grid-template-columns: 1fr 1.05fr; } }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.hero h1 { font-size: clamp(36px, 6.4vw, 60px); font-weight: 850; }
.hero h1 em { font-style: normal; color: var(--bone); }
.lede { color: var(--text-2); font-size: clamp(17px, 2.2vw, 19px); margin-top: 18px; max-width: 34em; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; min-height: 52px;
  border-radius: 12px; background: var(--text); color: #06121f;
  font-weight: 800; font-size: 17px; line-height: 1.1;
}
.store-btn:hover { text-decoration: none; filter: brightness(0.94); }
.store-btn svg { width: 26px; height: 26px; flex: none; }
.store-btn small { display: block; font-size: 11px; font-weight: 600; opacity: 0.75; }
.store-btn[data-pending] { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); cursor: default; filter: none; }
.stores-note { color: var(--muted); font-size: 14px; margin-top: 14px; }

/* Las cuatro capas del cuerpo entero, una al lado de la otra. Los renders comparten
   encuadre y tienen aire a los costados: se agrandan y se superponen esos márgenes. */
.lineup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; align-items: end; }
.lineup figure { margin: 0; text-align: center; min-width: 0; }
.lineup img { width: 136%; max-width: none; margin-left: -18%; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.lineup figcaption { margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
@media (max-width: 480px) { .lineup figcaption { font-size: 11px; } .lineup figcaption::before { width: 6px; height: 6px; margin-right: 4px; } }
.lineup figcaption::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: var(--dot, var(--accent)); }

/* --- Secciones --- */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 40px); font-weight: 820; }
.section-head p { color: var(--text-2); margin-top: 14px; font-size: 17px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
@media (min-width: 720px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-size: 28px; font-weight: 850; letter-spacing: -0.02em; color: var(--bone); }
.stat span { color: var(--text-2); font-size: 14px; }

.features { display: grid; gap: 14px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.feature .ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(56, 189, 248, 0.12); color: var(--accent); margin-bottom: 16px; }
.feature .ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 18px; font-weight: 800; }
.feature p { color: var(--text-2); margin-top: 8px; font-size: 15px; }

/* Primeros planos (render + texto), alternando lados. */
.spotlight { display: grid; gap: 28px; align-items: center; }
.spotlight + .spotlight { margin-top: 64px; }
@media (min-width: 860px) {
  .spotlight { grid-template-columns: 1fr 1fr; gap: 56px; }
  .spotlight.flip .spot-art { order: 2; }
}
.spot-art { background: radial-gradient(closest-side, rgba(56, 189, 248, 0.10), transparent 75%); border-radius: var(--radius-lg); padding: 12px; }
.spot-art img { margin: 0 auto; width: 100%; max-width: 360px; height: auto; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5)); }
.spotlight h3 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 820; }
.spotlight p { color: var(--text-2); margin-top: 14px; font-size: 17px; }
.spotlight ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.spotlight li { position: relative; padding-left: 22px; color: var(--text); font-size: 15px; }
.spotlight li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Capturas: marco de teléfono en CSS, fila con scroll horizontal en pantallas chicas. */
.shots { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin: 0 -4px; }
.shot { flex: 0 0 auto; width: min(62vw, 240px); scroll-snap-align: center; margin: 0; }
.phone { position: relative; aspect-ratio: 1080 / 2340; border-radius: 34px; padding: 8px; background: #1b2232; border: 1px solid rgba(255, 255, 255, 0.12); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45); }
.phone img { width: 100%; height: 100%; border-radius: 27px; object-fit: cover; background: var(--scene); }
.shot figcaption { margin-top: 12px; text-align: center; color: var(--text-2); font-size: 14px; font-weight: 600; }

/* Bloque de privacidad y cierre. */
.band { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; display: grid; gap: 18px; align-items: center; }
@media (min-width: 860px) { .band { grid-template-columns: auto 1fr; padding: 36px 40px; gap: 28px; } }
.band .ico { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: rgba(52, 211, 153, 0.12); color: #34d399; }
.band .ico svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.band h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 820; }
.band p { color: var(--text-2); margin-top: 8px; }

.closing { text-align: center; }
.closing .stores { justify-content: center; }
.closing h2 { font-size: clamp(28px, 4.2vw, 40px); font-weight: 820; }
.closing p { color: var(--text-2); margin-top: 12px; font-size: 17px; }

/* --- Páginas de texto (privacidad, soporte, créditos) --- */
.doc { padding: 48px 0 72px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 850; }
.doc .updated { color: var(--muted); font-size: 14px; margin-top: 10px; }
.doc h2 { font-size: 21px; font-weight: 800; margin-top: 40px; }
.doc h3 { font-size: 17px; font-weight: 800; margin-top: 24px; }
.doc p, .doc li { color: var(--text-2); margin-top: 12px; }
.doc ul { padding-left: 22px; margin: 0; }
.doc strong { color: var(--text); }
.doc .summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-top: 24px; }
.doc .summary p:first-child { margin-top: 0; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 18px; margin-top: 10px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 700; color: var(--text); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--muted); font-weight: 800; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 0 0 16px; }
.credit { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-top: 14px; }
.credit h3 { margin-top: 0; }
.credit .links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 14px; font-weight: 700; }

/* --- Pie --- */
footer { border-top: 1px solid var(--border); padding: 32px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: grid; gap: 14px; }
footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
footer nav a { color: var(--text-2); font-weight: 600; }
footer .disclaimer { max-width: 60em; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
