:root {
  --ink: #21171b;
  --paper: #fff8f5;
  --cream: #fff1e5;
  --rose: #c43a5d;
  --rose-dark: #7c223a;
  --rose-light: #ff7893;
  --coral: #e85f55;
  --coral-light: #ffb7a7;
  --teal: #176c72;
  --line: rgba(33, 23, 27, 0.13);
  --shadow: 0 24px 70px rgba(33, 23, 27, 0.22);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

.shell { min-height: 100vh; display: flex; flex-direction: column; }

.hero {
  position: relative;
  padding: 28px clamp(20px, 5vw, 80px) 60px;
  min-height: 100vh;
}

.hero__media {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(180deg, rgba(33,23,27,0.55) 0%, rgba(33,23,27,0.75) 100%),
    url("https://images.unsplash.com/photo-1495231916356-a86217efff12?auto=format&fit=crop&w=2400&q=80");
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero__shade {
  position: absolute; inset: 0;
  background: radial-gradient(900px 500px at 20% 30%, rgba(196,58,93,0.18), transparent 60%);
  z-index: 0;
}

/* TOPBAR */
.topbar {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 60px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: #fff; text-decoration: none;
  font-family: "Fraunces", "Playfair Display", serif; font-weight: 800; font-size: 26px;
  letter-spacing: -0.02em;
}
.brand__mark { display: none; }
.brand__text span { color: var(--rose-light); }
.topbar__price {
  background: rgba(255,255,255,0.12);
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px; color: rgba(255,255,255,0.78);
  backdrop-filter: blur(8px);
}
.topbar__price strong { color: #fff; margin-left: 6px; }

/* HERO CONTENT */
.hero__content {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 460px; gap: 70px;
  max-width: 1240px; margin: 0 auto;
}
@media (max-width: 980px) {
  .hero__content { grid-template-columns: 1fr; gap: 32px; }
}

.hero__copy { padding-top: 30px; color: #fff; }
.eyebrow {
  display: inline-block;
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--coral-light); margin: 0 0 22px; font-weight: 600;
}
.hero h1 {
  font-family: "Fraunces", "Playfair Display", Georgia, serif;
  font-size: clamp(40px, 6vw, 78px); line-height: 1.02;
  margin: 0 0 24px; font-weight: 800;
  letter-spacing: -0.02em; color: #fff;
}
.hero__lead {
  font-size: 18px; line-height: 1.55; color: rgba(255,255,255,0.82);
  max-width: 500px; margin: 0 0 28px;
}
.hero__badges { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__badges span {
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 14px; border-radius: 999px; font-size: 13px; color: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
}

/* COMPOSER (card creme) */
.composer {
  background: var(--paper);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px;
  color: var(--ink);
}

.steps {
  display: flex; gap: 8px; margin-bottom: 26px; justify-content: flex-end;
}
.step {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--line); color: var(--ink);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.step.is-active { background: var(--rose); color: #fff; }

.panel { display: flex; flex-direction: column; gap: 18px; }
.panel.is-hidden { display: none; }

.panel__head { margin-bottom: 2px; }
.kicker {
  margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--rose);
  font-weight: 600;
}
.panel__head h2 {
  margin: 4px 0 0;
  font-family: "Fraunces", "Playfair Display", serif; font-size: 28px; font-weight: 700;
  letter-spacing: -0.01em;
}

/* FIELDS */
.field { display: flex; flex-direction: column; gap: 8px; }
.field.field--hidden { display: none; }
.field > span {
  font-size: 13px; color: var(--ink); font-weight: 600;
}
.field > span small {
  color: rgba(33,23,27,0.5); font-weight: 400; margin-left: 4px;
}
.field input, .field select, .field textarea {
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 14px;
  color: var(--ink); font: inherit; font-size: 15px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(196,58,93,0.12);
}
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }

/* SEGMENTED */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented label {
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 11px 14px; font-size: 14px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  transition: all 0.15s; color: var(--ink);
}
.segmented label:has(input:checked) {
  border-color: var(--rose); background: rgba(196,58,93,0.08);
  font-weight: 600;
}
.segmented input { accent-color: var(--rose); }

/* BUTTONS */
.primary {
  background: linear-gradient(135deg, var(--rose), var(--coral));
  border: none; color: white; font: inherit; font-weight: 700; font-size: 16px;
  padding: 15px 22px; border-radius: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(196,58,93,0.28);
}
.primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(196,58,93,0.4); }
.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.primary--buy {
  background: linear-gradient(135deg, var(--teal), #2a9895);
  box-shadow: 0 8px 22px rgba(23,108,114,0.32);
}
.primary--buy:hover { box-shadow: 0 12px 30px rgba(23,108,114,0.45); }

.ghost-btn {
  background: #fff; border: none;
  color: var(--ink); font: inherit; font-size: 15px; font-weight: 600;
  padding: 15px 22px; border-radius: 14px; cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(33,23,27,0.06);
  text-align: center; width: 100%;
}
.ghost-btn:hover { background: var(--cream); color: var(--rose); }
.ghost-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.link-btn {
  background: none; border: none; color: var(--rose);
  font: inherit; cursor: pointer; padding: 8px;
  font-size: 13px; font-weight: 500;
}
.link-btn:hover { text-decoration: underline; }

/* GENERATING */
.stage { display: grid; place-items: center; padding: 20px 0; }
.notes { display: flex; gap: 16px; font-size: 34px; margin-bottom: 18px; }
.notes span {
  animation: bob 1.6s ease-in-out infinite;
  color: var(--rose);
}
.notes span:nth-child(2) { animation-delay: 0.2s; color: var(--coral); }
.notes span:nth-child(3) { animation-delay: 0.4s; color: var(--teal); }
.notes span:nth-child(4) { animation-delay: 0.6s; color: var(--rose-light); }
.notes span:nth-child(5) { animation-delay: 0.8s; color: var(--coral); }
@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-14px); opacity: 1; }
}

.countdown {
  text-align: center; padding: 18px 32px;
  background: var(--cream); border-radius: 14px;
  border: 1px solid var(--line);
}
.countdown span {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  color: rgba(33,23,27,0.6); font-weight: 600;
}
.countdown strong {
  display: block; font-family: "Fraunces", serif; font-size: 38px;
  font-variant-numeric: tabular-nums; color: var(--rose);
}

.progress {
  height: 6px; background: var(--line); border-radius: 999px; overflow: hidden;
}
.progress__bar {
  height: 100%; width: 5%;
  background: linear-gradient(90deg, var(--rose), var(--coral));
  transition: width 0.4s ease;
}
.status {
  font-size: 14px; color: rgba(33,23,27,0.7); text-align: center;
  margin: 8px 0;
}

.gen-steps { display: flex; gap: 8px; justify-content: space-between; }
.gen-steps span {
  flex: 1; text-align: center; padding: 8px 4px; border-radius: 10px;
  font-size: 12px; color: rgba(33,23,27,0.55);
  background: #fff; border: 1px solid var(--line); font-weight: 500;
}
.gen-steps span.is-active {
  background: rgba(196,58,93,0.08); border-color: var(--rose); color: var(--rose); font-weight: 600;
}

.draft {
  background: var(--cream); border-radius: 12px; padding: 16px;
  border: 1px solid var(--line);
}
.draft__head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em;
  color: rgba(33,23,27,0.55); margin-bottom: 8px;
}
.draft__head i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--rose);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
.draft pre {
  margin: 0; font-family: "Fraunces", serif; font-size: 14px; line-height: 1.6;
  color: var(--ink); min-height: 90px; white-space: pre-wrap;
}

/* PREVIEW PLAYER */
.player {
  display: flex; gap: 16px; align-items: center;
  background: var(--cream); padding: 18px; border-radius: 16px;
  border: 1px solid var(--line);
}
.disc {
  width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle, var(--paper) 22%, var(--ink) 23%, var(--ink) 60%, var(--rose) 61%, var(--ink) 100%);
  position: relative; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(33,23,27,0.2);
}
.disc.is-spinning { animation: spin 4s linear infinite; }
.disc span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%; background: var(--rose);
}
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.player__main { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.player__top { display: flex; justify-content: space-between; align-items: center; }
.player__top strong { font-size: 16px; color: var(--ink); }
.player__top span { font-size: 12px; color: rgba(33,23,27,0.6); }

.timeline {
  height: 4px; background: rgba(33,23,27,0.1); border-radius: 999px; overflow: hidden;
}
#timelineFill {
  height: 100%; width: 0%; background: var(--rose); transition: width 0.16s linear;
}

.player__actions { display: flex; align-items: center; gap: 14px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--rose); border: none; color: white;
  font-size: 16px; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(196,58,93,0.3);
}
.icon-btn:hover { background: var(--rose-dark); }
.icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
#timeLabel { font-size: 12px; color: rgba(33,23,27,0.6); font-variant-numeric: tabular-nums; }

.lyrics {
  background: var(--cream); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px;
}
.lyrics__head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}
.lyrics__head h3 { margin: 0; font-family: "Fraunces", serif; font-size: 17px; }
.lyrics__head span { font-size: 12px; color: var(--rose); font-weight: 600; }
.lyrics pre {
  margin: 0; font-family: "Fraunces", serif; font-size: 15px; line-height: 1.7;
  white-space: pre-wrap; color: var(--ink); max-height: 320px; overflow-y: auto;
}

.preview-actions { display: flex; flex-direction: column; gap: 10px; }

/* PAYMENT */
.checkout-fields { display: flex; flex-direction: column; gap: 12px; }
.payment__box {
  background: var(--cream); border-radius: 14px; padding: 16px 18px;
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--line);
}
.payment__box div { display: flex; flex-direction: column; }
.payment__box span { font-size: 12px; color: rgba(33,23,27,0.6); }
.payment__box strong {
  font-size: 26px; font-family: "Fraunces", serif; color: var(--ink);
}
.payment__box p { margin: 0; font-size: 12px; color: rgba(33,23,27,0.55); }

.stripe-mount {
  min-height: 220px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.stripe-mount.is-hidden { display: none; }

/* SUCCESS */
.success__brand {
  text-align: center; font-family: "Fraunces", serif; font-size: 32px; font-weight: 800;
  margin-bottom: 4px; letter-spacing: -0.01em;
}
.success__brand span { color: var(--rose); }
.order-summary {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--cream); padding: 14px 18px; border-radius: 12px;
  border: 1px solid var(--line);
}
.order-summary strong {
  font-family: "Fraunces", serif; font-size: 22px; color: var(--ink);
}
.email-notice {
  background: rgba(23,108,114,0.08); border: 1px solid rgba(23,108,114,0.22);
  padding: 13px; border-radius: 12px; font-size: 14px; text-align: center;
  color: var(--teal); font-weight: 500;
}
.success__text { font-size: 14px; color: rgba(33,23,27,0.7); margin: 4px 0; }
.final-audio audio { width: 100%; }
.success__actions { display: flex; flex-direction: column; gap: 8px; }

/* OTO — one-time offer */
.oto {
  margin-top: 18px; padding: 20px;
  background: linear-gradient(135deg, rgba(196,58,93,0.06), rgba(232,95,85,0.06));
  border: 2px dashed var(--rose); border-radius: 16px;
}
.oto.is-hidden { display: none; }
.oto__tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: #fff; background: var(--rose);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.oto h3 { margin: 0 0 6px; font-family: "Fraunces", serif; font-size: 19px; color: var(--ink); }
.oto p { margin: 0 0 14px; font-size: 14px; color: rgba(33,23,27,0.72); }
.oto .field { margin-bottom: 14px; }
.oto .status { margin-top: 10px; min-height: 18px; }
.oto.purchased { border-style: solid; border-color: var(--teal); background: rgba(23,108,114,0.07); }

/* FOOTER */
.foot {
  text-align: center; padding: 28px; font-size: 12px; color: rgba(33,23,27,0.5);
  background: var(--paper); border-top: 1px solid var(--line);
}
.foot a { color: rgba(33,23,27,0.7); }

/* ============ MOBILE-FIRST: form perto do topo, menos rolagem ============ */
@media (max-width: 760px) {
  .hero { padding: 16px 16px 40px; }
  .topbar { margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
  .brand { font-size: 21px; }
  .topbar__price { font-size: 11px; padding: 7px 12px; }

  .hero__content { gap: 18px; }
  .hero__copy { padding-top: 4px; }
  .eyebrow { margin-bottom: 10px; font-size: 11px; }
  .hero h1 { font-size: clamp(26px, 7.5vw, 36px); margin-bottom: 12px; }
  /* texto longo some no mobile pra o form subir; badges viram linha enxuta */
  .hero__lead { display: none; }
  .hero__badges { gap: 6px; margin-bottom: 2px; }
  .hero__badges span { font-size: 11px; padding: 6px 10px; }

  .composer { padding: 18px 16px; border-radius: 18px; }
  .panel { gap: 13px; }
  .panel__head h2 { font-size: 21px; }
  .field input, .field select, .field textarea { font-size: 16px; } /* 16px evita zoom do iOS */
  .field textarea { min-height: 88px; }
  .segmented { grid-template-columns: 1fr 1fr; gap: 6px; }
  .segmented label { padding: 10px; font-size: 13px; }
  .primary { padding: 16px 18px; font-size: 16px; }

  /* player + oto compactos */
  .player { padding: 14px; gap: 12px; }
  .disc { width: 60px; height: 60px; }
  .lyrics pre { font-size: 14px; max-height: 240px; }
  .oto { padding: 16px; }
  .oto h3 { font-size: 17px; }
}

/* telas muito pequenas: estilos em 1 coluna */
@media (max-width: 380px) {
  .segmented { grid-template-columns: 1fr; }
}
