/* Precios. El precio vive dentro de la frase, en la isla de Monet; los planes se anotan como movimientos; lo demás
   son marcas: una tabla de vistos y preguntas que se abren. */

.price-page {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --sky: #dde6f4;
  --pond: #b9bff5;
  --pond-ink: #14161a;
  --isle: #0b0c10;
  --accent-ink: #ffffff;
  --axis: 34%;
  --t-hero: clamp(2.125rem, 10.4vw, 8rem);
  --t-sec: clamp(2.375rem, 4.8vw, 4.25rem);
  --t-sub: clamp(1.5rem, 2.5vw, 2.25rem);
  --t-lede: 1.25rem;
  background-image: none;
}

@media (prefers-color-scheme: dark) {
  .price-page {
    --sky: #0f1d22;
    --pond: #23224b;
    --pond-ink: #f4f5f7;
              --accent-ink: #0b0c10;
  }
}

.price-page ::selection {
  background: var(--lila);
  color: #14161a;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.mo-body {
  fill: url(#mo-body);
  stroke: rgb(255 255 255 / 0.55);
  stroke-width: 1.2;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px; /* taste-skill-ignore: texto solo para lectores de pantalla, no es una línea */
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

:where(.price-page main) :is(h2, h3) {
  margin: 0;
}

/* ---------- Héroe: cielo arriba, estanque abajo; la frase cruza la orilla ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: var(--sky);
  padding-top: max(6.75rem, calc(46svh - var(--t-hero) * 0.98));
}

@media (max-width: 720px) {
  .hero {
    padding-top: max(6.5rem, calc(38svh - var(--t-hero) * 0.98));
  }
}

.hero {
  padding-bottom: clamp(4.5rem, 9vw, 7.5rem);
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-title {
  margin: 0;
  font-weight: 700;
  font-size: var(--t-hero);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero-title .line {
  display: block;
  white-space: nowrap;
}

.line-pond {
  position: relative;
  padding-top: 0.04em;
  color: var(--pond-ink);
}

/* El estanque: empieza justo donde empieza la segunda línea y baja hasta el final del héroe. */
.line-pond::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: -100vw;
  right: -100vw;
  height: 400vh;
  background: var(--pond);
}

/* La isla de Monet, del alto de una línea, con Mo y el precio dentro. */
.isle {
  display: inline-flex;
  align-items: center;
  gap: 0.1em;
  height: 0.9em;
  margin-inline: 0.02em 0.06em;
  padding: 0 0.3em 0 0.09em;
  border-radius: 999px;
  background: var(--isle);
  color: #f4f5f7;
  vertical-align: -0.07em;
  letter-spacing: -0.035em;
}

.isle-mo {
  flex: none;
  width: 0.72em;
  height: 0.72em;
}

.isle-price {
  font-size: 0.72em;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hero-foot {
  display: grid;
  gap: 2rem;
  margin-top: clamp(2rem, 4vw, 3.25rem);
  color: var(--pond-ink);
}

@media (min-width: 900px) {
  .hero-foot {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: 3rem;
  }
}

.hero-lede {
  max-width: 34rem;
  margin: 0;
  font-size: var(--t-lede);
  line-height: 1.45;
}

.hero-note {
  max-width: 34rem;
  margin: 1rem 0 0;
  font-size: 1rem;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-actions {
    flex-direction: column;
    align-items: flex-end;
  }
}

/* Píldora de acción de la app: tinta, alto 56, con círculo y flecha al final. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 56px;
  padding: 0 0.5rem 0 1.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  transition: scale 0.16s var(--ease-out), background-color 0.2s ease;
}

.pill-arrow {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
  transition: translate 0.25s var(--ease-out);
}

.pill-arrow::before,
.pill-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
}

.pill-arrow::before {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  translate: -55% -50%;
}

.pill-arrow::after {
  width: 8px;
  height: 8px;
  border: solid var(--ink);
  border-width: 2px 2px 0 0;
  translate: -15% -50%;
  rotate: 45deg;
}

.pill:hover .pill-arrow {
  translate: 3px 0;
}

.pill:active {
  scale: 0.97;
}

.pill:focus-visible {
  border-radius: 999px;
}

.pill-accent {
  background: var(--accent);
  color: var(--accent-ink);
}

.pill-accent .pill-arrow {
  background: var(--accent-ink);
}

.pill-accent .pill-arrow::before {
  background: var(--accent);
}

.pill-accent .pill-arrow::after {
  border-color: var(--accent);
}

/* El estado de la beta, como la cápsula de la barra flotante de Inicio: dice, no se toca. */
.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 56px;
  margin: 0;
  padding: 0.4rem 1.25rem 0.4rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 62%, transparent);
  font-size: 1rem;
  line-height: 1.25;
}

.status-text {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.6rem;
}

@media (max-width: 520px) {
  .status-text {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-dot {
    display: none;
  }
}

.status strong {
  font-weight: 600;
}

.status-mo {
  flex: none;
  width: 40px;
  height: 40px;
}

.status-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

/* ---------- Lo que cuesta: los planes, anotados como movimientos ---------- */

.ledger {
  padding-block: clamp(6rem, 12vw, 10rem);
}

.ledger-grid {
  display: grid;
  grid-template-areas: "head" "list" "bill";
  gap: 3rem;
}

@media (min-width: 960px) {
  .ledger-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "head list" "bill list";
    column-gap: clamp(3rem, 6vw, 6rem);
    row-gap: 3rem;
  }
}

.ledger-head {
  grid-area: head;
}

.ledger-list {
  grid-area: list;
  align-self: start;
}

.billing {
  grid-area: bill;
  align-self: end;
}

.ledger-head h2,
.compare h2,
.faq-title {
  font-weight: 700;
  font-size: var(--t-sec);
  line-height: 1;
  letter-spacing: -0.04em;
}

.ledger-list {
  padding: clamp(0.5rem, 2vw, 1.25rem) clamp(1.25rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2.25rem);
  border-radius: var(--radius-card);
  background: var(--card);
}

.ledger-group {
  padding-top: clamp(1.25rem, 2.4vw, 2rem);
}

.ledger-day {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-soft);
}

.ledger-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  column-gap: 1rem;
  row-gap: 0.4rem;
  align-items: center;
  padding-top: 1rem;
}

.entry + .entry {
  padding-top: 1.75rem;
}

.entry-mo {
  width: 52px;
  height: 52px;
}

.entry-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.entry-name {
  font-size: var(--t-lede);
  font-weight: 500;
  line-height: 1.25;
}

.entry-meta {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.entry-amount {
  font-size: var(--t-sub);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cents {
  color: var(--ink-faint);
}

.entry-desc {
  grid-column: 2 / 4;
  max-width: 40ch;
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .entry {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    column-gap: 0.75rem;
  }

  .entry-mo {
    width: 44px;
    height: 44px;
  }

  .entry-name {
    font-size: 1.125rem;
  }

  .entry-amount {
    font-size: 1.5rem;
  }

  .entry-desc {
    grid-column: 1 / 4;
  }
}


/* La promesa, en una línea junto al precio. */
.promise-line {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 24rem;
  margin: 1.5rem 0 0;
  font-size: 1.125rem;
  line-height: 1.4;
}

.promise-line strong {
  display: block;
  font-weight: 600;
}

.promise-mo {
  flex: none;
  width: 44px;
  height: 44px;
}

/* Lo que exige Apple, en letra pequeña y pocas líneas. */
.billing ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.billing li + li {
  margin-top: 0.4rem;
}

.billing p {
  margin: 0.75rem 0 0;
  font-size: 0.9375rem;
}

.billing a {
  color: var(--ink);
}

/* ---------- Qué incluye cada uno: pantallas y una tabla de vistos ---------- */

.compare {
  padding-block: clamp(5rem, 10vw, 8.5rem);
  background: var(--band);
}

.shots {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.shot {
  margin: 0;
}

.shot img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 8%;
  border-radius: 22px;
  background: var(--card);
}

.shot-automatizaciones img { object-position: 50% 30%; }
.shot-ciclo img { object-position: 50% 12%; }

.shot figcaption {
  margin-top: 0.6rem;
  font-size: 1rem;
  font-weight: 500;
}

@media (max-width: 720px) {
  .shots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.compare-table {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  padding: 0.5rem clamp(1rem, 3vw, 2.5rem) 1.25rem;
  border-radius: var(--radius-card);
  background: var(--card);
}

.compare table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.compare th,
.compare td {
  padding: 0.95rem 0.5rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--hairline);
}

.compare thead th {
  padding-top: 1.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
}

.compare thead th:first-child,
.compare tbody th {
  width: 46%;
  padding-left: 0;
  text-align: left;
}

.compare tbody th {
  font-weight: 400;
}

.compare td {
  text-align: center;
}

.col-price {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.compare tbody tr:last-child > * {
  border-bottom: 0;
}

/* El visto, dibujado: un círculo de estanque con la marca blanca. La raya: un trazo corto y gris. */
.mark {
  display: inline-block;
  position: relative;
  vertical-align: middle;
}

.mark.yes {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--estanque);
}

.mark.yes::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.25px 2.25px 0;
  translate: -50% -50%;
  rotate: 42deg;
}

@media (prefers-color-scheme: dark) {
  .mark.yes::after {
    border-color: #0b0c10;
  }
}

.mark.no {
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-faint);
  opacity: 0.6;
}

.lim {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.compare-note {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

@media (max-width: 520px) {
  .compare table {
    font-size: 0.9375rem;
  }

  .compare thead th {
    font-size: 0.9375rem;
  }

  .col-price {
    font-size: 0.8125rem;
  }

  .compare thead th:first-child,
  .compare tbody th {
    width: 40%;
  }

  .compare th,
  .compare td {
    padding-inline: 0.25rem;
  }

  .mark.yes {
    width: 22px;
    height: 22px;
  }

  .mark.yes::after {
    width: 5px;
    height: 9px;
  }

  .lim {
    font-size: 0.8125rem;
  }
}

/* ---------- Preguntas: tarjetas que se abren ---------- */

.faq {
  padding-block: clamp(5rem, 10vw, 8.5rem);
}

.faq-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .faq-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    column-gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
}

.qa-list {
  display: grid;
  gap: 0.75rem;
}

.qa-card {
  border-radius: 22px;
  background: var(--card);
  transition: background-color 0.25s ease;
}

.qa-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 1rem 1.25rem 1rem 1.5rem;
  border-radius: 22px;
  font-size: var(--t-lede);
  font-weight: 500;
  line-height: 1.3;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.qa-card summary::-webkit-details-marker {
  display: none;
}

.qa-card summary:focus-visible {
  outline: 2px solid var(--lila-deep);
  outline-offset: 2px;
}

/* El signo «+» que gira a «×» al abrir. */
.qa-icon {
  position: relative;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--paper);
  transition: rotate 0.35s var(--ease-out), background-color 0.25s ease;
}

.qa-icon::before,
.qa-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  translate: -50% -50%;
}

.qa-icon::after {
  rotate: 90deg;
}

.qa-card[open] .qa-icon {
  rotate: 45deg;
  background: var(--lila);
}

.qa-card[open] .qa-icon::before,
.qa-card[open] .qa-icon::after {
  background: #14161a;
}

@media (hover: hover) {
  .qa-card summary:hover .qa-icon {
    background: color-mix(in srgb, var(--lila) 55%, var(--paper));
  }
}

.qa-body p {
  max-width: 46ch;
  margin: 0;
  padding: 0 1.5rem 1.4rem;
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* ---------- Movimiento ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* La firma: la isla se abre como la de la app y deja ver el precio. */
  .hero .isle {
    animation: isle-open 1.15s var(--ease-expo) 0.35s both;
  }

  .hero .isle-price {
    animation: isle-text 0.6s var(--ease-out) 0.8s both;
  }

  .hero .isle-mo {
    animation: mo-hop 0.7s var(--ease-out) 1.4s both;
  }

  .hero-text,
  .hero-actions > * {
    animation: rise 0.8s var(--ease-expo) both;
  }

  .hero-actions > :nth-child(1) {
    animation-delay: 0.12s;
  }

  .hero-actions > :nth-child(2) {
    animation-delay: 0.2s;
  }

  .js [data-reveal] {
    opacity: 0;
    translate: 0 26px;
    transition:
      opacity 0.8s var(--ease-out),
      translate 0.9s var(--ease-expo);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    translate: 0 0;
  }

  .js .ledger-group:nth-child(2),
  .js .compare-table {
    transition-delay: 0.09s;
  }

  .js .ledger-group:nth-child(3) {
    transition-delay: 0.18s;
  }

  /* Las filas de un grupo entran una tras otra, como en Movimientos. */
  .js .ledger-group .entry {
    opacity: 0;
    translate: 0 14px;
    transition: opacity 0.6s var(--ease-out), translate 0.7s var(--ease-expo);
  }

  .js .ledger-group.is-in .entry {
    opacity: 1;
    translate: 0 0;
    transition-delay: 0.12s;
  }

  .js .ledger-group.is-in .entry + .entry {
    transition-delay: 0.2s;
  }

  /* Las pantallas se abren desde abajo, una tras otra. */
  .js .shots .shot img {
    clip-path: inset(100% 0 0 0 round 22px);
    transition: clip-path 1.1s var(--ease-expo);
  }

  .js .shots.is-in .shot img {
    clip-path: inset(0 0 0 0 round 22px);
  }

  .js .shots.is-in .shot:nth-child(2) img { transition-delay: 0.08s; }
  .js .shots.is-in .shot:nth-child(3) img { transition-delay: 0.16s; }
  .js .shots.is-in .shot:nth-child(4) img { transition-delay: 0.24s; }

  /* Los vistos aparecen fila por fila al entrar la tabla. */
  .js .compare-table .mark {
    scale: 0.4;
    opacity: 0;
    transition: scale 0.5s var(--ease-out), opacity 0.4s ease;
  }

  .js .compare-table.is-in .mark {
    scale: 1;
    opacity: 1;
    transition-delay: calc(0.15s + var(--row, 0) * 40ms);
  }

  .compare tbody tr:nth-child(2) { --row: 1; }
  .compare tbody tr:nth-child(3) { --row: 2; }
  .compare tbody tr:nth-child(4) { --row: 3; }
  .compare tbody tr:nth-child(5) { --row: 4; }
  .compare tbody tr:nth-child(6) { --row: 5; }
  .compare tbody tr:nth-child(7) { --row: 6; }
  .compare tbody tr:nth-child(8) { --row: 7; }
  .compare tbody tr:nth-child(9) { --row: 8; }
  .compare tbody tr:nth-child(10) { --row: 9; }
  .compare tbody tr:nth-child(11) { --row: 10; }
  .compare tbody tr:nth-child(12) { --row: 11; }

  /* La tarjeta se abre suave: altura animada donde el navegador lo permite, y la respuesta sube un poco. */
  .qa-card {
    interpolate-size: allow-keywords;
  }

  .qa-card::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 0.4s var(--ease-out), content-visibility 0.4s allow-discrete;
  }

  .qa-card[open]::details-content {
    block-size: auto;
  }

  .qa-card[open] .qa-body p {
    animation: rise-small 0.45s var(--ease-out) both;
  }

  .qa-card summary:active .qa-icon {
    scale: 0.9;
  }
}

@keyframes isle-open {
  from {
    clip-path: inset(0 calc(100% - 0.9em) 0 0 round 999px);
  }

  to {
    clip-path: inset(0 0 0 0 round 999px);
  }
}

@keyframes isle-text {
  from {
    opacity: 0;
    translate: -0.2em 0;
  }
}

@keyframes mo-hop {
  40% {
    translate: 0 -0.12em;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 20px;
  }
}

@keyframes rise-small {
  from {
    opacity: 0;
    translate: 0 -6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pill,
  .pill-arrow,
  .qa-icon,
  .qa-card {
    transition: none;
  }
}

@media print {
  .sky,
  .hero-actions,
  .shots {
    display: none;
  }

  .hero,
  .compare {
    background: #fff;
    color: #000;
  }

  .line-pond::before {
    display: none;
  }

  .js [data-reveal],
  .js .ledger-group .entry,
  .js .compare-table .mark {
    opacity: 1;
    translate: none;
    scale: 1;
  }
}

#planes,
#incluye {
  scroll-margin-top: 4rem;
}
