/* =========================================================
   Banda IA — estilos
   ========================================================= */

:root {
  --c-primary: #046bd2;
  --c-primary-dark: #045cb4;
  --c-heading: #1e293b;
  --c-text: #334155;
  --c-border: #D1D5DB;
  --c-title: #ffd357;
  --c-accent: #ffd357;
  --shadow-deep: 12px 12px 50px rgba(0, 0, 0, .4);

  /* Hero */
  --hero-text-top: 20vh;
  --h1-size: 40px;
  --p-size: 20px;
  --typing-speed: 30;   /* ms por letra */
  --pause-end: 2000;    /* ms de espera al final de cada frase */

  /* Tarjetas de audio */
  --bai-blue: #0077FF;
  --bai-yellow: #ffd357;
  --bai-black: #111111;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex-grow: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--c-primary); }
a:hover, a:focus { color: var(--c-primary-dark); }
[id] { scroll-margin-top: 90px; }
h1, h2, h3, h4, h5, h6 { color: var(--c-heading); font-weight: 600; margin: 0 0 20px; }
h1 { font-size: 1.875rem; line-height: 1.4em; }
h2 { font-size: 1.5625rem; line-height: 1.3em; }
h3 { font-size: 1.25rem; line-height: 1.3em; }
p { margin: 0 0 1.75em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Botones (un solo estilo para toda la web) ---------- */
.btn {
  display: inline-block;
  background: var(--c-primary);
  color: #fff;
  border: 2px solid var(--c-primary);
  border-radius: 10px;
  padding: 12px 24px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover, .btn:focus { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover, .btn-outline:focus { background: #fff; border-color: #fff; color: var(--c-heading); }
.btn-sm { padding: 8px 18px; font-size: .95rem; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #fff; padding: .5em 1em; z-index: 1000;
}
.skip-link:focus { left: 1em; top: 1em; }

/* ---------- Cabecera ---------- */
.site-header {
  background: #000;
  border-bottom: 1px solid #000;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-title {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.3;
}
.site-title a { color: var(--c-title); text-decoration: none; }
.site-title a:hover { color: var(--c-border); }

/* ---------- Pie ---------- */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 20px;
  min-height: 60px;
}
.footer-nav {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-nav a { padding: 0 .5em; text-decoration: none; }
.copyright { text-align: center; font-size: .85rem; color: #64748b; margin: 10px 0 0; }

/* ---------- Botón "volver arriba" ---------- */
#scroll-top {
  display: none;
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 2.1em;
  height: 2.1em;
  border: 0;
  border-radius: 2px;
  background: var(--c-primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  z-index: 99;
  align-items: center;
  justify-content: center;
}
#scroll-top.visible { display: flex; }
#scroll-top svg { width: 1em; fill: currentColor; transform: rotate(180deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: url("assets/img/Fondo-para-hero-azulado.jpg") center / cover no-repeat;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: var(--hero-text-top) 1rem 0;
}
.hero-content h1 {
  color: #fff;
  font-size: var(--h1-size);
  line-height: 1.2;
}
.hero-content h1 .h1-sub { font-weight: 600; }
.hero-content h1 .h1-accent { color: var(--c-accent); font-weight: 700; }
.hero-content p {
  color: #fff;
  font-size: var(--p-size);
  line-height: 1.4;
  text-align: center;
  max-width: 600px;
  min-height: 2.8em;
  margin: 0 auto;
  word-break: break-word;
}
.hero-ctas {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.hero-arrow {
  position: absolute;
  left: 50%;
  bottom: 40px;
  margin-left: -10px;
  z-index: 1;
  border-color: #fff !important;
}
@media (max-width: 768px) {
  :root { --h1-size: 28px; --p-size: 18px; }
  .hero-bg { background-position: center top; }
  .hero-content { padding-top: calc(var(--hero-text-top) * .6); }
}

/* ---------- Contenedores ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}
.col-main {
  width: 80%;
  margin: 0 auto;
}
.spacer-20 { height: 20px; }
.spacer-50 { height: 50px; }
.spacer-100 { height: 100px; }

.section-title {
  text-align: center;
  color: #000;
  font-size: 25px;
  font-weight: 700;
}
.lead p {
  color: #000;
  font-size: 20px;
}
.text-center { text-align: center; }

.box-branding {
  border: 2px solid var(--c-primary);
  border-radius: 10px;
  padding: 30px 20px;
  box-shadow: var(--shadow-deep);
}
.box-branding p:last-child { margin-bottom: 0; }

/* Flecha animada */
.flecha-scroll {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0 auto;
  border-right: 4px solid var(--c-primary);
  border-bottom: 4px solid var(--c-primary);
  transform: rotate(45deg);
  animation: rebote 2s infinite;
  cursor: pointer;
}
@keyframes rebote {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50% { transform: translateY(-10px) rotate(45deg); }
}

/* ---------- Rejilla de demos ---------- */
.hint {
  text-align: center;
  font-size: 1rem !important;
  color: var(--c-text) !important;
  margin: -8px 0 24px;
}
.bai-duration {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
}
.mid-cta {
  text-align: center;
  margin-top: 36px;
}
.mid-cta p { font-size: 20px; font-weight: 600; color: var(--c-heading); margin-bottom: 14px; }
.bandaia-audio-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(1, 1fr);
  margin-bottom: 20px;
}
@media (min-width: 600px) { .bandaia-audio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .bandaia-audio-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .bandaia-audio-grid { grid-template-columns: repeat(4, 1fr); } }

/* Móvil: 2 filas con desplazamiento lateral */
@media (max-width: 599px) {
  .bandaia-audio-grid {
    grid-template-columns: 65%;
    grid-auto-columns: 65%;
    grid-auto-flow: column;
    grid-template-rows: repeat(2, auto);
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }
  .bai-card { scroll-snap-align: start; }
  .bandaia-audio-grid::-webkit-scrollbar { height: 6px; }
  .bandaia-audio-grid::-webkit-scrollbar-track { background: transparent; }
  .bandaia-audio-grid::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .15); border-radius: 4px; }
}

.bai-card {
  margin: 0;
  background: #f6f7fb;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .08);
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.bai-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(0, 0, 0, .12); }
.bai-thumb {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
  display: block;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
}
.bai-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease, filter .3s ease;
}
.bai-thumb:hover img { transform: scale(1.05); filter: brightness(1.1) saturate(1.1); }
.bai-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 119, 255, .25);
  opacity: 0;
  transition: opacity .3s ease;
}
.bai-thumb:hover::after { opacity: 1; }
.bai-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .9);
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .15);
  transition: transform .25s ease, background .25s ease;
  z-index: 1;
}
.bai-thumb:hover .bai-badge { transform: scale(1.12); }
.bai-ico-lg { width: 28px; height: 28px; fill: var(--bai-blue); }
.ico-pause { display: none; }
.bai-card.is-playing .ico-play { display: none; }
.bai-card.is-playing .ico-pause { display: block; }
.bai-card.is-playing .bai-badge { background: var(--bai-yellow); animation: heartbeat 1.2s infinite; }
.bai-card.is-playing .bai-ico-lg { fill: var(--bai-black); }
.bai-caption {
  margin: 1rem 0 .5rem;
  font-weight: 400;
  font-size: .95rem;
  line-height: 1.4;
  color: var(--bai-black);
  padding: 0 5px;
  text-align: left;
}
.bai-caption strong { font-weight: 700; }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.15); }
  40% { transform: scale(.95); }
  60% { transform: scale(1.1); }
  80% { transform: scale(.98); }
}

/* ---------- Identidad / Proceso / Beneficios ---------- */
.features {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 1180px;
  margin: 0 auto;
}
.feature {
  flex: 1 1 33.3%;
  padding: 20px;
  margin-bottom: 20px;
}
.feature hr {
  border: 0;
  height: 2px;
  background: #000;
  opacity: .4;
  margin: 0 0 1.5em;
}
.feature h2 {
  font-family: "Poppins", sans-serif;
  margin: 0 0 1.5em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.feature h2 img { height: 2em; width: auto; }

/* ---------- Precio + CTA ---------- */
.price-row {
  display: flex;
  justify-content: center;
}
.price-box {
  flex: 0 1 33.33%;
  min-width: 320px;
  padding: 20px;
  border: 3px solid var(--c-primary);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.price-box .price {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 15px 0;
}
.price-box .note { margin: 15px 0; }
.includes {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.includes li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  line-height: 1.45;
}
.includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-primary);
  font-weight: 700;
}
.btn-wrap { text-align: center; }

/* ---------- Páginas de texto (legales) ---------- */
.page-text {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 40px;
}
.page-text p, .page-text li { color: var(--c-text); }
.page-text ul { padding-left: 20px; margin: 0 0 1.75em; }
.page-text h2 { margin-top: 1.5em; }

/* ---------- Contacto ---------- */
.contact {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-form label,
.contact-form legend {
  display: block;
  font-weight: 700;
  color: var(--c-heading);
  margin-bottom: 6px;
  padding: 0;
}
.contact-form .req { color: #d63637; }
.contact-form fieldset { border: 0; padding: 0; margin: 0; }
.contact-form .field { margin-bottom: 22px; }
.contact-form input[type="email"],
.contact-form input[type="text"],
.contact-form textarea {
  width: 100%;
  font: inherit;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus { outline: 2px solid var(--c-primary); outline-offset: 0; border-color: var(--c-primary); }
.contact-form .sublabel { font-weight: 400; font-size: .85rem; color: var(--c-text); margin: 4px 0 0; }
.contact-form .desc { font-size: .85rem; margin-top: 6px; }
.contact-form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-text h1 { font-size: 2rem; margin-bottom: 24px; }
.contact-form input::placeholder { color: #9aa3af; }
.contact-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.contact-form .check input { margin-top: 5px; flex-shrink: 0; }
.contact-form .rgpd-info { font-size: .85rem; line-height: 1.5; margin-top: 8px; }
.contact-form .botcheck { display: none !important; }
.contact-form button[disabled] { opacity: .6; cursor: wait; }
.form-error { color: #d63637; font-size: .9rem; margin: 6px 0 0; }
.form-status { margin-top: 14px; font-weight: 500; }
.form-status.error { color: #d63637; }

/* ---------- Gracias ---------- */
.gracias-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.gracias-box {
  background: #fff;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
  animation: fadeInUp .4s ease-out;
}
.gracias-box h2 { margin: 0 0 1rem; font-size: 1.6rem; line-height: 1.2; }
.gracias-box p { margin: 0 0 1.2rem; font-size: 1rem; line-height: 1.5; }
.gracias-box small { color: #777; font-size: .85rem; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .features { flex-direction: column; }
  .feature { margin: 0; padding: 12px 0; }
  .feature h2 { margin-bottom: .8em; }
  .feature p { margin-bottom: .9em; }
}
@media (max-width: 921px) {
  .site-header .wrap { padding: 0 20px; min-height: 60px; }
  .site-title { font-size: 1.3rem; }
  .col-main { width: 100%; }
  .container { padding: 0 20px; }
  .contact { grid-template-columns: 1fr; padding: 40px 20px; }
  .page-text { padding: 40px 20px; }
}
@media (max-width: 600px) {
  .contact-form .row-2 { grid-template-columns: 1fr; }
  .price-box { min-width: 0; flex-basis: 100%; }
  .hero-arrow { bottom: 24px; }
  .hero-ctas .btn { flex: 1 1 100%; max-width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flecha-scroll, .bai-card.is-playing .bai-badge, .gracias-box { animation: none; }
  .btn:hover { transform: none; }
}
