/* Página /app/: descarga de la app. Usa los tokens de /subpages.css.
   La vista (elegir | android | iphone) la pone el script de <head> en html[data-view]. */

.view-elegir, .view-android, .view-iphone { display: none; }
html[data-view="elegir"] .view-elegir,
html[data-view="android"] .view-android,
html[data-view="iphone"] .view-iphone { display: revert; }
html:not([data-view]) .view-elegir { display: revert; }
html[data-view="elegir"] .os-choice { display: grid; }
html[data-view="android"] .big-steps.view-android,
html[data-view="iphone"] .big-steps.view-iphone { display: flex; }

.app-head { padding-bottom: 56px; }
.app-main { padding: 48px 0 88px; }

/* ── Elegir sistema ── */
.os-choice { grid-template-columns: 1fr 1fr; gap: 16px; }
.os-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 20px 30px;
  border-radius: var(--radius-xl);
  background: #000;
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.os-tile:hover { background: #1a1a1a; transform: translateY(-2px); }
.os-tile:active { transform: scale(0.98); }
.os-tile svg { width: 44px; height: 44px; margin-bottom: 8px; }
.os-tile strong { font-family: "Sora", sans-serif; font-size: 1.6rem; letter-spacing: -0.03em; }
.os-tile span { font-size: 0.92rem; color: rgba(255, 255, 255, 0.75); }

/* ── Pasos grandes ── */
.big-steps { list-style: none; flex-direction: column; gap: 16px; }

.big-step {
  display: flex;
  gap: 20px;
  padding: 26px 26px 28px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line), 0 10px 28px -16px rgba(6, 34, 92, 0.3);
  transition: box-shadow 250ms ease, opacity 250ms ease;
}
.big-step.is-current { box-shadow: inset 0 0 0 2px var(--primary), 0 22px 44px -18px rgba(11, 79, 192, 0.45); }
.big-step.is-done { opacity: 0.6; }

.step-num {
  position: relative;
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
}
.big-step.is-current .step-num { background: var(--primary); color: #fff; }
.step-num svg { display: none; width: 28px; height: 28px; }
.big-step.is-done .step-num { background: var(--wa-green); color: #fff; }
.big-step.is-done .step-num span { display: none; }
.big-step.is-done .step-num svg { display: block; }

.step-body { flex: 1; min-width: 0; padding-top: 4px; }
.step-body h2 { font-size: 1.4rem; line-height: 1.2; margin-bottom: 8px; }
.step-body p { color: var(--ink-soft); line-height: 1.6; }
.step-body strong { color: var(--ink); }

.step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  margin-top: 18px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 12px 26px -10px rgba(11, 79, 192, 0.6);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.step-btn:hover { background: var(--primary-700); }
.step-btn:active { transform: scale(0.97); }
.step-btn svg { width: 22px; height: 22px; flex: none; }
.step-btn.store { background: #000; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, 0.6); }
.step-btn.store:hover { background: #1a1a1a; }
.big-step.is-done .step-btn { background: var(--tint); color: var(--primary); box-shadow: inset 0 0 0 1px var(--line); }

.step-help { margin-top: 18px; font-size: 0.9rem; line-height: 1.6; color: var(--muted); }

.switch-os { margin-top: 28px; text-align: center; }
.switch-os a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(11, 79, 192, 0.35);
  text-underline-offset: 3px;
}
html[data-view="elegir"] .switch-os { display: none; }

@media (max-width: 720px) {
  .app-main { padding: 28px 0 64px; }
  .os-choice { grid-template-columns: 1fr; }
  .os-tile { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 22px 22px; text-align: left; }
  .os-tile svg { width: 34px; height: 34px; margin: 0; }
  .os-tile span { margin-left: auto; }
  .big-step { flex-direction: column; gap: 14px; padding: 22px 20px 24px; }
  .step-num { width: 48px; height: 48px; font-size: 1.35rem; }
  .step-btn { display: flex; width: 100%; }
}
