/* ========== RhymeTime — landing page ========== */

:root {
  /* base canvas — still deep, but PURPLE instead of sleepy navy */
  --night: #241946;
  --night-deep: #15082e;

  /* vibrant accent palette — the brand colors */
  --hot-pink:    #ff4b9c;
  --electric:    #9b59ff;
  --lime:        #a8ff5c;
  --sunshine:    #ffd700;
  --cyan:        #00e0ff;
  --bubblegum:   #ff89c2;

  /* compatibility shims — old names map to vibrant equivalents */
  --cream: #fff8e8;
  --peach: var(--hot-pink);
  --gold:  var(--sunshine);
  --gray-moon: var(--electric);
  --muted: rgba(255, 248, 232, 0.78);
  --border: rgba(255, 248, 232, 0.16);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(155, 89, 255, 0.35), transparent 60%),
    radial-gradient(900px 700px at -10% 80%, rgba(255, 75, 156, 0.30), transparent 60%),
    radial-gradient(700px 600px at 50% 120%, rgba(0, 224, 255, 0.18), transparent 70%),
    var(--night);
  color: var(--cream);
  font-family: 'Quicksand', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- vibrant confetti backdrop (was twinkly stars) ---------- */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(2px 2px at 12% 18%, #ffd700 99%, transparent),
    radial-gradient(1.6px 1.6px at 28% 72%, #ff4b9c 99%, transparent),
    radial-gradient(2.2px 2.2px at 44% 34%, #a8ff5c 99%, transparent),
    radial-gradient(1.6px 1.6px at 62% 88%, #00e0ff 99%, transparent),
    radial-gradient(2.4px 2.4px at 78% 22%, #ffd700 99%, transparent),
    radial-gradient(1.6px 1.6px at 88% 58%, #ff89c2 99%, transparent),
    radial-gradient(2px 2px at 8% 88%, #a8ff5c 99%, transparent),
    radial-gradient(1.6px 1.6px at 54% 12%, #00e0ff 99%, transparent),
    radial-gradient(2.2px 2.2px at 94% 78%, #ffd700 99%, transparent),
    radial-gradient(1.6px 1.6px at 36% 54%, #ff4b9c 99%, transparent);
  opacity: 0.85;
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle {
  from { opacity: 0.45; }
  to   { opacity: 0.85; }
}

/* ---------- shared ---------- */
section, header, footer { position: relative; z-index: 1; }

h1, h2, h3 {
  font-family: 'Nunito', 'Quicksand', sans-serif;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0;
}

em { font-style: italic; color: var(--sunshine); }

.cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--hot-pink) 0%, var(--electric) 100%);
  color: #fff;
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 16px 32px;
  border: none;
  border-radius: 999px;
  box-shadow:
    0 8px 28px rgba(255, 75, 156, 0.45),
    0 0 0 3px rgba(168, 255, 92, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  cursor: pointer;
}
.cta:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
  box-shadow:
    0 12px 32px rgba(255, 75, 156, 0.55),
    0 0 0 3px rgba(168, 255, 92, 0.25);
}

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  padding: 48px 24px 80px;
  max-width: 760px;
  margin: 0 auto;
}
.logo-wrap { margin-bottom: 36px; }
.logo { width: 100%; max-width: 420px; height: auto; }

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: 20px;
}
.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 28px;
}

/* ---------- hero sample frame ---------- */
.hero-sample {
  margin: 0 auto 36px;
  max-width: 520px;
  position: relative;
}
.hero-sample img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  border: 3px solid var(--lime);
  box-shadow:
    0 0 0 5px rgba(36, 25, 70, 0.6),
    0 18px 50px rgba(255, 75, 156, 0.45),
    0 0 80px rgba(155, 89, 255, 0.35);
  transform: rotate(-1.5deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-sample img:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow:
    0 0 0 5px rgba(36, 25, 70, 0.6),
    0 22px 60px rgba(255, 75, 156, 0.55),
    0 0 100px rgba(155, 89, 255, 0.45);
}
.hero-sample figcaption {
  text-align: center;
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--lime);
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(168, 255, 92, 0.5);
}

/* ---------- HOW IT WORKS ---------- */
.how {
  padding: 72px 24px;
  max-width: 1000px;
  margin: 0 auto;
}
.how h2 {
  text-align: center;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 48px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.steps li {
  background: linear-gradient(160deg, rgba(155, 89, 255, 0.18), rgba(255, 75, 156, 0.10) 60%, rgba(0, 224, 255, 0.10));
  border: 1px solid rgba(168, 255, 92, 0.20);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(2px);
}
.steps li:hover {
  transform: translateY(-4px);
  border-color: var(--lime);
  box-shadow: 0 14px 40px rgba(168, 255, 92, 0.18);
}
.step-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 14px;
}
.steps h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--sunshine);
  text-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}
.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- DISCO BALLS 🪩 ---------- */
/* Container scopes the absolute-positioned balls to the pricing section. */
.discoballs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.discoball {
  position: absolute;
  border-radius: 50%;
  /* Layered backgrounds, painted from TOP to BOTTOM:
     1. shine highlight (top-left)
     2. mirror tile grid (lines + lines for a checkered "facets" feel)
     3. base sphere shading (radial dark-edge for 3D)
     4. rainbow color wash (conic) — sits underneath everything else  */
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.0) 30%),
    repeating-linear-gradient(0deg,    rgba(0,0,0,0.45) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(90deg,   rgba(0,0,0,0.45) 0 1px, transparent 1px 9px),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0) 55%, rgba(0,0,0,0.55) 100%),
    conic-gradient(from 0deg, #ff4b9c, #ffd700, #a8ff5c, #00e0ff, #9b59ff, #ff89c2, #ff4b9c);
  background-size: 100% 100%, 9px 9px, 9px 9px, 100% 100%, 100% 100%;
  box-shadow:
    0 0 28px rgba(255, 215, 0, 0.55),
    0 0 70px rgba(255, 75, 156, 0.45),
    0 0 100px rgba(155, 89, 255, 0.30);
  filter: saturate(1.25);
  animation: db-bob 3.6s ease-in-out infinite alternate;
}
.discoball::before {
  /* hanging cord */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.0), rgba(255,255,255,0.55));
  transform: translateX(-50%);
}
.db-1 { top: 18px;  left: 6%;   width: 96px; height: 96px; animation-delay: 0s; }
.db-2 { top: 60px;  right: 8%;  width: 78px; height: 78px; animation-delay: -1.4s; }
.db-3 { top: 140px; left: 50%;  width: 64px; height: 64px; transform: translateX(-50%); animation: db-bob-center 4s ease-in-out infinite alternate; }
@keyframes db-bob {
  from { transform: translateY(0); }
  to   { transform: translateY(10px); }
}
@keyframes db-bob-center {
  from { transform: translateX(-50%) translateY(0); }
  to   { transform: translateX(-50%) translateY(10px); }
}

/* ---------- PRICING ---------- */
.pricing {
  padding: 72px 24px 96px;
  position: relative;
  display: flex;
  justify-content: center;
}
.price-card {
  position: relative;
  z-index: 1;
  background:
    linear-gradient(165deg, rgba(155, 89, 255, 0.20), rgba(255, 75, 156, 0.14) 60%, rgba(0, 224, 255, 0.14)),
    var(--night-deep);
  border: 2px solid var(--sunshine);
  border-radius: 22px;
  padding: 44px 40px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 60px rgba(255, 215, 0, 0.25),
    0 0 0 6px rgba(255, 215, 0, 0.08);
}
.price-label {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.75rem;
  color: var(--lime);
  margin: 0 0 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-shadow: 0 0 12px rgba(168, 255, 92, 0.45);
}

/* mini disco ball used as inline icon */
.plan-discoball {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      #ff4b9c, #ffd700, #a8ff5c, #00e0ff, #9b59ff, #ff89c2, #ff4b9c
    );
  box-shadow:
    inset -3px -3px 5px rgba(0,0,0,0.45),
    inset 2px 2px 4px rgba(255,255,255,0.4),
    0 0 10px rgba(255, 215, 0, 0.5);
  position: relative;
  animation: db-spin 5s linear infinite;
  vertical-align: middle;
}
.plan-discoball::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  mix-blend-mode: overlay;
}
.price {
  font-family: 'Nunito', sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--cream);
  margin: 0 0 8px;
  line-height: 1;
}
.price .dollar {
  font-size: 2rem;
  vertical-align: top;
  margin-right: 2px;
  color: var(--sunshine);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.55);
}
.price .per {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}
.includes {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
  text-align: left;
}
.includes li {
  padding: 8px 0;
  color: var(--muted);
  font-size: 0.98rem;
  border-bottom: 1px dashed var(--border);
}
.includes li:last-child { border-bottom: none; }
.includes li::before {
  content: "🪩  ";
  margin-right: 6px;
  filter: saturate(1.3);
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 32px 24px 40px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
footer p { margin: 0; }

/* ---------- BUTTON reset ---------- */
button.cta {
  border: none;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
}
.cta.wide { display: block; width: 100%; text-align: center; }

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 24, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  background: var(--night-deep);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 40px 32px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  z-index: 1;
  animation: modalIn 0.22s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 8px;
}
.modal-close:hover { color: var(--cream); background: rgba(255,255,255,0.05); }

.modal h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}
.modal-sub {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 0.98rem;
}
.modal-fine {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  margin: 16px 0 0;
}

/* form */
#story-form label {
  display: block;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
}
#story-form label > span:first-child {
  display: block;
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
#story-form input[type="email"],
#story-form input[type="text"],
#story-form input[type="number"],
#story-form select {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--cream);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  appearance: none;
  -webkit-appearance: none;
}
#story-form select {
  /* native chevron */
  background-image: linear-gradient(45deg, transparent 50%, var(--lime) 50%), linear-gradient(135deg, var(--lime) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
  cursor: pointer;
}
#story-form input:focus,
#story-form select:focus {
  border-color: var(--lime);
  background-color: rgba(168, 255, 92, 0.08);
  box-shadow: 0 0 0 3px rgba(168, 255, 92, 0.18);
}
#story-form input:invalid:not(:placeholder-shown) {
  border-color: rgba(255, 120, 120, 0.5);
}
.row-2 {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 12px;
}
.file-label input[type="file"] {
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.file-hint {
  display: block !important;
  margin-top: 6px !important;
  font-size: 0.78rem !important;
  color: var(--muted);
  font-weight: 500 !important;
}
.checkbox-row {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 20px !important;
  font-size: 0.88rem !important;
  color: var(--muted);
  font-weight: 500 !important;
  cursor: pointer;
}
.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--gold);
  flex-shrink: 0;
}
.checkbox-row > span:first-child { display: inline !important; margin: 0 !important; }

.success-note {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 8px;
  animation: float 2.4s ease-in-out infinite alternate;
}
@keyframes float {
  from { transform: translateY(0); }
  to   { transform: translateY(-6px); }
}
[data-step="success"] { text-align: center; }
[data-step="success"] h2 { margin-bottom: 8px; }

/* disable body scroll while open */
body.modal-open { overflow: hidden; }

/* ---------- grouped sections inside modal ---------- */
.group {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 4px;
  margin: 0 0 20px;
  background: rgba(255,255,255,0.02);
}
.group legend {
  padding: 2px 10px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
}
.group-q {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
  margin: 4px 0 10px;
  letter-spacing: 0.3px;
}

/* ---------- choice buttons (mom/dad, girl/boy) ---------- */
.choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.choice {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 8px !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
  margin: 0 !important;
}
.choice:hover {
  border-color: rgba(255, 201, 136, 0.35);
  background: rgba(255, 201, 136, 0.05);
}
.choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.choice:has(input:checked) {
  border-color: var(--gold);
  background: rgba(255, 201, 136, 0.10);
  box-shadow: 0 0 0 2px rgba(255, 201, 136, 0.25) inset;
}
.choice-emoji {
  display: block !important;
  font-size: 2rem !important;
  margin: 0 !important;
  line-height: 1;
}
.choice-label {
  display: block !important;
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: var(--cream);
  margin: 0 !important;
  letter-spacing: 0.3px;
}

/* ---------- payment step ---------- */
#payment-element {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 20px;
  min-height: 220px;
}
.payment-message {
  color: #ff8a8a;
  background: rgba(255, 90, 90, 0.08);
  border: 1px solid rgba(255, 90, 90, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 0.9rem;
  font-weight: 600;
}
.link-back {
  display: block;
  margin: 16px auto 0;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.15s ease;
}
.link-back:hover { color: var(--cream); }

.cta.wide[disabled] {
  opacity: 0.6;
  cursor: wait;
  transform: none !important;
}
