/* La balanza de obsidiana y oro — paleta canónica en
   maatis-mobile/src/theme/tokens.ts (§5.3 del plano de `maatis`). */
:root {
  --background: #0D1220;
  --surface: #171E30;
  --surface-raised: #1C2438;
  --dashed-border: #2A3450;
  --text-primary: #F2F1EA;
  --text-secondary: #9AA2B5;
  --text-muted: #6B7385;
  --gold: #D9B45B;
  --positive: #2FBF9B;
  --negative: #E66A5C;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { color-scheme: dark; scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.num { font-variant-numeric: tabular-nums; }

a { color: inherit; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- cabecera ---------- */

/* Patrón Expo: logo y navegación juntos a la izquierda, píldoras a la
   derecha (una fantasma, una sólida clara). */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 36px;
  min-width: 0;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
}

.wordmark svg { display: block; }

.nav-main { display: flex; align-items: center; gap: 26px; }

.nav-main a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14.5px;
}

.nav-main a:hover { color: var(--text-primary); }

.header-right { display: flex; align-items: center; gap: 10px; }

.pill-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.pill-btn.ghost {
  border: 1px solid var(--dashed-border);
  color: var(--text-primary);
}

.pill-btn.ghost:hover { border-color: var(--text-muted); }

.pill-btn.solid {
  background: var(--text-primary);
  color: var(--background);
}

.pill-btn.solid:hover { background: #fff; }

/* ---------- héroe a tres columnas ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr minmax(360px, 540px) 0.95fr;
  align-items: center;
  gap: 24px;
  padding: 20px 0 8px;
  min-height: 440px;
}

.hero h1 {
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-ctas {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--background);
}

.btn-primary:hover { background: #fff; }

/* Espacio reservado: botón/QR de Google Play cuando la app esté publicada. */
.btn-ghost {
  border: 1px dashed var(--dashed-border);
  color: var(--text-muted);
  font-weight: 500;
}

/* el ícono irradiando */

.hero-burst {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 480px;
}

.hero-burst svg.burst {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 100%;
  max-width: 560px;
  height: auto;
  animation: burst-spin 240s linear infinite;
  transform-origin: 50% 50%;
  transition: filter 0.5s ease;
}

/* al pasar el puntero, el estallido se enciende */
.hero-burst:hover svg.burst { filter: brightness(1.5); }

/* el estallido respira: giro imperceptible + parpadeo desfasado por grupos */
.burst .g1 { animation: twinkle 3.4s ease-in-out infinite; }
.burst .g2 { animation: twinkle 4.6s ease-in-out 1.1s infinite; }
.burst .g3 { animation: twinkle 5.8s ease-in-out 2.3s infinite; }

@keyframes burst-spin {
  to { transform: rotate(360deg); }
}

@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-burst svg.burst,
  .burst g,
  .app-icon::before { animation: none; }
}

.app-icon {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 34px;
  background: linear-gradient(160deg, #232E4E, var(--surface));
  border: 1px solid rgba(217, 180, 91, 0.30);
  display: grid;
  place-items: center;
  box-shadow:
    inset 0 1px 0 rgba(242, 241, 234, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.55);
  transition: transform 0.35s ease, border-color 0.35s ease,
    box-shadow 0.35s ease;
}

/* halo dorado que respira detrás del ícono */
.app-icon::before {
  content: "";
  position: absolute;
  inset: -46%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(217, 180, 91, 0.16), transparent 72%);
  z-index: -1;
  animation: halo 5.5s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes halo {
  from { opacity: 0.55; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1.06); }
}

.app-icon:hover {
  transform: translateY(-5px) scale(1.03);
  border-color: rgba(217, 180, 91, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(242, 241, 234, 0.1),
    0 0 44px rgba(217, 180, 91, 0.22),
    0 28px 80px rgba(0, 0, 0, 0.6);
}

/* la columna derecha */

.hero-aside { max-width: 300px; justify-self: end; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--dashed-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.pill .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-aside p {
  margin-top: 16px;
  font-size: 16px;
  color: var(--text-secondary);
}

/* ---------- tira monoespaciada + fichas ---------- */

.strip {
  text-align: center;
  padding: 40px 0 72px;
}

.strip .caption {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.strip .tiles {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tile {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--dashed-border);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.tile.gold { color: var(--gold); border-color: rgba(217, 180, 91, 0.35); }

/* las fichas flotan en cascada: misma onda, cada una con su desfase */
.tiles .tile { animation: tile-float 4.8s ease-in-out infinite; }
.tiles .tile:nth-child(2n) { animation-duration: 5.6s; }
.tiles .tile:nth-child(1)  { animation-delay: 0s; }
.tiles .tile:nth-child(2)  { animation-delay: 0.4s; }
.tiles .tile:nth-child(3)  { animation-delay: 0.8s; }
.tiles .tile:nth-child(4)  { animation-delay: 1.2s; }
.tiles .tile:nth-child(5)  { animation-delay: 1.6s; }
.tiles .tile:nth-child(6)  { animation-delay: 2.0s; }
.tiles .tile:nth-child(7)  { animation-delay: 2.4s; }
.tiles .tile:nth-child(8)  { animation-delay: 2.8s; }
.tiles .tile:nth-child(9)  { animation-delay: 3.2s; }
.tiles .tile:nth-child(10) { animation-delay: 3.6s; }

@keyframes tile-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

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

/* ---------- sección grande: la balanza por dentro ---------- */

.blocks {
  background: var(--surface);
  border: 1px solid var(--dashed-border);
  border-radius: 28px;
  padding: clamp(32px, 5vw, 64px);
  margin-bottom: 88px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.blocks h2 {
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.blocks h2 em { font-style: normal; color: var(--gold); }

.block-list { margin-top: 40px; display: grid; gap: 26px; }

.block-item { border-left: 2px solid var(--dashed-border); padding-left: 20px; }

.block-item h3 {
  font-size: 24px;
  font-weight: 650;
  color: var(--text-muted);
  line-height: 1.2;
}

.block-item p {
  margin-top: 4px;
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 44ch;
}

.block-item.active { border-left-color: var(--gold); }
.block-item.active h3 { color: var(--text-primary); }

/* ---------- lámina del teléfono ---------- */

.phone {
  background: var(--background);
  border: 1px solid var(--dashed-border);
  border-radius: 34px;
  padding: 18px 16px 22px;
  max-width: 340px;
  margin: 0 auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.phone .notch {
  width: 92px; height: 5px;
  border-radius: 3px;
  background: var(--dashed-border);
  margin: 0 auto 20px;
}

.phone .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.phone .total {
  font-size: 30px;
  font-weight: 700;
  color: var(--gold);
  margin-top: 2px;
}

.phone .total small { font-size: 15px; font-weight: 600; }

.phone .total-usd {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.phone .rows { margin-top: 18px; display: grid; gap: 8px; }

.asset-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface-raised);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 13.5px;
}

.asset-row .name { color: var(--text-primary); font-weight: 600; }
.asset-row .sub { color: var(--text-muted); font-size: 11.5px; display: block; }
.asset-row .value { text-align: right; }
.asset-row .delta { display: block; font-size: 11.5px; }
.up { color: var(--positive); }
.down { color: var(--negative); }

/* ---------- página de cambios ---------- */

.page {
  padding: 64px 0 96px;
  max-width: 720px;
}

.page h1 { font-size: 34px; margin-bottom: 10px; }
.page .intro { color: var(--text-secondary); margin-bottom: 40px; }

.release { border-top: 1px solid var(--dashed-border); padding: 28px 0; }
.release h2 { font-size: 19px; }
.release h2 .version { color: var(--gold); }
.release time { color: var(--text-muted); font-size: 14px; }
.release ul { margin-top: 12px; padding-left: 22px; color: var(--text-secondary); }
.release li { margin: 6px 0; }

.empty-note {
  border: 1px dashed var(--dashed-border);
  border-radius: 12px;
  padding: 20px 24px;
  color: var(--text-muted);
}

/* ---------- pie (patrón Expo: marca + columnas + línea final) ---------- */

.site-footer {
  border-top: 1px solid var(--dashed-border);
  padding: 56px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
}

.footer-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(160deg, #202A44, var(--surface));
  border: 1px solid var(--dashed-border);
  display: grid;
  place-items: center;
}

.footer-brand p {
  margin-top: 14px;
  color: var(--text-secondary);
  max-width: 26ch;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-col h3 {
  font-size: 14px;
  font-weight: 650;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.footer-col a { color: var(--text-secondary); text-decoration: none; }
.footer-col a:hover { color: var(--text-primary); }
.footer-col .soon { color: var(--text-muted); font-size: 13.5px; }

.footer-bottom {
  border-top: 1px solid var(--dashed-border);
  margin-top: 48px;
  padding-top: 22px;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ---------- tableta: las columnas se apilan ---------- */

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 8px;
    gap: 0;
    min-height: 0;
  }
  .hero-burst { order: -1; min-height: 380px; }
  .hero-copy h1 { margin-top: -20px; }
  .hero-ctas { justify-content: center; }
  .hero-aside { justify-self: center; margin-top: 26px; max-width: 420px; }
  .blocks { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- teléfono: menos aire, todo al alcance del pulgar ---------- */

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }

  /* En teléfono la cabecera se reduce a lo esencial: logo y CTA sólida.
     Los links viven también en el pie, que sí cabe. */
  .header-inner { padding: 14px 0; }
  .nav-main, .pill-btn.ghost { display: none; }
  .pill-btn.solid { padding: 8px 15px; font-size: 13.5px; }

  /* El estallido pierde protagonismo: en una pantalla chica, 380px de
     ceremonia empujan el titular fuera del primer vistazo. */
  .hero-burst { min-height: 0; padding: 8px 0 20px; }
  .hero-burst svg.burst { max-width: 360px; }
  .app-icon { width: 108px; height: 108px; border-radius: 26px; }
  .app-icon svg { width: 62px; height: 62px; }

  .hero-copy h1 { margin-top: 0; }
  .hero h1 { font-size: 30px; }

  /* Botones de dedo, no de cursor: anchos, apilados, con la misma caja. */
  .hero-ctas { margin-top: 22px; flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; padding: 13px 22px; }

  .hero-aside { margin-top: 22px; }
  .hero-aside p { font-size: 15px; }

  .strip { padding: 28px 0 52px; }

  .blocks {
    border-radius: 20px;
    padding: 26px 20px;
    gap: 32px;
    margin-bottom: 56px;
  }
  .blocks h2 { font-size: 28px; }
  .block-list { margin-top: 26px; gap: 20px; }
  .block-item { padding-left: 16px; }
  .block-item h3 { font-size: 19px; }
  .block-item p { font-size: 14.5px; }

  .phone { max-width: 100%; padding: 16px 14px 18px; }

  .page { padding: 40px 0 64px; }
  .page h1 { font-size: 28px; }

  .site-footer { padding: 40px 0 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { margin-top: 36px; }
}

/* ---------- pantalla grande: el lienzo respira a lo ancho ---------- */

@media (min-width: 1600px) {
  .wrap { max-width: 1320px; }

  .hero { min-height: 520px; }
  .hero h1 { font-size: 50px; }
  .hero-burst { min-height: 520px; }
  .hero-burst svg.burst { max-width: 620px; }
  .app-icon { width: 164px; height: 164px; border-radius: 38px; }
  .app-icon svg { width: 92px; height: 92px; }
  .hero-aside { max-width: 330px; }
  .hero-aside p { font-size: 17px; }

  .tile { width: 56px; height: 56px; border-radius: 14px; font-size: 11px; }

  .blocks { padding: 68px; }
}
