/* kreawave — Home page styles (complementa styles.css) */

.home-body { overflow-x: hidden; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.home-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 32px;
  background: rgba(10,14,24,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky; top: 0; z-index: 30;
}
.home-nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.waveform-logo.small { width: 36px; height: 36px; border-radius: 10px; }
.waveform-logo.small .wb:nth-child(3) { height: 22px; }
.waveform-logo.small .wb:nth-child(2),
.waveform-logo.small .wb:nth-child(4) { height: 15px; }
.waveform-logo.small .wb:nth-child(1),
.waveform-logo.small .wb:nth-child(5) { height: 9px; }

.home-nav-links { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.home-nav-links a { color: var(--muted); text-decoration: none; transition: color .12s; }
.home-nav-links a:hover, .home-nav-links a.active { color: var(--text); }
.nav-cta {
  background: var(--accent-grad); color: #160c1f !important;
  padding: 7px 14px; border-radius: 9px; font-weight: 600;
}
.nav-cta:hover { filter: brightness(1.1); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  user-select: none;
  padding: 96px 32px 64px;
  background:
    radial-gradient(ellipse 70% 55% at 28% -5%, rgba(160,107,255,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 8%, rgba(255,93,143,.12) 0%, transparent 60%);
  text-align: center; position: relative;
}
.hero-inner { max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-block; background: rgba(160,107,255,.1);
  border: 1px solid rgba(160,107,255,.25); color: var(--accent);
  padding: 5px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  margin-bottom: 24px;
}
.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6.4vw, 68px); font-weight: 700;
  line-height: 1.05; letter-spacing: -1.4px; margin-bottom: 20px;
}
.hero-gradient {
  background: var(--wave-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-sub {
  font-size: 18px; color: var(--muted); max-width: 560px; margin: 0 auto 32px; line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-btn-primary {
  padding: 15px 30px; font-size: 16px; border-radius: 13px;
  box-shadow: var(--shadow-glow);
}
.hero-btn-primary:hover { box-shadow: 0 0 50px rgba(160,107,255,.4); transform: translateY(-1px); }
.hero-btn-secondary { padding: 15px 26px; font-size: 15px; border-radius: 13px; }

/* MISMA estructura que .waveform-logo: align-items:center (eje medio) + animación
   wave (origin center) → las barras pulsan simétricas arriba/abajo = onda de audio.
   Solo cambia la escala (15 barras grandes) y el delay en cascada izq→der. */
.hero-wave {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  height: 76px; margin-top: 52px; opacity: .6;
}
.hero-wave span {
  display: block; width: 5px; border-radius: 3px;
  background: var(--accent-grad);
  animation: wave 1.56s ease-in-out infinite;
}
.hero-wave span:nth-child(1)  { height:14px; animation-delay:0s; }
.hero-wave span:nth-child(2)  { height:22px; animation-delay:.06s; }
.hero-wave span:nth-child(3)  { height:32px; animation-delay:.12s; }
.hero-wave span:nth-child(4)  { height:44px; animation-delay:.18s; }
.hero-wave span:nth-child(5)  { height:56px; animation-delay:.24s; }
.hero-wave span:nth-child(6)  { height:66px; animation-delay:.30s; }
.hero-wave span:nth-child(7)  { height:72px; animation-delay:.36s; }
.hero-wave span:nth-child(8)  { height:76px; animation-delay:.42s; }
.hero-wave span:nth-child(9)  { height:72px; animation-delay:.48s; }
.hero-wave span:nth-child(10) { height:66px; animation-delay:.54s; }
.hero-wave span:nth-child(11) { height:56px; animation-delay:.60s; }
.hero-wave span:nth-child(12) { height:44px; animation-delay:.66s; }
.hero-wave span:nth-child(13) { height:32px; animation-delay:.72s; }
.hero-wave span:nth-child(14) { height:22px; animation-delay:.78s; }
.hero-wave span:nth-child(15) { height:14px; animation-delay:.84s; }

/* ── Stats strip ─────────────────────────────────────────────────────────── */
.stats-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 0; padding: 20px 32px;
  border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
}
.stat { text-align: center; padding: 0 40px; }
.stat-n { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--text); letter-spacing: -.5px; }
.stat-l { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .8px; }
.stat-sep { width: 1px; height: 40px; background: var(--border); }

/* ── Demo section ────────────────────────────────────────────────────────── */
.demo-section {
  padding: 72px 24px;
  background: radial-gradient(ellipse 60% 50% at 50% 100%, rgba(255,93,143,.08) 0%, transparent 70%);
}
.demo-inner { max-width: 680px; margin: 0 auto; }
.demo-header { text-align: center; margin-bottom: 32px; }
.demo-header h2 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.demo-sub { color: var(--muted); font-size: 15px; }

.demo-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}

.demo-row { display: flex; flex-direction: column; gap: 7px; }
.demo-label {
  font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .8px;
  display: flex; justify-content: space-between; align-items: center;
}
.demo-chars { font-size: 11px; color: var(--muted-2); font-weight: 400; text-transform: none; letter-spacing: 0; }
.demo-chars.near { color: var(--amber); }
.demo-chars.full { color: var(--red); }

.demo-voice-row { display: flex; gap: 8px; align-items: center; }
.demo-select {
  flex: 1; background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 13px; font-size: 14px;
}
.demo-select:focus { outline: none; border-color: var(--accent); }

.demo-preview-btn {
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--muted);
  border-radius: 10px; padding: 10px 13px; cursor: pointer; transition: all .12s;
  display: flex; align-items: center; gap: 5px; font-size: 13px;
}
.demo-preview-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.demo-preview-btn:disabled { opacity: .4; cursor: not-allowed; }

.demo-textarea {
  background: var(--bg-soft); color: var(--text);
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; font-size: 14.5px; line-height: 1.55; resize: vertical;
  font-family: inherit; min-height: 110px;
  transition: border-color .12s;
}
.demo-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(160,107,255,.1); }
.demo-textarea::placeholder { color: var(--muted-2); }

.demo-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.demo-gen-btn {
  padding: 12px 24px; font-size: 15px; border-radius: 11px;
  background: var(--accent-grad);
}
.demo-gen-btn:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.demo-gen-btn.loading { animation: btnPulse 1.2s ease-in-out infinite; }
@keyframes btnPulse { 0%,100%{opacity:1;} 50%{opacity:.65;} }

.demo-status { font-size: 13px; color: var(--muted); }
.demo-status.error { color: var(--red); }
.demo-status.success { color: var(--green); }

.demo-progress {
  height: 3px; border-radius: 2px;
  background: var(--border); overflow: hidden;
}
.demo-progress-bar {
  height: 100%; border-radius: 2px;
  background: var(--accent-grad);
  animation: indeterminate 1.5s ease-in-out infinite;
  transform-origin: left;
}
@keyframes indeterminate {
  0%   { transform: scaleX(0) translateX(0); }
  50%  { transform: scaleX(.6) translateX(60%); }
  100% { transform: scaleX(0) translateX(300%); }
}

.demo-result {
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 16px; animation: fadeIn .3s ease;
}
@keyframes fadeIn { from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:none;} }
.demo-result-inner { display: flex; flex-direction: column; gap: 12px; }
.demo-result-info { display: flex; align-items: center; justify-content: space-between; }
.demo-result-voice { font-weight: 600; font-size: 14px; }
.demo-audio-player { width: 100%; height: 36px; }
.demo-dl-btn { align-self: flex-start; font-size: 13px; padding: 7px 14px; }

.demo-note { font-size: 11.5px; color: var(--muted-2); text-align: center; margin: 0; }

/* ── Features ────────────────────────────────────────────────────────────── */
.features { padding: 72px 24px; background: var(--bg-soft); }
.features-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.feature-card:hover {
  border-color: rgba(160,107,255,.3);
  box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 0 28px rgba(160,107,255,.1);
  transform: translateY(-4px);
}
.feature-icon { font-size: 28px; transition: transform var(--t); }
.feature-card:hover .feature-icon { transform: scale(1.15); }
.feature-card h3 { font-size: 17px; font-weight: 700; }
.feature-card p { color: var(--muted); font-size: 13.5px; line-height: 1.55; }

/* ── Showcase ────────────────────────────────────────────────────────────── */
.showcase { padding: 72px 24px; }
.showcase-inner { max-width: 1100px; margin: 0 auto; }
.showcase-h2 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.showcase-sub { margin-bottom: 28px; }
.showcase-sub a { color: var(--accent); text-decoration: none; }
.showcase-sub a:hover { text-decoration: underline; }
.showcase-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px;
}
.showcase-card {
  background: var(--bg-card); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 8px; cursor: pointer;
  transition: all .15s;
}
.showcase-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.showcase-card.playing { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.sc-header { display: flex; align-items: center; gap: 8px; }
.sc-avatar {
  width: 32px; height: 32px; border-radius: 8px; background: var(--bg-soft);
  border: 1px solid var(--border); display: grid; place-items: center; font-size: 15px; flex-shrink: 0;
}
.sc-lang { font-weight: 600; font-size: 13px; }
.sc-id { font-size: 10px; color: var(--muted-2); font-family: ui-monospace, monospace; }
.sc-traits { display: flex; gap: 4px; flex-wrap: wrap; }
.sc-trait { font-size: 10.5px; color: var(--accent); background: rgba(160,107,255,.08); border: 1px solid rgba(160,107,255,.15); padding: 2px 6px; border-radius: 5px; }
.sc-stars { font-size: 11px; color: var(--amber); }
.sc-play { font-size: 11.5px; color: var(--muted); }
.sc-play.playing { color: var(--accent); }

/* ── Pricing ─────────────────────────────────────────────────────────────── */
.pricing {
  padding: 80px 24px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(160,107,255,.07) 0%, transparent 70%);
}
.pricing-inner { max-width: 940px; margin: 0 auto; text-align: center; }
.pricing-inner h2 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.pricing-sub { color: var(--muted); font-size: 16px; margin-bottom: 40px; }
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px;
}
.plan-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; padding: 28px; text-align: left; position: relative;
  display: flex; flex-direction: column; gap: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.plan-card:hover { border-color: var(--accent); box-shadow: 0 8px 32px rgba(0,0,0,.3); }
.plan-popular {
  border-color: rgba(160,107,255,.5);
  box-shadow: 0 0 0 1px rgba(160,107,255,.15) inset, var(--shadow-glow);
}
.plan-badge-pop {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--accent-grad); color: #160c1f;
  padding: 4px 14px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.plan-name { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.plan-price { font-family: var(--font-display); font-size: 38px; font-weight: 700; letter-spacing: -1px; }
.plan-period { font-size: 15px; font-weight: 400; color: var(--muted); }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan-features li { font-size: 14px; color: var(--muted); }
.plan-features li::first-letter { color: var(--green); }
.plan-btn {
  background: var(--accent-grad); border: none; color: #160c1f;
  padding: 12px; border-radius: 11px; font-size: 14px; font-weight: 600;
  text-align: center; text-decoration: none; display: block;
  transition: filter .12s;
}
.plan-btn:hover { filter: brightness(1.1); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.home-footer {
  padding: 40px 32px; border-top: 1px solid var(--border-soft);
  display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.footer-links a { color: var(--muted); font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-note { color: var(--muted-2); font-size: 12px; }

/* ── Scroll reveal ───────────────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal-stagger > * {
  opacity: 0; transform: translateY(12px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal-stagger > *.in-view { opacity: 1; transform: none; }
.reveal-stagger > *:nth-child(2) { transition-delay: .1s; }
.reveal-stagger > *:nth-child(3) { transition-delay: .2s; }
.reveal-stagger > *:nth-child(4) { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ── Hero entrance animations (escalonadas) ──────────────────────────────── */
@keyframes kwFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-badge   { animation: kwFadeUp .5s cubic-bezier(.22,.68,0,1.2)  both  .1s; }
.hero-h1      { animation: kwFadeUp .6s cubic-bezier(.22,.68,0,1.05) both  .25s; }
.hero-sub     { animation: kwFadeUp .55s ease                         both  .44s; }
.hero-actions { animation: kwFadeUp .5s ease                          both  .6s; }
.hero-wave    { animation: kwFadeUp .7s ease                          both  .78s; }
@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero-h1, .hero-sub, .hero-actions, .hero-wave { animation: none; opacity: 1; }
}

/* ── Demo card — glow sutil en hover ─────────────────────────────────────── */
.demo-card { transition: box-shadow var(--t); }
.demo-card:hover {
  box-shadow: 0 28px 72px rgba(0,0,0,.5), 0 0 0 1px rgba(160,107,255,.14);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 50px 20px 40px; }
  .stats-strip { flex-wrap: wrap; gap: 20px; }
  .stat { padding: 0 16px; }
  .stat-sep { display: none; }
  .home-nav-links { gap: 14px; font-size: 13px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-btn-primary, .hero-btn-secondary { width: 100%; max-width: 320px; text-align: center; }
  .demo-card { padding: 18px; }
  .demo-section, .features, .showcase, .pricing { padding-left: 16px; padding-right: 16px; }
}
