/* Voicegram — Styles */

:root {
  --orange: #ff6b35;
  --orange-light: #FFF3ED;
  --orange-dark: #e55a25;
  --text: #1a1a2e;
  --text-light: #6b6b80;
  --border: #eee;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 24px;
  --shadow: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; }
a { color: inherit; }
img { max-width: 100%; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

.btn-ghost {
  background: transparent;
  color: var(--text-light);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--orange); }

.btn-nav {
  padding: 8px 16px;
  font-size: 14px;
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-nav:hover { background: var(--orange-dark); }

.btn-lg { padding: 14px 28px; font-size: 16px; }

/* ============ NAV ============ */
nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a:not(.btn) {
  font-size: 15px;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: var(--orange); }

.back-link {
  font-size: 14px;
  color: var(--text-light);
  text-decoration: none;
}
.back-link:hover { color: var(--orange); }

/* ============ HERO ============ */
.hero {
  background: linear-gradient(160deg, #FFF8F3 0%, #FFFFFF 60%);
  padding: 80px 24px;
  text-align: center;
  overflow: hidden;
}

.hero-inner { max-width: 900px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: var(--orange-light);
  color: var(--orange-dark);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-light);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.card-design {
  width: 200px;
  height: 140px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,0,0,0.06);
}

.card-design.birthday { background: #FFE0D0; transform: rotate(-3deg); }
.card-design .card-confetti { font-size: 28px; margin-bottom: 8px; }
.card-design .card-from { font-family: var(--font-head); font-size: 13px; color: #888; margin-top: 8px; }

.card-mic-icon { transform: translateY(-8px); }
.card-voice-wave {
  display: flex;
  gap: 3px;
  align-items: center;
  height: 30px;
}
.card-voice-wave span {
  display: block;
  width: 3px;
  background: var(--orange);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}
.card-voice-wave span:nth-child(1) { height: 10px; animation-delay: 0s; }
.card-voice-wave span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.card-voice-wave span:nth-child(3) { height: 22px; animation-delay: 0.2s; }
.card-voice-wave span:nth-child(4) { height: 14px; animation-delay: 0.3s; }
.card-voice-wave span:nth-child(5) { height: 20px; animation-delay: 0.4s; }
.card-voice-wave span:nth-child(6) { height: 26px; animation-delay: 0.5s; }
.card-voice-wave span:nth-child(7) { height: 18px; animation-delay: 0.6s; }
.card-voice-wave span:nth-child(8) { height: 24px; animation-delay: 0.7s; }
.card-voice-wave span:nth-child(9) { height: 12px; animation-delay: 0.8s; }
.card-voice-wave span:nth-child(10) { height: 18px; animation-delay: 0.9s; }

@keyframes wave {
  0%, 100% { transform: scaleY(1); opacity: 0.4; }
  50% { transform: scaleY(1.8); opacity: 1; }
}

/* ============ SECTIONS ============ */
.section-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 24px; }
section h2 {
  font-size: clamp(28px, 5vw, 40px);
  text-align: center;
  margin-bottom: 48px;
  font-weight: 700;
}

/* ============ DELIVERY METHODS ============ */
.delivery-methods { background: #fafafa; }
.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.method-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  border: 2px solid transparent;
}

.method-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.method-card.featured { border-color: var(--orange); }
.method-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.method-icon { margin-bottom: 16px; }
.method-card h3 { font-size: 20px; margin-bottom: 8px; }
.method-card p { font-size: 14px; color: var(--text-light); line-height: 1.6; margin-bottom: 16px; }
.method-price { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--orange); }

/* ============ HOW IT WORKS ============ */
.steps { max-width: 700px; margin: 0 auto; }
.step {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: white;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.step-num {
  width: 40px;
  height: 40px;
  background: var(--orange);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.step-content { flex: 1; }
.step-content h3 { font-size: 18px; margin-bottom: 4px; }
.step-content p { font-size: 14px; color: var(--text-light); }
.step-visual { flex-shrink: 0; }
.step-arrow { text-align: center; font-size: 24px; color: #ccc; padding: 8px; }

.record-btn-large { width: 64px; height: 64px; }
.mini-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mini-card { width: 50px; height: 36px; border-radius: 8px; }
.send-icons { display: flex; gap: 12px; font-size: 28px; }

.how-cta { text-align: center; margin-top: 40px; }

/* ============ USE CASES ============ */
.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.use-case {
  background: #fafafa;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
}
.use-case-emoji { font-size: 36px; margin-bottom: 12px; }
.use-case h3 { font-size: 18px; margin-bottom: 8px; }
.use-case p { font-size: 14px; color: var(--text-light); line-height: 1.6; }

/* ============ PRICING ============ */
.pricing { background: #fafafa; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.pricing-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  border: 2px solid transparent;
}
.pricing-card.featured { border-color: var(--orange); transform: scale(1.05); }
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 12px;
}
.pricing-label { font-size: 14px; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.pricing-price { font-family: var(--font-head); font-size: 36px; font-weight: 700; margin-bottom: 20px; }
.pricing-price span { font-size: 14px; font-weight: 400; color: var(--text-light); }
.pricing-features { list-style: none; margin-bottom: 24px; text-align: left; }
.pricing-features li { font-size: 15px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pricing-features li:last-child { border-bottom: none; }

/* ============ FAQ ============ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}
.faq-item h4 { font-size: 16px; margin-bottom: 8px; color: var(--text); }
.faq-item p { font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* ============ FINAL CTA ============ */
.final-cta { background: linear-gradient(135deg, var(--orange) 0%, #ff8c5a 100%); color: white; text-align: center; }
.final-cta h2 { color: white; }
.final-cta p { color: rgba(255,255,255,0.85); font-size: 18px; margin-bottom: 24px; }
.final-cta .btn-primary { background: white; color: var(--orange); border-color: white; }

/* ============ FOOTER ============ */
footer { background: #fafafa; border-top: 1px solid var(--border); padding: 32px 24px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: 15px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 14px; color: var(--text-light); text-decoration: none; }
.footer-links a:hover { color: var(--orange); }
.footer-copy { font-size: 13px; color: #aaa; }

/* ============ CREATE PAGE ============ */
.create-main {
  min-height: calc(100vh - 60px);
  background: linear-gradient(160deg, #FFF8F3 0%, #FFFFFF 60%);
  padding: 40px 24px;
}

.create-container {
  max-width: 620px;
  margin: 0 auto;
}

/* Step panels */
.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.step-header { text-align: center; margin-bottom: 32px; }
.step-indicator { font-size: 13px; color: var(--orange); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.step-header h2 { font-size: 28px; margin-bottom: 8px; }
.step-header p { font-size: 15px; color: var(--text-light); }

/* ============ RECORDER ============ */
.recorder {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 24px;
}

.recorder-timer {
  font-family: var(--font-head);
  font-size: 48px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  min-height: 58px;
}

.waveform-container {
  background: #fafafa;
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
}

#waveformCanvas { display: block; width: 100%; height: 80px; }

.recorder-controls { margin-bottom: 16px; }
.recorder-controls svg { cursor: pointer; transition: transform 0.2s; }
.recorder-controls svg:hover { transform: scale(1.05); }
.recorder-controls svg:active { transform: scale(0.95); }
.record-hint { font-size: 14px; color: var(--text-light); margin-top: 8px; }

.recorder-actions { display: flex; gap: 12px; justify-content: center; }

.audio-preview audio { width: 100%; margin-top: 16px; }

/* ============ TEMPLATES ============ */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.template-card {
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid transparent;
  transition: all 0.2s;
  background: white;
  box-shadow: var(--shadow);
}
.template-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.template-card.selected { border-color: var(--orange); }

.template-preview {
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.template-preview .t-confetti { font-size: 20px; margin-bottom: 4px; }
.template-preview .t-heart { font-size: 28px; }
.template-preview .t-text { font-family: var(--font-head); font-size: 13px; font-weight: 600; color: #333; }
.template-preview .t-sub { font-size: 11px; color: #888; }
.template-preview .t-blank { color: #aaa; }
.template-name { font-size: 12px; text-align: center; padding: 8px; font-weight: 500; color: var(--text-light); }

/* Optional message */
.optional-message { margin-bottom: 32px; }
.optional-message label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.optional-message input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s;
  background: white;
}
.optional-message input:focus { outline: none; border-color: var(--orange); }
.char-count { font-size: 12px; color: var(--text-light); text-align: right; margin-top: 4px; }

/* ============ DELIVERY OPTIONS ============ */
.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.delivery-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: white;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}
.delivery-card:hover { border-color: #ccc; }
.delivery-card.selected { border-color: var(--orange); background: var(--orange-light); }
.delivery-icon { font-size: 28px; }
.delivery-info { flex: 1; }
.delivery-info h4 { font-size: 16px; margin-bottom: 2px; }
.delivery-info p { font-size: 13px; color: var(--text-light); }
.delivery-price { font-family: var(--font-head); font-weight: 700; color: var(--orange); font-size: 16px; }
.delivery-check { font-size: 20px; color: var(--orange); font-weight: 700; opacity: 0; }
.delivery-card.selected .delivery-check { opacity: 1; }

/* ============ RECIPIENT FORM ============ */
.recipient-form { margin-bottom: 32px; }
.recipient-fields { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 600; }
.form-group input {
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color 0.2s;
  background: white;
}
.form-group input:focus { outline: none; border-color: var(--orange); }
.form-row { display: flex; gap: 12px; }
.form-group-sm { flex: 1; }

/* ============ CONFIRM STEP ============ */
.confirm-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 32px;
  border: 1px solid var(--border);
}
.confirm-preview {
  background: #fafafa;
  padding: 24px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}
.confirm-mini-card {
  width: 180px;
  height: 120px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}
.confirm-details { padding: 24px; }
.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-label { font-size: 14px; color: var(--text-light); }
.confirm-value { font-size: 14px; font-weight: 500; text-align: right; max-width: 60%; }
.confirm-divider { height: 1px; background: var(--border); margin: 8px 0; }
.confirm-total .confirm-label { font-weight: 700; color: var(--text); }
.confirm-total .confirm-value { font-family: var(--font-head); font-size: 24px; font-weight: 700; color: var(--orange); }

.payment-section { text-align: center; padding: 24px; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid var(--border); }
.payment-note { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }

/* ============ SUCCESS ============ */
.success-content { text-align: center; padding: 48px 24px; }
.success-icon { font-size: 64px; margin-bottom: 16px; }
.success-content h2 { font-size: 28px; margin-bottom: 12px; }
.success-content p { font-size: 16px; color: var(--text-light); margin-bottom: 32px; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============ STEP NAV ============ */
.step-nav { display: flex; gap: 12px; justify-content: space-between; }

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .step { flex-direction: column; text-align: center; }
  .step-visual { order: -1; }
  .form-row { flex-direction: column; }
  .pricing-card.featured { transform: scale(1); }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero h1 { font-size: 36px; }
}

/* ============ FULFILLMENT NOTE ============ */
.fulfillment-note {
  background: #f0f7ff;
  border: 1px solid #d0e4ff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
}

/* ============ PAYMENT TABS ============ */
.payment-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  border-bottom: 2px solid #eee;
}

.payment-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fafafa;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  border: 2px solid transparent;
  border-bottom: none;
  transition: all 0.2s;
}

.payment-tab:hover { background: #f0f0f0; color: var(--text); }
.payment-tab.active { background: white; color: var(--text); border-color: #eee; border-bottom-color: white; margin-bottom: -2px; }
.payment-tab-icon { font-size: 18px; }

/* ============ PAYMENT FORM ============ */
.payment-form {
  background: white;
  border: 2px solid #eee;
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.card-logos { display: flex; gap: 8px; margin-bottom: 16px; }
.card-logo {
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: #fafafa;
}
.card-logo.visa { color: #1a1f71; }
.card-logo.mc { color: #eb001b; }
.card-logo.amex { color: #007bc1; }

.input-with-icon { position: relative; }
.input-with-icon input { padding-right: 40px; width: 100%; }
.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
}
.input-icon.lock { color: #888; }
.input-icon.help {
  width: 20px;
  height: 20px;
  background: #ddd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: help;
}

.paypal-message, .klarna-message { text-align: center; }
.paypal-message p, .klarna-message p { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.paypal-logo, .klarna-logo { margin-bottom: 16px; }

.klarna-installments {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.installment {
  background: #f5f5f5;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #333;
}

/* ============ SECURE BADGE ============ */
.secure-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
  margin-bottom: 16px;
}

/* ============ DEMO NOTE ============ */
.demo-note {
  background: #fffbea;
  border: 1px solid #ffe58a;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.demo-note p { font-size: 13px; color: #666; margin-bottom: 6px; }
.demo-note p:last-child { margin-bottom: 0; }

/* ============ PAY BUTTON ============ */
#payBtn { width: 100%; margin-top: 4px; }

/* ============ MAIL FULFILLMENT BOX ============ */
.mail-fulfillment {
  background: linear-gradient(135deg, #FFF3ED, #fff8f5);
  border: 2px solid var(--orange);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.mail-fulfillment h4 {
  font-family: var(--font-head);
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--orange-dark);
}
.mail-fulfillment ol {
  padding-left: 20px;
  font-size: 14px;
  color: #555;
  line-height: 2;
}
.mail-fulfillment li { margin-bottom: 4px; }
