@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --papel: #f2f0fa;
  --tinta: #17123a;
  --rec: #f0431f;
  --cinta: #5b43f0;
  --linea: #cfcbe6;
  --suave: #5d587c;
  --blanco: #ffffff;
  --font: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  --radio: 14px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-variation-settings: "opsz" 14;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 3px solid var(--cinta);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

/* Cabecera */
.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  background: var(--rec);
}
.top p {
  margin: 0;
  color: var(--suave);
}

/* Portada: el formulario es el producto */
h1 {
  margin: 2.5rem 0 0;
  font-size: clamp(3rem, 10vw, 6.75rem);
  font-weight: 750;
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96;
  text-wrap: balance;
}
.lede {
  max-width: 34rem;
  margin: 1.5rem 0 0;
  font-size: 1.25rem;
  line-height: 1.4;
  color: var(--suave);
}

form {
  margin-top: 3rem;
  display: grid;
  gap: 2rem;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
legend,
.label {
  display: block;
  padding: 0;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.url {
  width: 100%;
  padding: 1.1rem 1.25rem;
  border: 2px solid var(--tinta);
  border-radius: var(--radio);
  background: var(--blanco);
  color: var(--tinta);
  font: inherit;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.url::placeholder {
  color: #a8a4c0;
}

/* Formatos: cada uno enseña su secuencia de escenas */
.formats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem;
}
.option {
  position: relative;
  display: block;
  cursor: pointer;
}
.option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.card {
  display: block;
  height: 100%;
  padding: 1.1rem 1.1rem 1.25rem;
  border: 2px solid var(--linea);
  border-radius: var(--radio);
  background: var(--blanco);
  transition: border-color 0.12s;
}
.option:hover .card {
  border-color: var(--suave);
}
.option input:checked + .card {
  border-color: var(--tinta);
  box-shadow: 4px 4px 0 var(--tinta);
}
.option input:focus-visible + .card {
  outline: 3px solid var(--cinta);
  outline-offset: 3px;
}
.card strong {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card strong::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  border: 2px solid var(--linea);
}
.option input:checked + .card strong::before {
  border-color: var(--rec);
  background: var(--rec);
}
.card small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: var(--suave);
}

/* Mini guion gráfico: una tira de fotogramas por formato */
.strip {
  display: flex;
  gap: 4px;
  margin-top: 1rem;
}
.strip i {
  flex: 1;
  aspect-ratio: 9 / 13;
  border-radius: 4px;
  background: var(--papel);
  border: 1.5px solid var(--linea);
  position: relative;
  overflow: hidden;
}
.strip i::before,
.strip i::after {
  content: "";
  position: absolute;
  left: 18%;
  border-radius: 2px;
  background: var(--tinta);
}
/* título: dos líneas gruesas */
.strip .t::before { top: 38%; width: 60%; height: 9%; }
.strip .t::after { top: 53%; width: 40%; height: 9%; background: var(--rec); }
/* captura: una ventana */
.strip .c::before { top: 16%; width: 50%; height: 6%; }
.strip .c::after { left: 18%; right: 18%; top: 34%; bottom: -10%; border-radius: 3px; background: var(--cinta); }
/* puntos: tres renglones */
.strip .p::before { top: 30%; width: 64%; height: 6%; box-shadow: 0 0.55em 0 var(--tinta), 0 1.1em 0 var(--tinta); }
.strip .p::after { display: none; }
/* dato: un bloque grande */
.strip .d::before { top: 32%; width: 64%; height: 24%; background: var(--rec); }
.strip .d::after { top: 64%; width: 44%; height: 6%; }
/* cierre: botón */
.strip .f::before { top: 36%; width: 50%; height: 8%; }
.strip .f::after { top: 54%; width: 64%; height: 14%; border-radius: 99px; background: var(--rec); }

/* Forma del video */
.shapes {
  display: flex;
  gap: 0.875rem;
  flex-wrap: wrap;
}
.shapes .card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.25rem 0.9rem 1rem;
}
.shape {
  flex: none;
  border: 2px solid var(--tinta);
  border-radius: 4px;
  background: var(--papel);
}
.shape.v { width: 1.6rem; height: 2.85rem; }
.shape.h { width: 2.85rem; height: 1.6rem; }
.shapes .card strong::before {
  display: none;
}
.shapes input:checked + .card .shape {
  background: var(--rec);
  border-color: var(--rec);
}

/* Pagar */
.pay {
  display: grid;
  gap: 0.9rem;
  justify-items: start;
}
button,
.button {
  display: inline-block;
  padding: 1.1rem 1.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--blanco);
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
  cursor: pointer;
}
button:hover,
.button:hover {
  background: var(--cinta);
}
button[disabled] {
  opacity: 0.6;
  cursor: progress;
}
.button.quiet {
  background: transparent;
  color: var(--tinta);
  box-shadow: inset 0 0 0 2px var(--tinta);
}
.button.quiet:hover {
  background: var(--tinta);
  color: var(--blanco);
}
.fine {
  max-width: 36rem;
  margin: 0;
  font-size: 0.9375rem;
  color: var(--suave);
}
.error {
  margin: 0;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radio);
  border: 2px solid var(--rec);
  background: #fff1ec;
  font-weight: 550;
}
.error:empty,
[hidden] {
  display: none !important;
}

/* Secciones */
section {
  margin-top: 6rem;
}
h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 720;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 48;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: paso;
}
.steps li {
  counter-increment: paso;
  padding-top: 1rem;
  border-top: 2px solid var(--tinta);
}
.steps li::before {
  content: counter(paso);
  display: block;
  font-size: 2.5rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--rec);
  margin-bottom: 0.6rem;
}
.steps strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.steps span {
  color: var(--suave);
}

.faq {
  max-width: 44rem;
}
.faq details {
  border-top: 2px solid var(--linea);
  padding-block: 1.1rem;
}
.faq details:last-child {
  border-bottom: 2px solid var(--linea);
}
.faq summary {
  cursor: pointer;
  font-size: 1.1875rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.faq p {
  margin: 0.6rem 0 0;
  color: var(--suave);
}

footer {
  margin-top: 6rem;
  padding-block: 2rem 3rem;
  border-top: 2px solid var(--linea);
  font-size: 0.9375rem;
  color: var(--suave);
}
footer p {
  margin: 0 0 0.4rem;
}

/* Página del video */
.stage {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}
.stage.has-video {
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
}
.stage h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4rem);
}
.stage .lede {
  margin-top: 1rem;
}
.player {
  display: block;
  background: #000;
  border-radius: var(--radio);
  border: 2px solid var(--tinta);
  box-shadow: 6px 6px 0 var(--tinta);
}
.player.v { height: min(72vh, 40rem); aspect-ratio: 9 / 16; }
.player.h { width: min(100%, 44rem); aspect-ratio: 16 / 9; }
.stage.has-video.wide {
  grid-template-columns: minmax(0, 1fr);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}
.note {
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radio);
  background: var(--blanco);
  border: 2px solid var(--linea);
  max-width: 34rem;
}
.note p {
  margin: 0;
}

.progress {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  max-width: 30rem;
}
.progress li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.8rem;
  border-top: 2px solid var(--linea);
  font-size: 1.1875rem;
  font-weight: 600;
  color: #a8a4c0;
}
.progress li::before {
  content: "";
  flex: none;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.progress li.done {
  color: var(--tinta);
}
.progress li.done::before {
  background: var(--tinta);
  border-color: var(--tinta);
}
.progress li.now {
  color: var(--tinta);
}
.progress li.now::before {
  background: var(--rec);
  border-color: var(--rec);
  animation: rec 1.1s ease-in-out infinite;
}
@keyframes rec {
  50% { opacity: 0.25; }
}

.prose {
  max-width: 42rem;
}
.prose h1 {
  font-size: clamp(2.5rem, 7vw, 4rem);
}
.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

@media (max-width: 46rem) {
  .formats,
  .steps {
    grid-template-columns: 1fr;
  }
  .formats .card {
    display: grid;
    grid-template-columns: 1fr 9rem;
    column-gap: 1rem;
    align-items: center;
  }
  .formats .card small {
    grid-column: 1;
  }
  .formats .strip {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }
  .top p {
    display: none;
  }
  .stage.has-video {
    grid-template-columns: minmax(0, 1fr);
  }
  .player.v {
    height: auto;
    width: min(100%, 20rem);
  }
  button,
  .button {
    width: 100%;
    text-align: center;
  }
  section,
  footer {
    margin-top: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .progress li.now::before {
    animation: none;
  }
  .card {
    transition: none;
  }
}
