/* ==========================================================================
   Sonoriti - styles.css (refactored & improved)
   Replaces the original styles.css - paste this file into the same folder
   as your HTML (overwriting the existing styles.css).
   ========================================================================== */

/* Reset and Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --dark-bg: #0f172a;
  --light-bg: #f8fafc;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --success: #10b981;
  --gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --max-width: 1200px;
  --container-padding: 20px;
  --card-radius: 12px;
  --card-shadow: 0 6px 20px rgba(16,24,40,0.06);
  --muted-border: #eef2ff;
  --muted-bg: #f7f7fb;
  --focus: rgba(99,102,241,0.18);
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-dark);
  background-color: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

/* Utility container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

/* Basic headings */
h1, h2, h3, h4, h5, h6 { margin: 0; color: inherit; font-weight: 600; }
h2 { font-size: 2.5rem; line-height: 1.08; }
h3 { font-size: 1.25rem; line-height: 1.25; } /* unified baseline for small headings */

/* Links & buttons baseline */
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  color: var(--white);
  background: var(--primary-color);
  white-space: nowrap;
}

.btn:focus { outline: 3px solid var(--focus); outline-offset: 3px; }

.btn-primary { background: var(--white); color: var(--primary-color); border-color: transparent; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16,24,40,0.12); }

.btn-secondary { background: transparent; color: var(--white); border-color: var(--white); }
.btn-secondary:hover { background: var(--white); color: var(--primary-color); }

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

/* small button */
.btn-small { padding: 0.5rem 0.75rem; font-size: .9rem; border-radius: 8px; }

/* NAVIGATION */
.navbar {
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-wrapper {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  padding: 1rem 0;
}

/* logo - original markup used an <img> */
.logo img { display:block; height: auto; max-width: 160px; }

/* Nav menu */
.nav-menu {
  display:flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.nav-menu a {
  color: var(--text-dark);
  font-weight: 600;
  transition: color .18s ease, transform .12s ease;
}
.nav-menu a:hover { color: var(--primary-color); transform: translateY(-2px); }

/* Mobile toggle */
.menu-toggle {
  display: none;
  width: 42px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
}
.menu-toggle span {
  display:block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  margin: 4px 0;
  transition: transform .2s, opacity .2s;
}

/* HERO */
.hero {
  position: relative;
  padding: 110px 0 80px;
  color: var(--white);
  overflow: hidden;
  background: var(--gradient);
}

/* Video background - keep behind everything */
.hero-video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%,-50%) scale(1.08);
  z-index: 0;
  filter: blur(3px) brightness(.7);
  pointer-events: none;
  animation: slowMotion 30s linear infinite;
}

@keyframes slowMotion {
  0% { transform: translate(-50%,-50%) scale(1.08); }
  50% { transform: translate(-50%,-50%) scale(1.12); }
  100% { transform: translate(-50%,-50%) scale(1.08); }
}

/* Decorative animated background layer */
.hero-animated-bg {
  position:absolute;
  inset:0;
  z-index:1;
  opacity:.22;
  background:
    radial-gradient(circle at 20% 50%, rgba(139,92,246,.28) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(99,102,241,.22) 0%, transparent 45%),
    radial-gradient(circle at 40% 20%, rgba(236,72,153,.18) 0%, transparent 45%);
  background-size: 200% 200%;
  animation: heroBackgroundMove 20s ease-in-out infinite;
}

@keyframes heroBackgroundMove {
  0%,100% { background-position: 0% 0%, 100% 100%, 50% 0%; }
  25% { background-position: 50% 25%, 75% 75%, 25% 25%; }
  50% { background-position: 100% 50%, 50% 50%, 0% 50%; }
  75% { background-position: 75% 75%, 25% 25%, 75% 75%; }
}

/* color overlay over video */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient);
  opacity: .5;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 12px;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.03;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  margin-bottom: 1.75rem;
  color: rgba(255,255,255,0.95);
}

/* hero buttons wrapper */
.hero-buttons { display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }

/* wave decorative svg (bottom of hero) */
.hero-wave { position:absolute; left:0; right:0; bottom:0; z-index:3; pointer-events:none; }
.hero-wave svg { display:block; width:100%; height:auto; fill:var(--white); }

/* SECTION HEADERS */
.section-header { text-align:center; margin-bottom: 3.25rem; }
.section-header h2 { font-size: 2rem; font-weight: 800; color: var(--text-dark); margin-bottom: .5rem; }
.section-header p { font-size: 1.05rem; color: var(--text-light); }

/* AMBIENTACION / FEATURES */
.ambientacion { padding: 80px 0; background: var(--light-bg); }
.features-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 3rem;
}
.feature-card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(16,24,40,0.08); }
.feature-icon { color: var(--primary-color); margin-bottom: 1rem; font-size: 2rem; }
.feature-card h3 { font-size: 1.125rem; margin-bottom: .5rem; color: var(--text-dark); }
.feature-card p { color: var(--text-light); }

/* DEMO PLAYER & PLAYER GRID */
.demo-player { background: var(--white); padding: 2.5rem; border-radius: var(--card-radius); box-shadow: var(--card-shadow); }
.demo-player h3 { text-align:center; font-size:1.75rem; margin-bottom:1.5rem; color: var(--text-dark); }
.player-grid { display:grid; gap:1rem; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.player-card { background: var(--light-bg); padding:1rem; border-radius:8px; }
.player-card h4 { font-size: 1.125rem; margin-bottom:.5rem; color: var(--text-dark); }
.player-card p { color: var(--text-light); margin-bottom: .75rem; font-size:.95rem; }

/* audio placeholder */
.audio-placeholder {
  background: var(--white);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  border: 2px dashed var(--muted-bg);
  display:flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
}
.play-button {
  width:48px; height:48px; border-radius:50%;
  background: var(--gradient); color:var(--white); display:flex;
  align-items:center; justify-content:center; cursor:pointer; font-size:1.25rem; opacity:.85;
}
.play-button:hover { transform: scale(1.06); }

/* PROMPT SHOWCASE */
.prompt-showcase { background: var(--white); padding: 2rem; border-radius: 14px; box-shadow: 0 8px 26px rgba(0,0,0,0.06); margin-bottom: 2.5rem; }
.prompt-example { display:grid; grid-template-columns: 1fr auto 1fr; gap: 1.25rem; align-items:center; }
.prompt-input { background: var(--light-bg); padding:1.5rem; border-radius: 12px; border-left: 4px solid var(--primary-color); }
.prompt-icon { font-size: 1.6rem; margin-bottom: .75rem; display:block; }
.prompt-text { color: var(--text-dark); font-style: italic; line-height:1.6; }
.prompt-arrow { font-size: 2rem; color: var(--primary-color); }
.prompt-output { text-align:center; }
.output-visual { position:relative; border-radius: 12px; overflow:hidden; margin-bottom: .75rem; }
.output-visual img { width:100%; height:200px; object-fit:cover; display:block; }

/* overlay + waveform */
.output-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background: rgba(99,102,241,0.85); }
.waveform { display:flex; gap:6px; align-items:end; height:56px; }
.waveform span { width:6px; background:var(--white); border-radius:3px; animation: wave 1s linear infinite; transform-origin: bottom; }
@keyframes wave { 0%,100%{ transform:scaleY(.6);} 50%{ transform:scaleY(1);} }

/* output details badges */
.output-details { display:flex; gap: .5rem; justify-content:center; flex-wrap:wrap; }
.badge { background: var(--success); color: var(--white); padding: .4rem .85rem; border-radius: 20px; font-weight:700; font-size:.9rem; }

/* VOICE OPTIONS */
.voice-options { margin-bottom: 2.75rem; }
.voice-grid { display:grid; gap:1rem; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.voice-card { background:var(--white); border-radius:12px; overflow:hidden; box-shadow:var(--card-shadow); transition:transform .18s; }
.voice-card:hover { transform: translateY(-6px); }
.voice-card img { width:100%; height:180px; object-fit:cover; display:block; }
.voice-info { padding:1rem 1.25rem; }
.voice-info h4 { font-size:1.05rem; margin-bottom:.25rem; color:var(--text-dark); }
.voice-info p { color:var(--text-light); font-size:.95rem; margin-bottom:.75rem; }
.voice-tags { display:flex; gap:.5rem; flex-wrap:wrap; }
.tag { background: var(--light-bg); color: var(--primary-color); padding: .25rem .6rem; border-radius: 12px; font-weight:600; font-size:.82rem; }

/* SPOT EXAMPLES */
.spot-examples-section { margin-bottom: 2.5rem; }
.spots-grid { display:grid; gap:1rem; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); }
.spot-example { background:var(--white); border-radius:12px; overflow:hidden; box-shadow:var(--card-shadow); transition: transform .18s; }
.spot-example:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(0,0,0,0.08); }
.spot-visual img { width:100%; height:200px; object-fit:cover; }
.spot-play-overlay { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(0,0,0,.45); opacity:0; transition: opacity .2s; }
.spot-example:hover .spot-play-overlay { opacity:1; }
.play-button-large { width:66px; height:66px; border-radius:50%; background:var(--white); color:var(--primary-color); display:flex; align-items:center; justify-content:center; font-size:1.6rem; }
.spot-content { padding:1rem 1.25rem; }
.spot-content .spot-header { display:flex; justify-content:space-between; gap:1rem; align-items:center; margin-bottom:.65rem; }
.spot-content h4 { margin-bottom:.5rem; font-size:1.05rem; color:var(--text-dark); }
.spot-description { color:var(--text-light); font-size:.95rem; line-height:1.5; margin-bottom:.75rem; }
.spot-prompt { background:var(--light-bg); padding:.6rem; border-radius:8px; font-size:.9rem; color:var(--text-dark); }
.spot-prompt strong { color:var(--primary-color); }

/* AI CAPABILITIES / TECH */
.ai-capabilities { background:var(--white); padding:2rem; border-radius:14px; box-shadow:var(--card-shadow); margin-bottom:1.75rem; }
.capabilities-grid { display:grid; gap:1rem; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.capability-item { text-align:center; padding:1rem; }
.capability-icon { font-size:2.2rem; margin-bottom:.6rem; }
.capability-item h4 { font-size:1.05rem; margin-bottom:.4rem; }
.capability-item p { color:var(--text-light); line-height:1.5; }

/* PUBLICITY - hide legacy content if present */
.publicity-content { display:none; }

/* SERVICES SECTION - key fixes applied here to ensure consistent height/alignment */
.servicios { padding: 80px 0; background: var(--light-bg); }

.services-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: stretch; /* IMPORTANT: ensures cards get equal height */
}

/* Each service card is a column-flex so button can be pushed to bottom */
.service-card {
  background: var(--white);
  padding: 1.75rem;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  height: 100%; /* required with grid align-items:stretch */
  position: relative;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 12px 36px rgba(16,24,40,0.08); }

.service-card.featured {
  border: 2px solid var(--primary-color);
  box-shadow: 0 14px 36px rgba(99,102,241,0.06);
}

/* optional badge in top-right */
.badge {
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--gradient);
  color: var(--white);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-weight:700;
  font-size:.85rem;
}

/* header inside card */
.service-header {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--muted-bg);
}
.service-header h3 {
  font-size: 1.125rem; /* consistent size across cards */
  margin: 0;
  color: var(--text-dark);
  font-weight: 700;
}

/* price area kept if used */
.price { display:flex; align-items: baseline; justify-content:center; gap:.25rem; }
.amount { font-size: 2.25rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.period { color: var(--text-light); font-size: .95rem; }

/* features list grows to fill vertical space and push CTA down */
.service-features {
  list-style: none;
  margin: 1rem 0 1.25rem 0;
  padding: 0;
  color: var(--text-dark);
  flex: 1 1 auto; /* CRITICAL: allows the list to expand and button to stick to bottom */
}
.service-features li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--muted-bg);
  font-size: .95rem;
  line-height: 1.5;
}
.service-features li:last-child { border-bottom: none; }
.service-features strong { font-weight:700; color:var(--text-dark); }

/* CTA button in card: aligned to bottom and consistent size */
.service-card .btn {
  margin-top: auto;
  align-self: center;
  min-width: 160px;
}

/* TECHNOLOGY SECTION */
.technology { padding: 80px 0; background: var(--dark-bg); color: var(--white); }
.technology .section-header h2, .technology .section-header p { color: var(--white); }
.tech-grid { display:grid; gap:1rem; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.tech-item { text-align:center; padding:1rem; }
.tech-item h4 { font-size:1.1rem; margin-bottom:.5rem; }
.tech-item p { color: rgba(255,255,255,0.9); }

/* CONTACT */
.contacto { padding: 80px 0; background: var(--light-bg); }
.contact-content { display:grid; gap:2rem; grid-template-columns: 1.5fr 1fr; }
.contact-form { background: var(--white); padding:1.5rem; border-radius:12px; box-shadow:var(--card-shadow); }
.form-group { margin-bottom: 1rem; }
.form-group label { display:block; margin-bottom:.5rem; font-weight:700; color:var(--text-dark); }
.form-group input, .form-group select, .form-group textarea {
  width:100%; padding:.75rem; border-radius:8px; border:2px solid var(--muted-bg); font-family:inherit; font-size:1rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: 3px solid var(--focus); border-color: var(--primary-color); }

.contact-info { background: var(--white); padding:1.5rem; border-radius:12px; box-shadow:var(--card-shadow); }
.contact-info h3 { font-size:1.25rem; margin-bottom:1rem; color:var(--text-dark); }
.info-item p { color:var(--text-light); }

/* Footer */
.footer { background: var(--dark-bg); color: var(--white); padding: 48px 0 20px; }
.footer-content { display:grid; gap:1rem; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); margin-bottom:1.5rem; }
.footer-section h3 { font-size:1.1rem; margin-bottom:.75rem; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-section p { color: rgba(255,255,255,0.75); margin-bottom:.75rem; }
.footer-section ul { list-style:none; padding:0; margin:0; }
.footer-section ul li { margin-bottom:.5rem; }
.footer-section ul a { color: rgba(255,255,255,0.8); }
.newsletter-form { display:flex; gap:.5rem; }
.newsletter-form input { flex:1; padding:.5rem; border-radius:6px; border:none; }

/* Footer bottom */
.footer-bottom { text-align:center; padding-top:1.5rem; border-top: 1px solid rgba(255,255,255,0.06); color: rgba(255,255,255,0.6); }

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 980px) {
  .hero-title { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1rem; }
  .features-grid { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
  .player-grid { grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
  .prompt-example { grid-template-columns: 1fr; gap:1rem; }
  .prompt-arrow { transform: rotate(90deg); text-align:center; }
  .contact-content { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 1rem; box-shadow: 0 8px 18px rgba(0,0,0,0.08); }
  .menu-toggle { display:flex; }
  .nav-menu.active { display:flex; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .hero-subtitle { font-size: .95rem; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; }
  .player-grid, .voice-grid, .spots-grid { grid-template-columns: 1fr; }
  .section-header h2 { font-size: 1.5rem; }
  .footer-content { grid-template-columns: 1fr; }
}

/* Small animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.feature-card, .service-card, .player-card, .spot-example { animation: fadeIn .55s ease-out both; }