/*
  Manual de usuario de la app móvil.
  Se carga después de ../styles.css y reutiliza sus variables, la cabecera,
  los botones, las insignias de tiendas y el pie. Todo lo propio del manual
  usa el prefijo "m-".
*/

:root {
  --m-phone-bezel: #151515;
  --m-soft: #efede7;
  --m-orange-soft: #fff1e7;
  --m-ok-bg: #e4f4ec;
  --m-ok-text: #0f5a3a;
  --m-warn-bg: #fff6e3;
  --m-warn-line: #efcf8c;
  --m-warn-text: #6b4800;
}

html {
  scroll-padding-top: 96px;
}

/* ---------- Phone frame ---------- */

.m-phone {
  position: relative;
  overflow: hidden;
  padding: 9px;
  border-radius: 38px;
  background: var(--m-phone-bezel);
  box-shadow:
    0 30px 60px -28px rgba(21, 21, 21, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}
.m-phone img {
  width: 100%;
  height: auto;
  border-radius: 30px;
  background: #f4f5f7;
}
/* Long screens scroll inside the frame, keeping the phone proportion. */
.m-phone.m-scroll {
  aspect-ratio: 798 / 1706;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.m-phone.m-scroll::-webkit-scrollbar {
  display: none;
}
.m-phone.m-scroll:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
.m-phone.m-scroll::after {
  content: "Desliza ↓";
  position: sticky;
  bottom: 10px;
  display: block;
  width: max-content;
  margin: -34px auto 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.78);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}

.m-shot {
  margin: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}
.m-shot figcaption {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
  text-align: center;
}
.m-shot figcaption b {
  display: block;
  color: var(--ink);
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.95rem;
}

/* ---------- Hero ---------- */

.m-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 72px;
}
.m-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 56px;
}
.m-hero-copy > p {
  max-width: 560px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.15rem;
}
.m-hero-copy h1 {
  font-size: clamp(3rem, 6vw, 5.4rem);
}
.m-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.m-hero-facts li {
  display: grid;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}
.m-hero-facts b {
  color: var(--ink);
  font-size: 0.92rem;
}
.m-hero-stage {
  position: relative;
  display: grid;
  justify-items: center;
}
.m-hero-stage .ring-one {
  right: -40px;
  top: 10px;
}
.m-hero-stage .ring-two {
  right: 40px;
  top: 90px;
}
.m-phone-hero {
  position: relative;
  z-index: 2;
  width: min(320px, 78vw);
  margin: 0;
  transform: rotate(-2deg);
}
.m-float {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(21, 21, 21, 0.35);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
.m-float-top {
  top: 34%;
  left: -6%;
}
.m-float-bottom {
  bottom: 110px;
  right: -2%;
}
.m-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 23, 0.15);
}
.m-dot-green {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(30, 157, 101, 0.15);
}

/* ---------- Day route ---------- */

.m-day {
  padding: 56px 0;
  border-block: 1px solid var(--line);
  background: #fff;
}
.m-day .section-index {
  margin-bottom: 26px;
  color: var(--orange);
}
.m-day-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: day;
}
.m-day-steps::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 22px;
  right: 10%;
  border-top: 2px dashed rgba(255, 107, 23, 0.45);
}
.m-day-steps li {
  position: relative;
  counter-increment: day;
}
.m-day-steps a {
  display: grid;
  gap: 4px;
}
.m-day-steps a::before {
  content: counter(day);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border: 2px solid var(--orange);
  border-radius: 50%;
  background: #fff;
  color: var(--orange-dark);
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 800;
  transition:
    background 0.2s,
    color 0.2s;
}
.m-day-steps a:hover::before {
  background: var(--orange);
  color: #fff;
}
.m-day-steps b {
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1.05rem;
}
.m-day-steps span {
  color: var(--muted);
  font-size: 0.88rem;
}
.m-terms {
  max-width: 820px;
  margin: 40px 0 0;
  padding: 16px 20px;
  border-left: 3px solid var(--blue);
  border-radius: 0 12px 12px 0;
  background: #eef2fd;
  color: #2b3f80;
  font-size: 0.95rem;
}
.m-terms em {
  font-style: normal;
  font-weight: 700;
}

/* ---------- Chapters ---------- */

.m-chapter {
  padding: 110px 0;
}
.m-alt {
  border-block: 1px solid var(--line);
  background: var(--m-soft);
}
.m-chapter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 72px;
}
.m-flip .m-copy {
  order: 2;
}
.m-copy {
  position: sticky;
  top: 110px;
}
.m-chapter h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}
.m-chapter h3 {
  margin: 34px 0 14px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.m-lead {
  max-width: 560px;
  margin: 22px 0 30px;
  color: var(--muted);
  font-size: 1.1rem;
}
.m-copy > p:not(.m-lead):not(.section-index) {
  max-width: 560px;
  color: #3d3d3d;
}

.m-steps,
.m-list {
  display: grid;
  gap: 12px;
  max-width: 580px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.m-steps {
  counter-reset: step;
}
.m-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  color: #3d3d3d;
}
.m-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--m-orange-soft);
  color: var(--orange-dark);
  font-family: Manrope, system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
}
.m-list li {
  position: relative;
  padding-left: 26px;
  color: #3d3d3d;
}
.m-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--orange);
  transform: rotate(45deg);
}
.m-ui {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 0.9em;
  font-weight: 700;
  white-space: nowrap;
}
.m-ui-orange {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}
.m-ui-red {
  border-color: #dc3d4b;
  background: #dc3d4b;
  color: #fff;
}

.m-tabs {
  display: grid;
  gap: 0;
  max-width: 580px;
  margin: 0;
  border-top: 1px solid var(--line);
}
.m-tabs div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.m-tabs dt {
  font-family: Manrope, system-ui, sans-serif;
  font-weight: 800;
}
.m-tabs dd {
  margin: 0;
  color: var(--muted);
}

.m-note {
  max-width: 580px;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 0.95rem;
}
.m-note strong {
  display: block;
}
.m-note-ok {
  background: var(--m-ok-bg);
  color: var(--m-ok-text);
}
.m-note-warn {
  border: 1px solid var(--m-warn-line);
  background: var(--m-warn-bg);
  color: var(--m-warn-text);
}

/* Screens beside the copy */
.m-screens {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  max-width: 600px;
  justify-self: center;
  width: 100%;
}
.m-screens-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 660px;
}
.m-screens-3 .m-phone {
  padding: 7px;
  border-radius: 28px;
}
.m-screens-3 .m-phone img {
  border-radius: 22px;
}
.m-screens-1 {
  grid-template-columns: minmax(0, 300px);
  justify-content: center;
}
/* Second screen sits a little lower, like a staged product shot. */
.m-screens:not(.m-screens-1) .m-shot:nth-child(2) {
  margin-top: 48px;
}

/* ---------- Wide sections ---------- */

.m-wide-head {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: end;
  gap: 40px;
  margin-bottom: 64px;
}
.m-wide-head .m-lead {
  margin: 0 0 6px;
}

.m-dark {
  background: var(--ink);
  color: #fff;
}
.m-dark .m-lead {
  color: #a9a9a9;
}
.m-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.m-flow .m-phone {
  max-width: 280px;
  margin-inline: auto;
  background: #000;
  box-shadow:
    0 30px 60px -28px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}
.m-flow h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 10px;
  font-size: 1.2rem;
}
.m-flow h3 span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  font-size: 0.95rem;
}
.m-flow p {
  margin: 0;
  color: #b9b9b9;
}
.m-flow b {
  color: #fff;
}
.m-dark-note {
  max-width: 760px;
  margin: 56px 0 0;
  padding: 18px 22px;
  border: 1px solid #343434;
  border-radius: 14px;
  color: #b9b9b9;
}
.m-dark-note strong,
.m-dark-note b {
  color: #fff;
}

.m-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.m-card {
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
}
.m-card .m-phone {
  max-width: 230px;
  margin: 0 auto 26px;
}
.m-card h3 {
  margin: 0 0 8px;
}
.m-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- FAQ ---------- */

.m-faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: start;
}
.m-faq details {
  border-bottom: 1px solid var(--line);
}
.m-faq details:first-child {
  border-top: 1px solid var(--line);
}
.m-faq summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  list-style: none;
}
.m-faq summary::-webkit-details-marker {
  display: none;
}
.m-faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  color: var(--orange-dark);
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s;
}
.m-faq details[open] summary::after {
  transform: rotate(45deg);
}
.m-faq summary:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
  border-radius: 6px;
}
.m-faq p {
  max-width: 620px;
  margin: -6px 0 22px;
  color: var(--muted);
}

/* ---------- Download CTA ---------- */

.m-cta {
  padding: 100px 0;
}
.m-cta-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 56px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 107, 23, 0.35), transparent 50%),
    var(--ink);
  color: #fff;
}
.m-cta-card h2 {
  font-size: clamp(2rem, 3.6vw, 3.2rem);
}
.m-cta-card p:not(.section-index) {
  margin: 16px 0 0;
  color: #b9b9b9;
}
.m-cta-card .store-badge {
  border-color: #444;
  background: #000;
}

/* ---------- Responsive ---------- */

@media (max-width: 1060px) {
  .m-hero-grid,
  .m-chapter-grid,
  .m-faq-grid,
  .m-wide-head {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .m-flip .m-copy {
    order: 0;
  }
  .m-copy {
    position: static;
  }
  .m-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .m-flow {
    gap: 28px;
  }
}

@media (max-width: 820px) {
  .m-hero {
    padding: 60px 0 56px;
  }
  .m-chapter {
    padding: 80px 0;
  }
  .m-day-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .m-day-steps::before {
    top: 22px;
    bottom: 22px;
    left: 21px;
    right: auto;
    border-top: 0;
    border-left: 2px dashed rgba(255, 107, 23, 0.45);
  }
  .m-day-steps a {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
  }
  .m-day-steps a::before {
    grid-row: span 2;
    margin: 0;
  }
  /* Screens and steps become swipeable rails. */
  .m-screens,
  .m-screens-3,
  .m-flow,
  .m-cards {
    display: flex;
    gap: 18px;
    max-width: none;
    margin-inline: -16px;
    padding: 6px 16px 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }
  .m-screens .m-shot,
  .m-flow li,
  .m-cards .m-card {
    flex: 0 0 min(250px, 72vw);
    scroll-snap-align: start;
  }
  .m-screens:not(.m-screens-1) .m-shot:nth-child(2) {
    margin-top: 0;
  }
  .m-screens-1 {
    justify-content: flex-start;
  }
  .m-cards .m-card {
    flex-basis: min(290px, 82vw);
  }
  .m-cta-card {
    padding: 36px 24px;
  }
  .m-float-top {
    left: 0;
  }
  .m-float-bottom {
    right: 0;
  }
}

@media (max-width: 560px) {
  .m-tabs div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .m-hero-facts li {
    flex: 1 1 140px;
  }
  .m-float {
    font-size: 0.74rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-phone-hero {
    transform: none;
  }
  .m-faq summary::after {
    transition: none;
  }
}

.nav-links a[aria-current] {
  color: var(--orange);
}
