* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --bg-deep: #0a0012;
  --text: #ecd5e5;
  --text-dim: #b895b0;
  --accent: #f0a0b8;
  --accent-soft: #f5c8d8;
  --accent-warm: #f8d0a0;
  --glow: #d47090;
  --card-bg: rgba(18,0,30,0.75);
  --card-border: rgba(240,160,184,0.15);
}

html { scroll-behavior:smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════ background ═══════════════════════ */

.bg-glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(240,120,160,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 80% 90%, rgba(240,160,120,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(180,80,120,0.06) 0%, transparent 70%);
  animation: breathe 8s ease-in-out infinite alternate;
}

@keyframes breathe {
  0%   { opacity:0.7; transform:scale(1); }
  100% { opacity:1; transform:scale(1.05); }
}

/* ═══════════════════════ hearts ═══════════════════════ */

.hearts-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}

.heart {
  position: absolute; bottom: -10%;
  animation: float-heart linear infinite;
}

.heart svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 6px currentColor);
}

@keyframes float-heart {
  0%   { transform:translateY(0) translateX(0) rotate(0deg) scale(0.6); opacity:0; }
  8%   { opacity:var(--opacity,0.3); }
  85%  { opacity:var(--opacity,0.3); }
  100% { transform:translateY(-110vh) translateX(var(--sway,30px)) rotate(25deg) scale(1.1); opacity:0; }
}

/* ═══════════════════════ sparkles ═══════════════════════ */

.sparkles-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

.sparkle {
  position: absolute; border-radius: 50%; background: var(--accent);
  animation: twinkle ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent-soft);
}

@keyframes twinkle {
  0%, 100% { opacity:0; transform:scale(0.5); }
  50%      { opacity:0.7; transform:scale(1); }
}

/* ═══════════════════════ wrapper & steps ═══════════════════════ */

.wrapper {
  position: relative; z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 24px 24px 80px;
}

/* ── progress dots ── */
.progress {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px 0 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, rgba(10,0,18,0.7) 30%, transparent 100%);
}

.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(240,160,184,0.2);
  cursor: pointer;
  transition: all 0.45s cubic-bezier(0.16,1,0.3,1);
  flex-shrink: 0;
}

.dot.active {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(240,160,184,0.5);
  width: 28px;
  border-radius: 20px;
}

/* ── step ── */
.step {
  display: none;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 160px);
  padding: 24px 0 32px;
  animation: step-in 0.55s cubic-bezier(0.16,1,0.3,1);
}

.step.active { display: flex; }

@keyframes step-in {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}

.step-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  width: 100%;
  max-width: 500px;
}

/* ═══════════════════════ step 0 ── hero ═══════════════════════ */

.tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--accent-warm);
  margin-bottom: 24px;
  font-weight: 500;
  opacity: 0;
  animation: fade-up 0.8s 0.2s ease forwards;
}

.step[data-step="0"] h1,
.step[data-step="0"] .hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

.step[data-step="0"] h1 .word,
.step[data-step="0"] .hero h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  background: linear-gradient(135deg, #f8d0e0 0%, #f0a0c0 40%, #f8d0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-right: 0.3em;
}

.step[data-step="0"] h1 .word.in,
.step[data-step="0"] .hero h1 .word.in {
  opacity: 1;
  transform: translateY(0);
}

.sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.8;
  opacity: 0;
  animation: fade-up 0.8s 0.8s ease forwards;
}

@keyframes fade-up {
  from { opacity:0; transform:translateY(12px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ═══════════════════════ shared text styles ═══════════════════════ */

.lead {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 20px;
  color: var(--text);
}

.body-text {
  font-size: 1.02rem;
  margin-bottom: 18px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text);
}

.closing-line {
  font-size: 1.02rem;
  margin-bottom: 16px;
  font-weight: 300;
  line-height: 1.8;
}

em {
  font-style: normal;
  color: var(--accent-soft);
  font-weight: 500;
  text-shadow: 0 0 20px rgba(240,160,184,0.25);
}

/* ═══════════════════════ heart divider ═══════════════════════ */

.heart-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.heart-divider svg {
  width: 20px; height: 20px;
  color: var(--accent);
  animation: pulse-heart 2s ease-in-out infinite;
  flex-shrink: 0;
}

.heart-divider svg:nth-child(2) {
  width: 28px; height: 28px;
  color: #f5a0b8;
  animation-delay: 0.3s;
  filter: drop-shadow(0 0 10px rgba(240,160,184,0.5));
}

.heart-divider svg:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes pulse-heart {
  0%, 100% { transform:scale(1); opacity:0.6; }
  50%      { transform:scale(1.15); opacity:1; }
}

/* ═══════════════════════ ask ═══════════════════════ */

.ask {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  color: #fff;
  font-weight: 500;
  text-align: center;
  margin: 12px 0 28px;
  text-shadow: 0 0 40px rgba(240,160,184,0.15);
}

/* ═══════════════════════ next button ═══════════════════════ */

.next-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  background: transparent;
  border: 1px solid rgba(240,160,184,0.3);
  border-radius: 40px;
  color: var(--accent-soft);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
  margin-top: auto;
  letter-spacing: 0.5px;
}

.next-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(240,160,184,0.18);
  background: rgba(240,160,184,0.06);
}

.next-btn svg {
  width: 18px; height: 18px;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}

.next-btn:hover svg {
  transform: translateX(3px);
}

/* ═══════════════════════ form card ═══════════════════════ */

.form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px 28px;
  text-align: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.03);
  width: 100%;
  max-width: 400px;
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(240,160,184,0.3), transparent 40%, transparent 60%, rgba(240,160,184,0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.input-group {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(240,160,184,0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
  margin-bottom: 18px;
}

.input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 28px rgba(240,160,184,0.16);
  background: rgba(255,255,255,0.06);
}

.prefix {
  padding: 16px 12px 16px 20px;
  color: var(--text-dim);
  font-size: 1.05rem;
  font-weight: 400;
  user-select: none;
  flex-shrink: 0;
}

.input-group input {
  flex: 1;
  padding: 16px 20px 16px 4px;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
  letter-spacing: 2.5px;
  width: 100%;
  min-width: 0;
}

.input-group input::placeholder {
  color: rgba(240,180,200,0.3);
  letter-spacing: 1.5px;
}

#submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 44px;
  background: linear-gradient(135deg, #f0a0b8, #d47090);
  border: none;
  border-radius: 40px;
  color: #1a0010;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
  font-family: 'Inter', sans-serif;
  position: relative;
  overflow: hidden;
  width: 100%;
}

#submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.35s;
}

#submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(212,112,144,0.35);
}

#submit-btn:hover::after { opacity:1; }

#submit-btn:active { transform:translateY(0); }

#submit-btn.loading {
  opacity: 0.65;
  pointer-events: none;
}

.btn-arrow {
  width: 20px; height: 20px;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}

#submit-btn:hover .btn-arrow { transform:translateX(4px); }

/* ═══════════════════════ shake ═══════════════════════ */

.shake { animation: shake 0.45s ease; }

@keyframes shake {
  0%, 100% { transform:translateX(0); }
  20%      { transform:translateX(-6px); }
  40%      { transform:translateX(6px); }
  60%      { transform:translateX(-4px); }
  80%      { transform:translateX(4px); }
}

/* ═══════════════════════ success / error ═══════════════════════ */

.success, .error { padding: 16px 0 0; border-radius: 16px; }

.success { animation: pop-in 0.5s cubic-bezier(0.16,1,0.3,1); }

.success-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  margin-bottom: 16px;
  animation: pulse-heart 2s ease-in-out infinite;
}

.success-heart svg {
  width: 100%; height: 100%;
  color: #f0a0b8;
  filter: drop-shadow(0 0 16px rgba(240,160,184,0.5));
}

.success p { color: #f0c8d8; font-size: 1.15rem; font-weight: 400; }

.success .small { font-size: 0.9rem; color: var(--text-dim); margin-top: 4px; }

.error {
  background: rgba(220,140,140,0.1);
  border: 1px solid rgba(220,140,140,0.2);
  animation: fade-up 0.4s ease;
  margin-top: 12px;
  padding: 14px;
}

.error p { color: #f0c0c0; font-size: 0.9rem; }

.hidden { display:none; }

@keyframes pop-in {
  from { opacity:0; transform:scale(0.9); }
  to   { opacity:1; transform:scale(1); }
}

/* ═══════════════════════ footer ═══════════════════════ */

footer {
  position: relative; z-index: 1;
  text-align: center;
  padding: 40px 24px;
  color: var(--text-dim);
  font-size: 0.8rem;
  opacity: 0.35;
  letter-spacing: 0.5px;
}

/* ═══════════════════════ responsive ═══════════════════════ */

@media (max-width: 480px) {
  .wrapper { padding: 16px 20px 60px; }

  .progress { padding: 12px 0 10px; }

  .step { min-height: calc(100vh - 140px); padding: 16px 0 24px; }

  .step[data-step="0"] h1 { font-size: 2rem; }

  .sub { font-size: 1.05rem; }

  .lead { font-size: 1.1rem; }
  .body-text, .closing-line { font-size: 0.95rem; margin-bottom: 14px; }

  .ask { font-size: 1.3rem; margin: 10px 0 22px; }

  .heart-divider { gap: 10px; margin-bottom: 24px; }
  .heart-divider svg { width: 16px; height: 16px; }
  .heart-divider svg:nth-child(2) { width: 22px; height: 22px; }

  .form-card { padding: 24px 18px; }

  .next-btn { padding: 12px 28px; font-size: 0.9rem; }

  .input-group input { font-size: 1rem; padding: 14px 16px 14px 4px; }
  .prefix { font-size: 0.95rem; padding: 14px 10px 14px 16px; }
  #submit-btn { padding: 14px 36px; }
}

@media (max-height: 650px) {
  .step { min-height: auto; }

  .step[data-step="0"] h1 { font-size: 1.8rem; margin-bottom: 16px; }

  .tag { margin-bottom: 12px; }

  .sub { font-size: 1rem; }

  .lead { font-size: 1.05rem; margin-bottom: 12px; }
  .body-text, .closing-line { font-size: 0.9rem; margin-bottom: 10px; }

  .heart-divider { margin-bottom: 16px; }

  .ask { margin: 8px 0 14px; }

  .next-btn { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
  }
}
