/* La Cuenta: composiciones propias de la landing. Los tokens y la cabecera vienen de styles.css.
   Cada sección tiene una composición distinta: hero con captura sobre banda tonal, escena en filas
   alternas, demo con marco de proporción fija y preguntas en acordeón. Sin JavaScript se ve la captura principal. */

/* ---------- Hero: texto arriba, captura centrada sobre una banda tonal ---------- */

.hero { padding-top: 24px; display: grid; gap: 28px; }

.hero-copy { display: grid; gap: 20px; }
.hero h1 { max-width: 12ch; }
.hero-actions { display: grid; gap: 14px; justify-items: start; }

.hero-shot {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.hero-shot img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 20px;
  background: var(--tone);
}
.hero-shot figcaption { font-size: 14px; color: var(--muted); text-align: center; max-width: 40ch; }

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    align-items: end;
    column-gap: 96px;
    padding-top: 56px;
  }
  .hero-shot { justify-items: start; }
  .hero-shot img { max-width: 420px; }
}

/* ---------- Escena: filas con fondo alterno, sin tarjetas ---------- */

.scene { margin-top: var(--gap); }
.scene-intro { margin-top: 20px; max-width: 46ch; }

.scene-steps {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.scene-steps li {
  display: grid;
  gap: 10px;
  padding: 28px var(--m);
}
.scene-steps li:nth-child(odd) { background: var(--tone); }
.scene-steps h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.scene-steps p { max-width: 52ch; color: var(--muted); }

@media (min-width: 900px) {
  .scene-steps li {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    column-gap: 56px;
    align-items: baseline;
    padding: 34px 56px;
  }
  .scene-steps li h3 { margin: 0; }
  .scene-steps li p { margin: 0; }
  .scene-steps { margin-inline: calc(var(--m) * -1); }
}

/* ---------- Demo: marco de proporción fija y controles junto a la captura ---------- */

.demo { margin-top: var(--gap); }
.demo-grid { display: grid; gap: 28px; }
.demo-stage { display: grid; gap: 24px; width: 100%; max-width: 380px; }
.demo-stage h2 { font-size: clamp(2rem, 3.4vw, 3rem); }

.phone-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 720 / 800;   /* igual en los tres pasos: la página no salta al cambiar */
  overflow: hidden;
  border-radius: 20px;
  background: var(--tone);
}

.frame {
  display: none;             /* sin JavaScript solo se ve el primer paso */
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.frame.is-on { display: block; }

/* Con JavaScript, los pasos se apilan y se cruzan con opacidad. Sin movimiento de la página. */
.js .frame {
  display: block;
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 240ms ease-out;
}
.js .frame.is-on { opacity: 1; }

.demo-bar { display: grid; gap: 16px; margin-top: 24px; }
.demo-bar[hidden] { display: none; }
.demo-step { margin: 0; font-size: 18px; font-weight: 600; min-height: 1.5em; }

.demo-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-buttons button {
  min-height: 48px;
  padding: 10px 18px;
  background: var(--card);
  color: var(--ink);
  border: 0;
  font: 600 16px var(--font-text);
  cursor: pointer;
}
.demo-buttons button:disabled { opacity: 0.45; cursor: default; }
.demo-buttons #demo-next { background: var(--petrol); color: #fff; }
.demo-buttons #demo-next:hover:not(:disabled) { background: var(--petrol-dark); }

@media (min-width: 900px) {
  .demo-grid {
    grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
    column-gap: 96px;
    align-items: center;
  }
  .demo-bar { margin-top: 0; max-width: 440px; }
  .demo-step { font-size: 24px; }
}

/* ---------- Preguntas ---------- */

.questions { margin-top: var(--gap); }
.questions h2 { max-width: 14ch; }
.qa { margin-top: 48px; display: grid; gap: 14px; max-width: 880px; }

.qa details {
  background: var(--card);
  padding: 20px 24px;
}
.qa summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.01em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 44px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+";
  font-size: 26px;
  line-height: 1;
  color: var(--petrol);
  flex: none;
}
.qa details[open] summary::after { content: "−"; }
.qa details p { margin: 14px 0 4px; color: var(--muted); max-width: 60ch; }

@media (prefers-reduced-motion: reduce) {
  .js .frame { transition: none; }
}

/* ---------- Escena con ticket ilustrado (no es captura) ---------- */
.scene-grid { display: grid; gap: 48px; margin-top: 32px; }
.scene-copy .lead { max-width: 44ch; }
.scene .scene-steps { margin-top: 36px; }

.ticket-example {
  margin: 0;
  background: var(--card);
  border-radius: 20px;
  overflow: hidden;
  max-width: 440px;
  width: 100%;
}
.ticket-tag {
  margin: 0;
  padding: 14px 22px;
  background: var(--tone);
  color: var(--petrol);
  font-size: 14px;
  font-weight: 600;
}
.ticket-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 22px 22px 8px; }
.ticket-head strong { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
.ticket-head span { color: var(--muted); font-size: 15px; }
.ticket-block { padding: 14px 22px; }
.ticket-plate { margin: 0; font-weight: 600; font-size: 15px; color: var(--muted); }
.ticket-line { margin: 4px 0 0; font-size: 19px; }
.ticket-line span { color: var(--petrol); font-weight: 600; }
.ticket-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 22px 22px; margin: 0; border-top: 3px solid var(--orange); }
.ticket-total span { font-weight: 600; }
.ticket-total strong { font-family: var(--font-display); font-size: 26px; font-weight: 600; }

@media (min-width: 900px) {
  .scene-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; column-gap: 88px; }
  .scene .scene-steps { margin-inline: 0; }
  .scene .scene-steps li { display: block; padding: 22px 0; background: none; }
  .scene .scene-steps li:nth-child(odd) { background: none; }
  .scene .scene-steps li { border-top: 1px solid var(--tone); }
  .ticket-example { justify-self: end; }
}
