/* =============================================
   BEATMYBEAT — style.css
   Paleta Bluewave (colors.md)
   ============================================= */

:root {
  /* Fondos */
  --bmb-bg-top: rgb(0, 0, 0);
  --bmb-bg-bottom: rgb(24, 24, 24);
  --bmb-bg-gradient: linear-gradient(180deg, var(--bmb-bg-top) 0%, var(--bmb-bg-bottom) 100%);

  /* Marca / acentos */
  --bmb-primary: rgb(7, 151, 156);
  --bmb-primary-variant: rgb(10, 174, 179);
  --bmb-secondary: rgb(39, 194, 199);

  /* Superficies y texto */
  --bmb-surface: rgb(6, 10, 13);
  --bmb-on-surface: rgb(245, 252, 255);
  --bmb-on-surface-muted: rgb(159, 181, 189);
  --bmb-on-primary: rgb(0, 0, 0);

  /* Estados */
  --bmb-error: rgb(207, 102, 121);
  --bmb-error-strong: rgb(255, 107, 107);

  /* Overlays y bordes (Material3 + UI) */
  --bmb-card-overlay: rgba(0, 0, 0, 0.55);
  --bmb-card-overlay-light: rgba(0, 0, 0, 0.28);
  --bmb-primary-soft: rgba(7, 151, 156, 0.18);
  --bmb-primary-soft-strong: rgba(7, 151, 156, 0.22);
  --bmb-primary-logo: rgba(7, 151, 156, 0.2);
  --bmb-primary-border: rgba(7, 151, 156, 0.3);
  --bmb-text-muted: rgba(245, 252, 255, 0.7);
  --bmb-outline: rgba(7, 151, 156, 0.4);
  --bmb-outline-variant: rgba(159, 181, 189, 0.2);
  --bmb-scrim: rgba(0, 0, 0, 0.6);
  --bmb-highlight: rgba(255, 255, 255, 0.1);
  --bmb-glow: rgba(7, 151, 156, 0.35);
  --bmb-glow-soft: rgba(7, 151, 156, 0.2);
  --bmb-secondary-soft: rgba(39, 194, 199, 0.1);

  /* Aliases web */
  --bg-top: var(--bmb-bg-top);
  --bg-bottom: var(--bmb-bg-bottom);
  --primary: var(--bmb-primary);
  --primary-v: var(--bmb-primary-variant);
  --secondary: var(--bmb-secondary);
  --surface: var(--bmb-surface);
  --surface-2: var(--bmb-card-overlay-light);
  --text: var(--bmb-on-surface);
  --text-muted: var(--bmb-on-surface-muted);
  --border: var(--bmb-outline);
  --border-subtle: var(--bmb-outline-variant);
  --glow: var(--bmb-glow);
  --card-fill: linear-gradient(0deg, var(--bmb-card-overlay), var(--bmb-card-overlay)), var(--bmb-surface);
  --accent-gradient: linear-gradient(90deg, var(--bmb-primary), var(--bmb-primary-variant), var(--bmb-secondary));

  --radius:        14px;
  --radius-sm:     8px;

  --font-display:  'Sora', sans-serif;
  --font-body:     'DM Sans', sans-serif;

  --transition:    0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bmb-bg-gradient);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
code {
  font-size: 0.85em;
  color: var(--secondary);
  background: var(--bmb-secondary-soft);
  padding: 2px 6px;
  border-radius: 4px;
}

/* CONTAINER */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================
   NAV
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(6, 10, 13, 0.92);
  border-bottom: 1px solid transparent;
  transition: padding var(--transition), border-color var(--transition);
}

.nav--compact {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom-color: var(--border-subtle);
}

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--text);
}

.nav__logo-img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 52px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  line-height: 1;
}

.nav__logo-accent {
  color: var(--primary);
}

.nav__logo-img--footer {
  height: 36px;
  max-width: 44px;
}

.footer .nav__logo-text {
  font-size: 1.1rem;
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audio-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color var(--transition), color var(--transition);
}
.audio-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.audio-toggle__icon { display: none; }
.audio-toggle.is-playing .audio-toggle__icon--on { display: block; }
.audio-toggle:not(.is-playing) .audio-toggle__icon--off { display: block; }
.audio-toggle.is-playing { color: var(--primary); }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: border-color var(--transition);
}
.lang-toggle:hover { border-color: var(--primary); }
.lang-toggle__option { transition: color var(--transition); }
.lang-toggle__option.active { color: var(--primary); }
.lang-toggle__sep { opacity: 0.4; }

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 40px);
  padding: 110px clamp(24px, 5vw, 80px) 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  order: -1;
  width: 100%;
  max-width: min(78vw, 320px);
  margin: 0 auto;
  flex-shrink: 0;
}

.hero__brand-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 48px var(--bmb-glow-soft));
  animation: fadeUp 0.8s 0.15s ease both;
}

@media (min-width: 901px) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: clamp(32px, 5vw, 72px);
    text-align: left;
  }

  .hero__content {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    max-width: 100%;
    text-align: left;
  }

  .hero__brand {
    order: 0;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    justify-content: center;
    justify-self: center;
    align-self: center;
    max-width: min(48vw, 520px);
    margin: 0;
  }

  .hero__brand-img {
    max-width: min(48vw, 520px);
    filter: drop-shadow(0 0 56px var(--bmb-glow));
  }
}

.hero__glow {
  position: absolute;
  top: -200px; left: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, var(--bmb-primary-soft-strong) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite alternate;
}
@keyframes glowPulse {
  from { transform: scale(1) translate(0, 0); opacity: 0.7; }
  to   { transform: scale(1.15) translate(40px, 40px); opacity: 1; }
}

.hero__content {
  flex: 1;
  max-width: 620px;
  min-width: 0;
  animation: fadeUp 0.8s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bmb-on-primary);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
}
.badge__dot {
  width: 7px; height: 7px;
  background: var(--bmb-on-primary);
  border-radius: 50%;
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.8px;
  margin-bottom: 24px;
  color: var(--text);
}
.hero__title--accent {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 36px;
  font-weight: 300;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 28px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary);
  color: var(--bmb-on-primary);
  font-weight: 600;
  box-shadow: 0 0 30px var(--bmb-glow);
}
.btn--primary:hover {
  background: var(--primary-v);
  box-shadow: 0 0 45px var(--bmb-glow);
  transform: translateY(-2px);
}
.btn--ghost {
  background: var(--bmb-highlight);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--text);
}
.btn--lg { padding: 16px 40px; font-size: 1.05rem; }

/* CHIPS */
.chip {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--secondary);
  background: var(--bmb-primary-soft);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  letter-spacing: 0.2px;
}

/* =============================================
   SECTIONS COMMON
   ============================================= */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
  margin-bottom: 56px;
  text-align: center;
}

/* =============================================
   BENEFITS
   ============================================= */
.benefits {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bmb-bg-top) 0%, var(--bmb-surface) 100%);
}

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.benefit-card {
  background: var(--card-fill);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.benefit-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 24px var(--bmb-glow-soft);
  transform: translateY(-4px);
}

.benefit-card__icon {
  width: 52px; height: 52px;
  background: var(--bmb-primary-logo);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 20px;
}
.benefit-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.benefit-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.how {
  padding: 100px 0;
  background: var(--bmb-surface);
}

.how__steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  justify-content: center;
}

.how__step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 0 24px;
}
.how__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--primary);
  color: var(--bmb-on-primary);
  line-height: 1;
  margin-bottom: 20px;
}
.how__step h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}
.how__step p {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.how__connector {
  flex-shrink: 0;
  width: 60px;
  height: 2px;
  background: var(--accent-gradient);
  margin-top: 28px;
  opacity: 1;
  border-radius: 2px;
}

/* =============================================
   FEATURES DETAIL
   ============================================= */
.features-detail {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bmb-surface) 0%, var(--bmb-bg-bottom) 100%);
}

.features-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-item {
  padding: 40px 36px;
  background: var(--card-fill);
  border-right: 1px solid var(--border-subtle);
  transition: background var(--transition), border-color var(--transition);
}
.feature-item:last-child { border-right: none; }
.feature-item:hover {
  background: linear-gradient(0deg, var(--bmb-primary-soft), var(--bmb-primary-soft)), var(--bmb-surface);
}

.feature-item__tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--bmb-on-primary);
  background: var(--primary);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.feature-item h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.feature-item p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* =============================================
   FAQ
   ============================================= */
.faq {
  padding: 100px 0;
  background: var(--bg-bottom);
}
.faq .container { max-width: 720px; }

.faq__list { display: flex; flex-direction: column; gap: 12px; }

.faq__item {
  background: var(--card-fill);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), background var(--transition);
}
.faq__item[open] {
  border-color: var(--primary);
  background: linear-gradient(0deg, var(--bmb-primary-soft), var(--bmb-primary-soft)), var(--bmb-surface);
}

.faq__item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 300;
  transition: transform var(--transition);
}
.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__item p {
  padding: 0 24px 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* =============================================
   CTA FINAL
   ============================================= */
.cta-final {
  padding: 120px 0;
  background: linear-gradient(180deg, var(--bg-bottom) 0%, var(--bg-top) 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-final__glow {
  position: absolute;
  bottom: -200px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--bmb-glow-soft) 0%, transparent 70%);
  pointer-events: none;
}
.cta-final__content {
  position: relative;
  z-index: 1;
}
.cta-final h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-bottom: 20px;
  color: var(--text);
}
.cta-final__sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.download__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 880px;
  margin: 0 auto 24px;
  text-align: left;
}

.download-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  background: var(--card-fill);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.download-card--primary {
  border-color: var(--primary);
  text-decoration: none;
  color: inherit;
}

a.download-card {
  text-decoration: none;
  color: inherit;
}

@media (hover: hover) {
  .download-card--primary:hover,
  a.download-card:not(.download-card--primary):hover {
    border-color: var(--secondary);
    box-shadow: 0 8px 32px var(--bmb-glow-soft);
    transform: translateY(-2px);
  }
}

.download-card--soon {
  opacity: 0.72;
  cursor: default;
}

.download-card__tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bmb-on-primary);
  background: var(--primary);
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 6px;
}

.download-card--soon .download-card__tag {
  background: var(--bmb-highlight);
  color: var(--text-muted);
}

.download-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.download-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.download__note {
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bmb-surface);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__legal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}

.footer__copy,
.footer__credits {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer__link {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}

.footer__link:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .nav__logo-img {
    height: 38px;
    max-width: 46px;
  }

  .nav__logo-text {
    font-size: 1.1rem;
  }

  .nav__logo-img--footer {
    height: 32px;
    max-width: 40px;
  }

  .footer .nav__logo-text {
    font-size: 1rem;
  }

  .hero {
    padding: 100px 24px 60px;
  }

  .hero__brand {
    max-width: min(76vw, 300px);
    margin-bottom: 4px;
  }

  .hero__sub { margin: 0 auto 36px; }
  .hero__cta { justify-content: center; }
  .hero__chips { justify-content: center; }
  .how__steps { flex-direction: column; align-items: center; gap: 32px; }
  .how__connector { width: 1px; height: 40px; background: linear-gradient(180deg, var(--primary), var(--secondary)); }

  .features-detail__grid { grid-template-columns: 1fr; }
  .feature-item { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .feature-item:last-child { border-bottom: none; }

  .nav { padding: 16px 20px; }
  .footer__inner { justify-content: center; text-align: center; }

  .footer__legal {
    align-items: center;
    text-align: center;
  }

  .download__grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }
}

@media (max-width: 480px) {
  .hero__title { letter-spacing: -0.4px; }
  .benefits__grid { grid-template-columns: 1fr; }
  .btn--lg { padding: 14px 28px; }
}

/* =============================================
   RENDIMIENTO
   ============================================= */
.benefits,
.how,
.features-detail,
.faq,
.cta-final {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s var(--reveal-delay, 0s) ease,
    transform 0.5s var(--reveal-delay, 0s) ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero__glow,
  .hero__content,
  .hero__brand-img,
  .badge__dot {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
