/* ==============================================
   Give a Love Song — Design System
   Warm, trustworthy, mobile-first.
   ============================================== */

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #2D2B32;
  background: #FFF9F5;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", Times, serif;
  color: #1F1D2B;
  line-height: 1.25;
  font-weight: 400;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; }

.subtitle {
  font-size: 1.1rem;
  color: #6B6770;
  margin-bottom: 1rem;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: #C17F59;
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: #A86B48; }

strong { font-weight: 600; }

/* --- Layout --- */
.page,
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.25rem 6rem;
}

.section {
  padding: 3rem 0;
  position: relative;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  margin-bottom: 0.5rem;
}

.section + .section {
  border-top: 1px solid #F0E8E0;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #C17F59;
  margin-bottom: 0.5rem;
}

.section-heading {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: #6B6770;
  margin-bottom: 1.5rem;
}

/* --- Cards --- */
.card {
  background: #FFFFFF;
  border: 1px solid #F0E8E0;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
}

.card + .card {
  margin-top: 1rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  min-height: 52px;
  min-width: 44px;
  line-height: 1.3;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #C17F59;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(193, 127, 89, 0.3);
}
.btn-primary:hover {
  background: #A86B48;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(193, 127, 89, 0.35);
}

.btn-secondary {
  background: #F0E8E0;
  color: #2D2B32;
}
.btn-secondary:hover {
  background: #E5D9CE;
  color: #2D2B32;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  min-height: 58px;
  border-radius: 12px;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero-badge {
  display: inline-block;
  background: #FDF5ED;
  color: #C17F59;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.1rem;
  color: #6B6770;
  margin-bottom: 1.75rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.hero-decoration {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: #FDF5ED;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* --- How It Works --- */
.steps-timeline {
  position: relative;
  padding-left: 2.5rem;
  margin-top: 2rem;
}

.steps-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #F0E8E0;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  padding-bottom: 2rem;
}

.timeline-step:last-child {
  padding-bottom: 0;
}

.timeline-marker {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #C17F59;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-left: -2.5rem;
}

.timeline-number {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #C17F59;
  line-height: 1;
}

.timeline-content {
  padding-top: 0.2rem;
}

.timeline-content h3 {
  font-size: 1.15rem;
  margin-bottom: 0.2rem;
}

.timeline-content p {
  font-size: 0.95rem;
  color: #6B6770;
  margin-bottom: 0;
}

/* --- Genre Selector --- */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}

.genre-card {
  background: #FFFFFF;
  border: 2px solid #F0E8E0;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.genre-card:active {
  transform: scale(0.97);
}

.genre-card.selected {
  border-color: #C17F59;
  background: #FDF5ED;
}

.genre-card .genre-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  display: block;
}

.genre-card .genre-name {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  color: #1F1D2B;
  display: block;
}

.genre-card .genre-desc {
  font-size: 0.8rem;
  color: #8B7E74;
  margin-top: 0.15rem;
  display: block;
}

.genre-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: #C17F59;
  padding: 0.15rem 0.55rem;
  border-radius: 100px;
  white-space: nowrap;
}

/* --- Personalization Form --- */
.wizard-container {
  background: #FFFFFF;
  border: 1px solid #F0E8E0;
  border-radius: 16px;
  overflow: hidden;
}

.wizard-field {
  padding: 2rem 1.5rem;
  border-bottom: 1px solid #F0E8E0;
}

.wizard-field:last-of-type {
  border-bottom: none;
}

.wizard-field h3 {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
  color: #1F1D2B;
}

.wizard-step-desc {
  color: #6B6770;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.wizard-field input,
.wizard-field textarea,
.wizard-field select {
  display: block;
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #D4CFC8;
  border-radius: 10px;
  font-size: 1.1rem;
  font-family: inherit;
  color: #2D2B32;
  background: #FFFBFA;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.wizard-field input:focus,
.wizard-field textarea:focus,
.wizard-field select:focus {
  outline: none;
  border-color: #C17F59;
  box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.12);
}

.wizard-field textarea {
  resize: vertical;
  min-height: 110px;
}

.wizard-field input.invalid,
.wizard-field textarea.invalid,
.wizard-field select.invalid {
  border-color: #D44C3A;
}

.wizard-submit {
  padding: 1.5rem;
  border-top: 1px solid #F0E8E0;
  text-align: center;
}

/* Example chips */
.examples-row,
.bubble-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.example-chip,
.bubble-chip {
  display: inline-block;
  padding: 0.625rem 1.125rem;
  background: #FDF5ED;
  border: 2px solid #F0E8E0;
  border-radius: 100px;
  font-size: 0.95rem;
  color: #5C4A3A;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: inherit;
  line-height: 1.3;
  min-height: 44px;
  white-space: nowrap;
}

.example-chip:hover,
.bubble-chip:hover {
  background: #F5E6D3;
  border-color: #D4A574;
}

.example-chip.selected,
.bubble-chip.selected {
  background: #C17F59;
  color: #FFFFFF;
  border-color: #C17F59;
}

.wizard-email-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: #FDF5ED;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #5C4A3A;
}

.wizard-email-note .note-icon {
  flex-shrink: 0;
  font-size: 1.1rem;
  margin-top: 1px;
}

/* Price badge in final step */
.price-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem;
  background: #FDF5ED;
  border-radius: 10px;
  margin-top: 1rem;
}

.price-amount {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1F1D2B;
}

.price-label {
  font-size: 0.9rem;
  color: #6B6770;
  text-align: left;
  line-height: 1.4;
}

/* --- Song Examples --- */
.example-card {
  background: #FFFFFF;
  border: 1px solid #F0E8E0;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.example-card + .example-card {
  margin-top: 0.75rem;
}

.example-play {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: #C17F59;
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: background 0.2s;
}

.example-play:hover { background: #A86B48; }
.example-play.playing { background: #8B9D83; }

.example-info {
  flex: 1;
  min-width: 0;
}

.example-occasion {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #C17F59;
  background: #FDF5ED;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 0.35rem;
}

.example-info h4 {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.example-lyric {
  font-size: 0.85rem;
  color: #6B6770;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* --- Testimonials --- */
.testimonial {
  background: #FDF5ED;
  border-radius: 12px;
  padding: 1.75rem;
  border: 1px solid #F0E8E0;
}

.testimonial + .testimonial {
  margin-top: 1rem;
}

.testimonial-stars {
  color: #D4A574;
  font-size: 1rem;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.testimonial-text {
  font-family: Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #2D2B32;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #E5D9CE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #8B7E74;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.testimonial-relation {
  font-size: 0.8rem;
  color: #6B6770;
}

/* --- Trust Section --- */
.trust-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.trust-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: #FFFFFF;
  border: 1px solid #F0E8E0;
  border-radius: 12px;
}

.trust-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #FDF5ED;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.trust-item h4 {
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.trust-item p {
  font-size: 0.9rem;
  color: #6B6770;
  margin-bottom: 0;
}

.payment-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #8B7E74;
}

/* --- Pricing --- */
.pricing-card {
  background: #FFFFFF;
  border: 2px solid #C17F59;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
}

.pricing-card .price {
  font-family: Georgia, serif;
  font-size: 3rem;
  color: #1F1D2B;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-card .price-label-top {
  font-size: 0.85rem;
  color: #6B6770;
  margin-bottom: 0.5rem;
}

.pricing-includes {
  list-style: none;
  margin: 1.25rem 0;
  text-align: left;
  display: inline-block;
}

.pricing-includes li {
  padding: 0.35rem 0;
  font-size: 0.95rem;
  color: #2D2B32;
}

.pricing-includes li::before {
  content: "✓";
  color: #8B9D83;
  font-weight: 700;
  margin-right: 0.5rem;
}

/* --- FAQ --- */
.faq-item {
  border-bottom: 1px solid #F0E8E0;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  color: #2D2B32;
  text-align: left;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

.faq-question:hover { color: #C17F59; }

.faq-icon {
  flex-shrink: 0;
  margin-left: 1rem;
  font-size: 1.2rem;
  color: #C17F59;
  transition: transform 0.2s;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
  font-size: 0.95rem;
  color: #6B6770;
  line-height: 1.65;
}

.faq-item.open .faq-answer {
  display: block;
}

/* --- Sticky Mobile CTA --- */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: #FFFFFF;
  border-top: 1px solid #F0E8E0;
  z-index: 100;
  opacity: 0;
  transform: translateY(100%);
  pointer-events: none;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.06);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.sticky-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sticky-cta .btn {
  width: 100%;
}

/* --- Error --- */
.error-message {
  background: #FFF3F2;
  color: #B33A2E;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.95rem;
  border: 1px solid #F5C6CB;
  display: none;
}

/* --- Footer --- */
.page-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  font-size: 0.8rem;
  color: #8B7E74;
}

.page-footer a {
  color: #8B7E74;
  text-decoration: underline;
}

/* --- Success / Lookup pages (shared with success.html) --- */
.success-content,
.lookup-section,
.lookup {
  background: #FFFFFF;
  border: 1px solid #F0E8E0;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  margin-bottom: 1.5rem;
}

.order-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-pending    { background: #FDF5ED; color: #C17F59; }
.status-paid       { background: #E8F0FE; color: #4A7DBF; }
.status-generating { background: #F3E5F5; color: #8B5FBF; }
.status-completed  { background: #E8F5E9; color: #5A8B5F; }
.status-failed     { background: #FFF3F2; color: #B33A2E; }

.status-note {
  color: #8B7E74;
  font-style: italic;
  font-size: 0.9rem;
}

/* Shared form styles (success, lookup pages) */
form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

form input[type="email"],
form input[type="text"] {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  border: 2px solid #D4CFC8;
  border-radius: 10px;
  font-size: 1.1rem;
  font-family: inherit;
  color: #2D2B32;
  background: #FFFBFA;
  transition: border-color 0.2s, box-shadow 0.2s;
}

form input[type="email"]:focus,
form input[type="text"]:focus {
  outline: none;
  border-color: #C17F59;
  box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.12);
}

#lookup-results {
  margin-top: 1.5rem;
}

/* --- Audio Player (listen.html) --- */
.song-card {
  background: #FFFFFF;
  border: 1px solid #F0E8E0;
  border-radius: 16px;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.song-card h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
}

.song-card .occasion {
  color: #8B7E74;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Record visual */
.record-wrap {
  width: 180px;
  height: 180px;
  margin: 0 auto 2rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.record-wrap.spinning {
  animation: spin 6s linear infinite;
}

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

.record {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #C17F59, #A86B48);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 32px rgba(193, 127, 89, 0.25);
}

.record-label {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: #FFF9F5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-hole {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #C17F59;
}

.record-groove {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  inset: 10px;
  pointer-events: none;
}

.record-groove:nth-child(2) { inset: 24px; }
.record-groove:nth-child(3) { inset: 38px; }

/* Player controls */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 1.5rem;
}

.player-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
}

.player-btn:active { transform: scale(0.95); }

.btn-play {
  width: 62px; height: 62px;
  background: #C17F59;
  color: #FFFFFF;
}
.btn-play:hover { background: #A86B48; }
.btn-play svg { width: 26px; height: 26px; margin-left: 3px; }

.btn-icon {
  background: #F0E8E0;
  color: #5C4A3A;
}
.btn-icon:hover { background: #E5D9CE; }
.btn-icon svg { width: 20px; height: 20px; }

/* Progress bar */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.time {
  font-size: 0.8rem;
  color: #8B7E74;
  font-variant-numeric: tabular-nums;
  min-width: 38px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: #F0E8E0;
  border-radius: 2px;
  cursor: pointer;
  margin: 0;
  padding: 0;
  border: none;
}

input[type="range"]:focus { outline: none; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #C17F59;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #C17F59;
  border: none;
  cursor: pointer;
}

/* Lookup form (listen.html lookup state) */
.lookup input {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  border: 2px solid #D4CFC8;
  border-radius: 10px;
  font-size: 1.1rem;
  font-family: inherit;
  background: #FFFBFA;
}

.lookup input:focus {
  outline: none;
  border-color: #C17F59;
  box-shadow: 0 0 0 3px rgba(193, 127, 89, 0.12);
}

/* --- Responsive --- */
@media (max-width: 480px) {
  body { font-size: 17px; }

  .hero h1 { font-size: 1.75rem; }
  .hero p { font-size: 1rem; }

  .section-heading { font-size: 1.5rem; }

  .steps-timeline {
    padding-left: 2.25rem;
  }

  .steps-timeline::before {
    left: 21px;
  }

  .timeline-marker {
    width: 42px;
    height: 42px;
    min-width: 42px;
    margin-left: -2.25rem;
  }

  .timeline-number {
    font-size: 1.05rem;
  }

  .timeline-content h3 {
    font-size: 1.05rem;
  }

  .timeline-content p {
    font-size: 0.85rem;
  }

  .genre-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .genre-card {
    padding: 1rem 0.75rem;
  }

  .wizard-field input,
  .wizard-field textarea,
  .wizard-field select {
    font-size: 1rem;
    padding: 0.75rem 0.875rem;
  }

  .btn { font-size: 1rem; }
  .btn-large { font-size: 1.1rem; }

  .example-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .song-card { padding: 2rem 1rem 1.5rem; }
}
