:root {
  --creme: #fde8ee;
  --blush: #f7c5d0;
  --rosa: #f0a3b4;
  --rosa-escuro: #c45d72;
  --ouro: #c9a06a;
  --tinta: #4a3340;
  --suave: #7b5f6a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--tinta);
  background: #fff6f8;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body.is-playing {
  overflow: auto;
}

.cenario {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.8), transparent 32%),
    radial-gradient(circle at 82% 78%, rgba(255, 236, 241, 0.9), transparent 36%),
    linear-gradient(180deg, #fff8fa 0%, #fff1f4 48%, #ffe8ee 100%);
}

.cenario::before,
.cenario::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 90px;
  background: no-repeat center / contain;
  opacity: 0.14;
}

.cenario::before {
  top: 8%;
  left: 6%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cellipse cx='18' cy='22' rx='16' ry='12' fill='%23fff'/%3E%3Cellipse cx='46' cy='22' rx='16' ry='12' fill='%23fff'/%3E%3Cellipse cx='32' cy='24' rx='4' ry='14' fill='%23d98aa0'/%3E%3C/svg%3E");
}

.cenario::after {
  bottom: 12%;
  right: 8%;
  transform: scaleX(-1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'%3E%3Cellipse cx='18' cy='22' rx='16' ry='12' fill='%23fff'/%3E%3Cellipse cx='46' cy='22' rx='16' ry='12' fill='%23fff'/%3E%3Cellipse cx='32' cy='24' rx='4' ry='14' fill='%23d98aa0'/%3E%3C/svg%3E");
}

.borboletas,
.baloes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.baloes {
  z-index: 1;
}

.borboletas {
  z-index: 2;
}

.balao {
  position: absolute;
  bottom: -120px;
  left: var(--x);
  width: var(--size);
  opacity: 0.82;
  animation: subir var(--dur) var(--delay) linear infinite;
}

.borboleta {
  position: absolute;
  top: var(--y);
  left: -16%;
  width: var(--size);
  height: auto;
  color: var(--cor);
  opacity: 0.92;
  animation: voar var(--dur) var(--delay) cubic-bezier(0.37, 0, 0.63, 1) infinite;
  will-change: transform;
  filter: drop-shadow(0 8px 10px rgba(180, 20, 70, 0.22));
}

.borboleta.contraria {
  left: auto;
  right: -16%;
  animation-name: voar-volta;
}

.borboleta svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  transform-origin: 50% 55%;
  animation: bater-asas 0.58s ease-in-out infinite;
}

.balao-corpo {
  position: relative;
  display: block;
  width: 100%;
  height: calc(var(--size) * 1.28);
  background: radial-gradient(circle at 30% 25%, #fff8, transparent 36%), var(--cor);
  border-radius: 50% 50% 48% 48% / 42% 42% 58% 58%;
  box-shadow: inset -10px -14px 18px rgba(80, 30, 40, 0.12);
}

.balao-corpo::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(var(--size) * 1.2);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid var(--cor);
  transform: translateX(-50%);
}

.balao-fio {
  display: block;
  width: 1px;
  height: 78px;
  margin: 10px auto 0;
  background: linear-gradient(#c9a4ab, transparent);
}

@keyframes subir {
  0% {
    transform: translate3d(0, 0, 0) rotate(-6deg);
  }
  50% {
    transform: translate3d(var(--deriva, 18px), -55vh, 0) rotate(7deg);
  }
  100% {
    transform: translate3d(calc(var(--deriva, 18px) * -0.4), -115vh, 0) rotate(-4deg);
  }
}

@keyframes voar {
  0% {
    transform: translate3d(0, 0, 0) rotate(-4deg);
  }
  18% {
    transform: translate3d(22vw, -26px, 0) rotate(-1deg);
  }
  36% {
    transform: translate3d(44vw, 14px, 0) rotate(3deg);
  }
  54% {
    transform: translate3d(66vw, -18px, 0) rotate(-2deg);
  }
  72% {
    transform: translate3d(88vw, 12px, 0) rotate(2deg);
  }
  100% {
    transform: translate3d(122vw, -6px, 0) rotate(-1deg);
  }
}

@keyframes voar-volta {
  0% {
    transform: translate3d(0, 0, 0) rotate(4deg) scaleX(-1);
  }
  22% {
    transform: translate3d(-24vw, 16px, 0) rotate(1deg) scaleX(-1);
  }
  48% {
    transform: translate3d(-52vw, -20px, 0) rotate(-3deg) scaleX(-1);
  }
  74% {
    transform: translate3d(-82vw, 10px, 0) rotate(2deg) scaleX(-1);
  }
  100% {
    transform: translate3d(-122vw, -8px, 0) rotate(-1deg) scaleX(-1);
  }
}

@keyframes bater-asas {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.82);
  }
}

.cena {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.4rem 1.3rem 3rem;
  position: relative;
  z-index: 10;
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.28) 0%, transparent 46%);
  transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.9s ease;
}

.intro > * {
  position: relative;
  z-index: 12;
}

body.is-playing .intro {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  font-weight: 600;
  color: var(--rosa-escuro);
}

h1,
h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0.7rem 0 0;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
}

.intro-nomes {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 1.2rem;
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  color: var(--rosa-escuro);
}

.hairline {
  display: block;
  width: 72px;
  height: 1px;
  margin: 0.3rem auto 1.2rem;
  background: var(--ouro);
}

.intro-lead,
.final-texto {
  max-width: 640px;
  color: var(--suave);
  line-height: 1.6;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  margin: 0 auto 1.8rem;
  text-align: center;
}

.intro-acoes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin-top: 3.4rem;
}

.btn-iniciar,
.btn-exportar {
  appearance: none;
  cursor: pointer;
  font-family: Outfit, sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.05rem;
  border-radius: 999px;
  padding: 1.15rem 2.8rem;
  min-width: 11.5rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.btn-iniciar {
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, #e79aa8, var(--rosa-escuro));
  box-shadow: 0 16px 32px rgba(196, 93, 114, 0.28);
}

.btn-iniciar:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(196, 93, 114, 0.34);
}

.btn-exportar {
  border: 1.5px solid var(--rosa-escuro);
  color: var(--rosa-escuro);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 22px rgba(196, 93, 114, 0.12);
}

.btn-exportar:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: 0 14px 26px rgba(196, 93, 114, 0.18);
}

.btn-exportar:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.historia[hidden] {
  display: none;
}

.cena-foto figure {
  position: relative;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: min(92vw, 520px);
  margin: 0 auto;
  text-align: center;
  opacity: 0;
  transform: translateY(36px) scale(0.98);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.cena-foto.is-na-tela figure {
  opacity: 1;
  transform: none;
}

.cena-foto img {
  display: block;
  width: min(92vw, 430px);
  max-height: min(72vh, 780px);
  margin: 0 auto;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 28px 60px rgba(74, 51, 64, 0.2);
  background: #ead8d4;
}

.cena-foto figcaption {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.85rem, 4.2vw, 2.55rem);
  margin: 1.2rem auto 0;
  max-width: 24em;
  text-align: center;
  color: var(--tinta);
  line-height: 1.3;
}

.cena-final {
  z-index: 12;
  align-items: center;
  text-align: center;
}

.final-titulo {
  max-width: 20em;
  margin: 0 auto 1.1rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.85rem, 4.4vw, 2.85rem);
  line-height: 1.35;
  color: var(--rosa-escuro);
  text-align: center;
}

.final-mensagem {
  max-width: 22em;
  margin: 0 auto 1.4rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.45;
  text-align: center;
  color: var(--tinta);
}

.final-mensagem strong {
  font-weight: 700;
}

.final-destaque {
  display: block;
  margin: 0 auto 0.7rem;
  font-size: clamp(2.15rem, 5vw, 3.15rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--rosa-escuro);
}

.assinatura {
  display: block;
  margin: 0 auto;
  padding: 1.15rem 2rem 1.25rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 28px rgba(196, 93, 114, 0.16);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  letter-spacing: 0.02em;
  font-weight: 600;
  color: var(--rosa-escuro);
  line-height: 1.35;
  text-align: center;
  max-width: 18em;
}

.assinatura-marcas {
  display: block;
  margin-top: 0.4rem;
  font-style: normal;
  letter-spacing: 0.04em;
}

@media (max-width: 720px) {
  .cena-foto img {
    width: min(94vw, 420px);
    max-height: 64vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .intro,
  .cena-foto figure,
  .balao,
  .borboleta,
  .borboleta svg {
    transition: none;
    animation: none;
  }

  body.is-playing .intro {
    transform: none;
    display: none;
  }
}
