@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Caveat:wght@500;600&family=Work+Sans:wght@400;500;600&display=swap");

:root {
  --sans: "Work Sans", -apple-system, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --script: "Caveat", cursive;

  --mist: #faf7f3;
  --mist-soft: rgba(250, 247, 243, 0.72);
  --ink: #1e1e1e;
  --ink-soft: rgba(30, 30, 30, 0.66);
  --gold: #e9c77c;
  --cream: #ffffff;
  --forest: #634280;
  --forest-2: #8a6bb0;
  --plum: #634280;
  --plum-2: #8a6bb0;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
}
body {
  font-family: var(--sans);
  background: #04040a;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
}
#frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  max-height: 900px;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
  isolation: isolate;
}
@media (min-width: 460px) {
  #frame {
    border-radius: 30px;
    height: min(900px, 92vh);
  }
}

/* ---------- SKY (one real photo, camera pans down as the story advances) ---------- */
#sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("sky.jpg");
  background-repeat: no-repeat;
  background-size: auto 230%;
  background-position: center 0%;
  transition: background-position 1.8s ease;
}
#sky.st-01 {
  background-position: center 0%;
}
#sky.st-02 {
  background-position: center 14%;
}
#sky.st-03 {
  background-position: center 30%;
}
#sky.st-04 {
  background-position: center 46%;
}
#sky.st-05 {
  background-position: center 62%;
}
#sky.st-06 {
  background-position: center 76%;
}
#sky.st-07 {
  background-position: center 90%;
}
#sky.st-08 {
  background-position: center 100%;
}

/* extra twinkling stars layered over the photo's own sky */
#twinkles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1.6s ease;
}
#twinkles i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 5px 1px rgba(255, 255, 255, 0.85);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.7);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}
#sky.st-03 #twinkles {
  opacity: 0.7;
}
#sky.st-04 #twinkles {
  opacity: 0.3;
}
#sky.st-05 #twinkles,
#sky.st-06 #twinkles,
#sky.st-07 #twinkles,
#sky.st-08 #twinkles {
  opacity: 0;
}

/* soft scrim for text legibility over the photo, no color of its own */
#scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.22),
    rgba(0, 0, 0, 0) 30%,
    rgba(0, 0, 0, 0) 70%,
    rgba(0, 0, 0, 0.08)
  );
  transition: opacity 1.2s ease;
  opacity: 1;
}
#sky.st-04 #scrim,
#sky.st-05 #scrim,
#sky.st-06 #scrim,
#sky.st-07 #scrim,
#sky.st-08 #scrim {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.18)
  );
}

#menu {
  position: absolute;
  top: 28px;
  right: 22px;
  z-index: 5;
  width: 20px;
  height: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0.85;
}
#menu span {
  display: block;
  height: 1.6px;
  background: var(--mist);
  border-radius: 2px;
}
.light-ui #menu span {
  background: var(--ink);
}

/* ---------- SCREENS ---------- */
.screen {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 30px 28px 34px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  overflow-y: auto;
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translateY(0);
}

.wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.wordmark .name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.32em;
  color: var(--mist);
}
.wordmark .tag {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.28em;
  color: var(--mist-soft);
}
.light-ui .wordmark .name {
  color: var(--ink);
}
.light-ui .wordmark .tag {
  color: var(--ink-soft);
}

.brand-mini {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.26em;
  color: var(--mist);
  text-align: center;
}
.light-ui .brand-mini {
  color: var(--ink);
}

.stage-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding-top: 6px;
}

.spark {
  font-size: 15px;
  color: var(--gold);
  display: block;
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 7.4vw, 32px);
  line-height: 1.16;
  color: var(--mist);
  max-width: 270px;
}
.light-ui h1 {
  color: var(--ink);
}
p.lede {
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--mist-soft);
  max-width: 260px;
}
.light-ui p.lede {
  color: var(--ink-soft);
}

.cta {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.03em;
  padding: 15px 26px;
  border-radius: 999px;
  cursor: pointer;
  width: 100%;
  max-width: 270px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  transition: transform 0.2s ease;
}
.cta:active {
  transform: scale(0.97);
}
.cta-cream {
  background: var(--cream);
  color: var(--ink);
}
.cta-forest {
  background: linear-gradient(180deg, var(--forest-2), var(--forest));
  color: #f3ead1;
}
.cta-plum {
  background: linear-gradient(180deg, var(--plum-2), var(--plum));
  color: #f3ead1;
}
.cta-outline {
  background: transparent;
  border: 1px solid currentColor;
  color: var(--ink);
}
.cta:disabled {
  opacity: 0.4;
  pointer-events: none;
}
.trust {
  font-size: 11px;
  color: var(--mist-soft);
  display: flex;
  align-items: center;
  gap: 5px;
}
.light-ui .trust {
  color: var(--ink-soft);
}

/* blob photo placeholder */
.blob {
  width: 200px;
  height: 240px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}
.blob img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Foto 1 — collar: angosta arriba, más abierta abajo */
.blob-a {
  border-radius: 42% 58% 38% 62% / 60% 55% 45% 40%;
}

/* Foto 2 — dije: kidney bean, cóncava a la derecha */
.blob-b {
  border-radius: 60% 40% 55% 45% / 45% 60% 40% 55%;
}

/* Foto 3 — aritos: piedra ancha en el medio */
.blob-c {
  border-radius: 48% 52% 44% 56% / 52% 48% 58% 42%;
}
/*.blob {
  width: 150px;
  height: 170px;
  position: relative;
  border-radius: 63% 37% 54% 46% / 55% 45% 55% 45%;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.24),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blob img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}*/

/* variantes de forma, para que las tres fotos no sean el mismo molde */
/*.blob-b {
  border-radius: 42% 58% 65% 35% / 48% 42% 58% 52%;
}
.blob-c {
  border-radius: 55% 45% 38% 62% / 62% 38% 55% 45%;
}*/
.light-ui .blob {
  background: linear-gradient(
    160deg,
    rgba(36, 31, 46, 0.1),
    rgba(36, 31, 46, 0.03)
  );
  border-color: rgba(36, 31, 46, 0.16);
}
.blob svg {
  width: 52px;
  height: 52px;
  opacity: 0.85;
}
.blob-cap {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--mist-soft);
}
.light-ui .blob-cap {
  color: var(--ink-soft);
}
.photo-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.photo-captions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  max-width: 120px;
}
.microlist {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  line-height: 1.7;
  color: var(--mist-soft);
}
.light-ui .microlist {
  color: var(--ink-soft);
}
.footer-tag {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}
.script-line {
  font-family: var(--script);
  font-size: 19px;
  color: var(--mist);
  transform: rotate(-3deg);
}
.light-ui .script-line {
  color: var(--ink);
}

/* constellation */
.cross-wrap {
  width: 230px;
  height: 254px;
  position: relative;
}
.cross-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.star-pt {
  cursor: pointer;
}
.star-pt .halo {
  opacity: 0;
  transition: opacity 0.4s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.star-pt:hover .halo {
  opacity: 0.65;
}
.star-pt.chosen .halo {
  opacity: 0.95;
}
.star-pt .core {
  transition:
    fill 0.3s ease,
    transform 0.3s ease;
  transform-box: fill-box;
  transform-origin: center;
}
.star-pt.chosen .core {
  fill: var(--gold);
  transform: scale(1.25);
}
.star-pt .lbl {
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  fill: rgba(247, 243, 236, 0.75);
}
.star-pt .bayer {
  font-family: var(--serif);
  font-style: italic;
  font-size: 7.5px;
  fill: rgba(247, 243, 236, 0.42);
}
.pointer-line {
  stroke: rgba(247, 243, 236, 0.3);
  stroke-width: 0.7;
  stroke-dasharray: 1.5, 3;
}
.pointer-label {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.22em;
  fill: rgba(247, 243, 236, 0.5);
}
.pointer-rule {
  stroke: rgba(247, 243, 236, 0.35);
  stroke-width: 0.5;
}
.cross-caption {
  text-align: right;
}
.cross-caption .t1 {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mist);
}
.cross-caption .t2 {
  font-family: var(--script);
  font-size: 15px;
  color: var(--mist-soft);
}

.glow-star {
  width: 150px;
  height: 150px;
}
.glow-star svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.spark-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: sparkPulse 2.8s ease-in-out infinite;
}
@keyframes sparkPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
.spark-mini {
  transform-box: fill-box;
  transform-origin: center;
  animation: miniTwinkle 2.2s ease-in-out infinite;
}
.spark-mini-b {
  animation-delay: 0.6s;
}
@keyframes miniTwinkle {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}
.discount {
  font-family: var(--serif);
  font-size: 40px;
  color: var(--mist);
}
.divider {
  width: 36px;
  height: 1px;
  background: rgba(247, 243, 236, 0.4);
}
.light-ui .divider {
  background: rgba(36, 31, 46, 0.3);
}

.field {
  width: 100%;
  max-width: 260px;
  text-align: left;
}
.field input {
  width: 100%;
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(36, 31, 46, 0.2);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  outline: none;
}
.field input:focus {
  border-color: var(--forest);
}
.code-box {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed var(--forest);
  border-radius: 14px;
  padding: 14px 24px;
}
.fine {
  font-size: 11.5px;
  color: var(--ink-soft);
}

.pill-stack {
  width: 100%;
  max-width: 270px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pill-done {
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--forest);
  background: none;
}
.summary-card {
  width: 100%;
  max-width: 290px;
  display: flex;
  gap: 10px;
}
.summary-tile {
  flex: 1;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 16px;
  padding: 16px 14px;
  text-align: left;
}
.summary-tile .ic {
  font-size: 14px;
}
.summary-tile .lbl {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: 6px;
}
.summary-tile .val {
  font-family: var(--serif);
  font-size: 19px;
  color: var(--ink);
  margin-top: 2px;
}
.summary-tile .sub {
  font-size: 10.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

#progress {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 6px;
}
#progress span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(247, 243, 236, 0.35);
  transition: all 0.4s ease;
}
#progress span.done {
  background: var(--gold);
  width: 14px;
  border-radius: 3px;
}
.light-ui #progress span {
  background: rgba(36, 31, 46, 0.2);
}
.light-ui #progress span.done {
  background: var(--forest);
}

#menu {
  display: none;
}
/* Menos zoom en el recorrido; en la última pantalla se aleja y muestra el prado completo */
#sky {
  background-size: 150% auto;
  transition:
    background-position 1.8s ease,
    background-size 1.8s ease;
}
#sky.st-08 {
  background-size: 104% auto;
  background-position: center 100%;
}
.email-hint {
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--ink-soft);
  margin-top: 8px;
}
.email-hint.is-error {
  color: #8a3a3a;
}
.email-hint-btn {
  font: inherit;
  font-weight: 600;
  color: var(--forest);
  background: none;
  border: none;
  border-bottom: 1px solid currentColor;
  padding: 0;
  cursor: pointer;
}
/* --- Ajustes para iPhone --- */

/* 1) Safari hace zoom automático al tocar un campo con texto menor a 16px */
#email-input {
  font-size: 16px;
}

/* 2) El aviso reserva su lugar: así el contenido no salta mientras escribís */
.email-hint {
  min-height: 2.8em;
}

/* 3) Alto real de la pantalla en el celular (100vh incluye la barra de Safari) */
@media (max-width: 459px) {
  @supports (height: 100dvh) {
    body {
      min-height: 100dvh;
    }
    #frame {
      height: 100dvh;
      max-height: none;
    }
  }
}
/* Página 2: fondo más oscuro */
#sky.st-02 {
  filter: brightness(0.78);
}
/* Logos */
.wordmark img.logo-full {
  height: 26px;
  width: auto;
  display: block;
}
.brand-mini img.logo-mark {
  height: 30px;
  width: auto;
}
.screen:not(.light-ui) .wordmark img.logo-full,
.screen:not(.light-ui) .brand-mini img.logo-mark {
  filter: brightness(0) invert(1);
}
.brand-mini img.logo-mark {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
}

.cta {
  line-height: 1.3;
}
.screen[data-stage="01"] .stage-body {
  justify-content: flex-start;
  padding-top: 6vh;
  gap: 20px;
}
.screen[data-stage="03"] .stage-body {
  justify-content: flex-start;
  padding-top: 4vh;
}
