:root {
  --ink: #20171a;
  --paper: #fff8f5;
  --rose: #b43852;
  --rose-dark: #7f2438;
  --coral: #e7665f;
  --teal: #176c72;
  --mint: #d8f2ed;
  --cream: #fff4e8;
  --line: rgba(32, 23, 26, 0.13);
  --shadow: 0 24px 70px rgba(32, 23, 26, 0.22);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
}

.hero__media,
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media {
  background-image: url("assets/cancao-pra-voce-hero.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero__shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(32, 23, 26, 0.92) 0%, rgba(32, 23, 26, 0.78) 40%, rgba(32, 23, 26, 0.18) 100%),
    linear-gradient(180deg, rgba(32, 23, 26, 0.1), rgba(32, 23, 26, 0.58));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  color: white;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: white;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--rose-dark);
  background: #fff;
}

.topbar__price {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.topbar__price span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  align-items: center;
  gap: 52px;
  width: min(1160px, calc(100% - 32px));
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: 38px 0 72px;
}

.hero__copy {
  max-width: 650px;
  color: white;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: #ffb7a7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 20px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 0.93;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 590px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.65;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero__badges span {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  font-size: 13px;
}

.composer {
  width: 100%;
}

.steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.step {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-size: 13px;
  font-weight: 800;
}

.step.is-active {
  color: var(--ink);
  border-color: #fff;
  background: #fff;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 248, 245, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel__header h2 {
  margin-bottom: 18px;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: 0;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  font-size: 13px;
  font-weight: 800;
}

.field small {
  color: rgba(32, 23, 26, 0.56);
  font-weight: 700;
}

.field--hidden {
  display: none;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(180, 56, 82, 0.62);
  box-shadow: 0 0 0 4px rgba(180, 56, 82, 0.12);
}

textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.45;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.segmented label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: rgba(32, 23, 26, 0.72);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented label:has(input:checked) {
  color: #fff;
  border-color: var(--rose);
  background: var(--rose);
}

.primary,
.ghost,
.icon-button {
  border: 0;
  cursor: pointer;
  font-weight: 900;
}

.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--coral));
  box-shadow: 0 16px 28px rgba(180, 56, 82, 0.24);
}

.primary:hover {
  transform: translateY(-1px);
}

.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  color: var(--teal);
  background: var(--mint);
  text-decoration: none;
}

.is-hidden {
  display: none;
}

.progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 23, 26, 0.1);
}

.progress__bar {
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--rose));
  transition: width 0.35s ease;
}

.status {
  margin: 16px 0 0;
  color: rgba(32, 23, 26, 0.72);
  font-weight: 700;
}

.generation-stage {
  position: relative;
  min-height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 4px 0 18px;
  border: 1px solid rgba(32, 23, 26, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 24%, rgba(232, 92, 107, 0.18), transparent 30%),
    radial-gradient(circle at 78% 74%, rgba(23, 111, 116, 0.16), transparent 32%),
    rgba(255, 255, 255, 0.68);
}

.countdown-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  min-width: 142px;
  padding: 15px 18px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 38px rgba(32, 23, 26, 0.12);
  text-align: center;
}

.countdown-card span {
  color: rgba(32, 23, 26, 0.58);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown-card strong {
  font-size: 34px;
  line-height: 1;
}

.falling-notes span {
  position: absolute;
  top: -28px;
  color: rgba(23, 111, 116, 0.28);
  font-size: 24px;
  animation: noteFall 4.6s linear infinite;
}

.falling-notes span:nth-child(1) { left: 12%; animation-delay: 0s; }
.falling-notes span:nth-child(2) { left: 30%; animation-delay: 1.2s; color: rgba(232, 92, 107, 0.26); }
.falling-notes span:nth-child(3) { left: 52%; animation-delay: 0.5s; }
.falling-notes span:nth-child(4) { left: 70%; animation-delay: 2s; color: rgba(232, 92, 107, 0.24); }
.falling-notes span:nth-child(5) { left: 86%; animation-delay: 0.9s; }

.generation-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.generation-steps span {
  min-width: 0;
  padding: 8px 6px;
  border-radius: 8px;
  color: rgba(32, 23, 26, 0.54);
  background: rgba(32, 23, 26, 0.06);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.generation-steps span.is-active {
  color: var(--teal);
  background: var(--mint);
  transform: translateY(-1px);
}

.draft-lyrics {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(32, 23, 26, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.draft-lyrics__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.draft-lyrics__head span {
  color: var(--rose);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.draft-lyrics__head i {
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose), var(--teal));
  animation: pulseDot 1.1s ease-in-out infinite;
}

.draft-lyrics pre {
  min-height: 118px;
  max-height: 154px;
  overflow: hidden;
  margin: 0;
  white-space: pre-wrap;
  color: rgba(32, 23, 26, 0.7);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.preview {
  display: grid;
  gap: 16px;
}

.preview.is-hidden {
  display: none;
}

.player {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.disc {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(from 40deg, var(--rose), var(--teal), #f0b05d, var(--rose));
}

.disc span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
}

.disc.is-spinning {
  animation: spin 2.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.player__main {
  min-width: 0;
}

.player__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.player__top strong,
.player__top span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player__top span {
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 900;
}

.timeline {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(32, 23, 26, 0.1);
}

.timeline div {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--teal));
}

.player__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

#timeLabel {
  color: rgba(32, 23, 26, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.lyrics {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.lyrics__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.lyrics h3 {
  margin: 0;
  font-size: 16px;
}

.lyrics__head span {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--mint);
  font-size: 12px;
  font-weight: 900;
}

.lyrics pre {
  max-height: 260px;
  margin: 0;
  overflow: auto;
  padding: 16px;
  white-space: pre-wrap;
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

.payment__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
}

.payment__box span,
.payment__box p {
  color: rgba(32, 23, 26, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.payment__box p {
  margin: 0;
}

.payment__box strong {
  display: block;
  margin-top: 4px;
  font-size: 28px;
}

.payment .ghost {
  margin-top: 10px;
}

.success {
  text-align: center;
}

.success__icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 28px;
  font-weight: 900;
}

.order-summary {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.order-summary span {
  color: rgba(32, 23, 26, 0.58);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.order-summary strong {
  color: var(--rose-dark);
  font-size: 30px;
  line-height: 1;
}

.success__text {
  color: rgba(32, 23, 26, 0.68);
  line-height: 1.55;
}

.success__actions {
  display: grid;
  gap: 10px;
}

@media (max-width: 940px) {
  .hero__content {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 30px;
    padding-top: 18px;
  }

  .hero__copy {
    max-width: 760px;
  }

  h1 {
    max-width: 780px;
  }

  .composer {
    max-width: 560px;
  }
}

@media (max-width: 620px) {
  .topbar {
    width: min(100% - 24px, 1160px);
    padding-top: 14px;
  }

  .brand span:last-child {
    display: none;
  }

  .topbar__price {
    border-radius: 8px;
  }

  .hero__content {
    width: min(100% - 24px, 1160px);
    padding-bottom: 42px;
  }

  h1 {
    font-size: 44px;
  }

  .hero__lead {
    font-size: 16px;
  }

  .panel {
    padding: 18px;
  }

  .segmented {
    grid-template-columns: 1fr;
  }

  .player {
    grid-template-columns: 1fr;
  }

  .disc {
    width: 62px;
    height: 62px;
  }

  .payment__box,
  .player__top,
  .lyrics__head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.preview-actions {
  display: grid;
  gap: 10px;
}

.primary--buy {
  min-height: 56px;
  background: linear-gradient(135deg, #11935f, #26b978);
  box-shadow: 0 18px 32px rgba(17, 147, 95, 0.28);
}

.primary--buy:hover {
  filter: brightness(1.03);
}

.remake-button {
  justify-self: center;
  border: 0;
  padding: 7px 10px;
  color: rgba(32, 23, 26, 0.62);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.remake-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.progress {
  position: relative;
}

.progress::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: translateX(-100%);
  animation: progressSweep 1.25s ease-in-out infinite;
}

.progress__bar {
  position: relative;
  overflow: hidden;
}

.progress__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.22) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.22) 75%,
    transparent 75%,
    transparent
  );
  background-size: 18px 18px;
  animation: progressStripes 0.75s linear infinite;
}

.preview .preview-actions {
  position: sticky;
  bottom: -24px;
  margin: 2px -24px -24px;
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 248, 245, 0.96);
  backdrop-filter: blur(14px);
}


@keyframes noteFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -14px, 0) rotate(0deg);
  }
  12% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(18px, 168px, 0) rotate(26deg);
  }
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.42; transform: scaleX(0.72); }
  50% { opacity: 1; transform: scaleX(1); }
}

@keyframes progressSweep {
  to {
    transform: translateX(100%);
  }
}

@keyframes progressStripes {
  to {
    background-position: 18px 0;
  }
}

@media (max-width: 620px) {
  .preview .preview-actions {
    bottom: -18px;
    margin: 2px -18px -18px;
    padding: 12px 18px 16px;
  }
}

.pix-box {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.pix-box img {
  width: min(230px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border: 10px solid #fff;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(32, 23, 26, 0.13);
}

.pix-box textarea {
  min-height: 96px;
  font-size: 12px;
}

.pix-box.is-hidden {
  display: none;
}

.checkout-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.final-audio {
  margin: 0 0 16px;
}

.final-audio audio {
  width: 100%;
}

.primary.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}
