/* =========================================================================
   STYLES.CSS — MIDNIGHT STUDIO
   Los valores reales se inyectan desde config.js. Estos son solo respaldo.
   ========================================================================= */

:root {
  --color-bg: #0B0812;
  --color-bg-alt: #140F1F;
  --color-bg-elevated: #1C1629;
  --color-text: #F5F2FA;
  --color-text-muted: #A79FBD;
  --color-accent: #FF2E9A;
  --color-accent-soft: #341027;
  --color-accent-2: #3ADFE0;
  --color-success: #39C77E;
  --color-danger: #E2434C;
  --color-border: #2A2238;

  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --container-width: 1240px;
  --space: 8px;
  --hero-title-size: clamp(2.4rem, 7vw, 5.2rem);
  --section-title-size: clamp(1.9rem, 4.5vw, 2.9rem);
  --base-font-size: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--base-font-size);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 calc(var(--space) * 3); }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.76rem;
  color: var(--color-accent-2);
  margin-bottom: calc(var(--space) * 1.5);
}

.section { padding: calc(var(--space) * 12) 0; }
.section--alt { background: var(--color-bg-alt); }
.section__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--section-title-size);
  line-height: 1.15;
  margin-bottom: calc(var(--space) * 2);
  max-width: 820px;
}
.section__subtitle { color: var(--color-text-muted); max-width: 620px; margin-bottom: calc(var(--space) * 5); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--color-accent-2);
  outline-offset: 2px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.01em;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--color-accent); color: #0B0812; }
.btn--accent:hover { opacity: 0.9; }
.btn--ghost { border: 1px solid var(--color-border); color: var(--color-text); }
.btn--ghost:hover { border-color: var(--color-accent-2); color: var(--color-accent-2); }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.icon-slot { display: inline-flex; width: 1em; height: 1em; }
.icon-slot svg { width: 100%; height: 100%; fill: none; stroke: currentColor; }

/* =========================== OFFERS BAR (animated equalizer) =========================== */
.offers-bar {
  position: sticky; top: 0; z-index: 42;
  background: linear-gradient(90deg, var(--color-accent-soft), #1a0e2e);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; gap: 14px;
  padding: 9px calc(var(--space) * 3);
  overflow: hidden; white-space: nowrap;
}
.offers-bar__eq {
  display: flex; align-items: flex-end; gap: 3px; height: 16px; flex-shrink: 0;
}
.offers-bar__eq span {
  width: 3px; background: var(--color-accent-2); border-radius: 2px;
  animation: eq-bounce 1s ease-in-out infinite;
}
.offers-bar__eq span:nth-child(1) { height: 40%; animation-delay: 0s; }
.offers-bar__eq span:nth-child(2) { height: 100%; animation-delay: 0.12s; }
.offers-bar__eq span:nth-child(3) { height: 60%; animation-delay: 0.24s; }
.offers-bar__eq span:nth-child(4) { height: 90%; animation-delay: 0.36s; }
.offers-bar__eq span:nth-child(5) { height: 50%; animation-delay: 0.48s; }
@keyframes eq-bounce {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}
.offers-bar__track {
  display: inline-flex; gap: 60px;
  animation: offers-scroll 26s linear infinite;
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.02em;
  color: var(--color-text);
}
.offers-bar__track span::after { content: "◆"; margin-left: 60px; color: var(--color-accent); }
@keyframes offers-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================== HEADER =========================== */
.header {
  position: sticky; top: 34px; z-index: 40;
  background: rgba(11,8,18,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__icon { font-size: 1.5rem; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.01em; }
.nav { display: flex; gap: calc(var(--space) * 3.5); }
.nav a { font-size: 0.9rem; font-weight: 600; color: var(--color-text-muted); transition: color 0.15s ease; }
.nav a:hover { color: var(--color-accent-2); }
.nav a.is-current { color: var(--color-accent); position: relative; }
.nav a.is-current::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: var(--color-accent);
}

.header__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 1.1rem; color: var(--color-text);
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
}
.icon-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.cart-badge {
  position: absolute; top: -4px; right: -4px; background: var(--color-accent); color: #0B0812;
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.nav-toggle { display: none; }

/* =========================== HERO =========================== */
.hero { position: relative; min-height: 88vh; display: flex; align-items: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.05); }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,8,18,0.55) 0%, rgba(11,8,18,0.8) 55%, var(--color-bg) 100%);
}
.hero__content { position: relative; z-index: 2; padding: 60px 0 90px; }
.hero__title {
  font-family: var(--font-display); font-weight: 900; font-size: var(--hero-title-size);
  line-height: 1.05; max-width: 900px;
  background: linear-gradient(90deg, var(--color-text), var(--color-accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline { margin-top: calc(var(--space) * 2.5); font-size: 1.1rem; color: var(--color-text-muted); max-width: 520px; }
.hero__cta { margin-top: calc(var(--space) * 4); display: flex; gap: 16px; flex-wrap: wrap; }

/* =========================== SERVICES =========================== */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: calc(var(--space) * 3);
}
.service-card {
  background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
}
.service-card--highlight { border-color: var(--color-accent); box-shadow: 0 20px 50px rgba(255,46,154,0.12); }
.service-card__badge {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  background: var(--color-accent); color: #0B0812; font-family: var(--font-mono);
  font-size: 0.68rem; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; font-weight: 700;
}
.service-card__img { aspect-ratio: 16/10; overflow: hidden; }
.service-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.service-card:hover .service-card__img img { transform: scale(1.06); }
.service-card__body { padding: calc(var(--space) * 3); display: flex; flex-direction: column; flex: 1; }
.service-card__name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; margin-bottom: 8px; }
.service-card__desc { color: var(--color-text-muted); font-size: 0.9rem; margin-bottom: 14px; }
.service-card__features { list-style: none; margin-bottom: calc(var(--space) * 2.5); }
.service-card__features li {
  padding: 7px 0; border-top: 1px solid var(--color-border); font-size: 0.86rem; display: flex; gap: 8px; align-items: flex-start;
}
.service-card__features li::before { content: "✓"; color: var(--color-accent); font-weight: 700; }
.service-card__footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.service-card__price { font-family: var(--font-mono); font-weight: 700; color: var(--color-accent-2); }
.service-card__price small { color: var(--color-text-muted); font-weight: 400; display: block; font-size: 0.7rem; }

/* =========================== BEATS =========================== */
.beats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: calc(var(--space) * 3);
}
.beat-card {
  background: var(--color-bg-elevated); border: 1px solid var(--color-border); border-radius: var(--radius-md);
  overflow: hidden; position: relative;
}
.beat-card__badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--color-accent-2); color: #0B0812; font-family: var(--font-mono);
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
}
.beat-card__img { aspect-ratio: 1/1; position: relative; overflow: hidden; }
.beat-card__img img { width: 100%; height: 100%; object-fit: cover; }
.beat-card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(11,8,18,0.35); opacity: 0; transition: opacity 0.15s ease;
}
.beat-card:hover .beat-card__play { opacity: 1; }
.beat-card__play button {
  width: 56px; height: 56px; border-radius: 50%; background: var(--color-accent); color: #0B0812;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.beat-card__body { padding: calc(var(--space) * 2.5); }
.beat-card__genre { font-family: var(--font-mono); font-size: 0.68rem; color: var(--color-accent-2); text-transform: uppercase; margin-bottom: 4px; }
.beat-card__name { font-weight: 700; margin-bottom: 4px; }
.beat-card__bpm { color: var(--color-text-muted); font-size: 0.82rem; margin-bottom: 12px; }
.beat-card__audio { width: 100%; height: 34px; margin-bottom: 14px; filter: invert(0.9) hue-rotate(180deg); border-radius: 8px; }
.beat-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.beat-card__price { font-family: var(--font-mono); font-weight: 700; color: var(--color-accent-2); font-size: 1.05rem; }
.add-btn { background: var(--color-accent); color: #0B0812; padding: 10px 16px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
.add-btn:hover { opacity: 0.9; }

/* =========================== VIDEOS =========================== */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: calc(var(--space) * 3); }
.video-card { position: relative; border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--color-border); }
.video-card img { width: 100%; height: 100%; object-fit: cover; }
.video-card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(11,8,18,0.35); transition: background 0.15s ease;
}
.video-card:hover .video-card__play { background: rgba(11,8,18,0.55); }
.video-card__play span {
  width: 62px; height: 62px; border-radius: 50%; background: var(--color-accent); color: #0B0812;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.video-card__title {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 14px; font-weight: 700; font-size: 0.9rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.8), transparent);
}

/* =========================== TEAM CAROUSEL =========================== */
.carousel { position: relative; display: flex; align-items: center; gap: 12px; }
.carousel__viewport { overflow: hidden; flex: 1; }
.carousel__track { display: flex; gap: 20px; transition: transform 0.4s ease; padding: 4px calc(var(--space) * 3); }
.team-card {
  min-width: 300px; max-width: 300px; border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid var(--color-border); position: relative;
}
.team-card img { height: 340px; width: 100%; object-fit: cover; }
.team-card__caption {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent); font-weight: 600; font-size: 0.9rem;
}
.carousel__arrow {
  width: 46px; height: 46px; border-radius: 50%; background: var(--color-bg-alt); border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.2rem;
}
.carousel__arrow:hover { border-color: var(--color-accent); color: var(--color-accent); }
.carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: calc(var(--space) * 3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--color-border); }
.dot.is-active { background: var(--color-accent); width: 24px; border-radius: 4px; }

/* =========================== FOOTER =========================== */
.footer { background: var(--color-bg-alt); border-top: 1px solid var(--color-border); padding-top: calc(var(--space) * 8); }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: calc(var(--space) * 5); padding-bottom: calc(var(--space) * 6); }
.footer__tagline { color: var(--color-text-muted); margin: 10px 0 16px; font-size: 0.9rem; max-width: 280px; }
.footer__col h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 14px; }
.footer__col p, .footer__col a { display: block; color: var(--color-text-muted); font-size: 0.88rem; margin-bottom: 10px; }
.footer__col a:hover { color: var(--color-accent); }
.social-row { display: flex; gap: 10px; }
.social-icon {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.social-icon:hover { border-color: var(--color-accent); color: var(--color-accent); }
.footer__bottom { border-top: 1px solid var(--color-border); text-align: center; padding: calc(var(--space) * 2.5) 0; color: var(--color-text-muted); font-size: 0.8rem; }

/* =========================== FLOATING WHATSAPP =========================== */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px; width: 58px; height: 58px; border-radius: 50%;
  background: var(--color-success); color: #ffffff; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 10px 30px rgba(0,0,0,0.4); z-index: 50;
  animation: wa-pulse 2.4s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.06); }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 0 0 rgba(57,199,126,0.55); }
  50% { box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 0 10px rgba(57,199,126,0); }
}

/* =========================== CART DRAWER =========================== */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 60; opacity: 0; pointer-events: none; transition: opacity 0.2s ease; }
.overlay.is-visible { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw);
  background: var(--color-bg-alt); z-index: 70; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 0.3s ease; border-left: 1px solid var(--color-border);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--space) * 3); border-bottom: 1px solid var(--color-border); }
.cart-drawer__header h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: calc(var(--space) * 2); }
.cart-drawer__footer { padding: calc(var(--space) * 3); border-top: 1px solid var(--color-border); }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 16px; font-size: 1.1rem; }
.cart-total { font-family: var(--font-mono); color: var(--color-accent-2); }
.cart-empty { text-align: center; color: var(--color-text-muted); padding: 40px 20px; font-size: 0.9rem; }

.cart-item { display: flex; gap: 12px; padding: 12px; border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--color-bg-elevated); }
.cart-item__img { width: 60px; height: 60px; border-radius: 8px; overflow: hidden; flex-shrink: 0; background: var(--color-bg); }
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__body { flex: 1; min-width: 0; }
.cart-item__name { font-weight: 700; font-size: 0.9rem; }
.cart-item__type { font-family: var(--font-mono); font-size: 0.65rem; color: var(--color-accent-2); text-transform: uppercase; }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.qty-control { display: flex; align-items: center; gap: 8px; }
.qty-control button { width: 24px; height: 24px; border-radius: 6px; background: var(--color-bg); border: 1px solid var(--color-border); display: flex; align-items: center; justify-content: center; }
.cart-item__price { font-family: var(--font-mono); font-weight: 700; }
.remove-btn { color: var(--color-danger); font-size: 0.78rem; font-weight: 700; margin-top: 6px; }

/* =========================== MODAL =========================== */
.modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.96);
  width: min(480px, 92vw); max-height: 88vh; overflow-y: auto;
  background: var(--color-bg-alt); border-radius: var(--radius-lg); border: 1px solid var(--color-border);
  z-index: 80; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.modal.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal__header { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--space) * 3); border-bottom: 1px solid var(--color-border); }
.modal__header h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.modal__body { padding: calc(var(--space) * 3); }

.form-group { margin-bottom: calc(var(--space) * 2.5); }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; }
.form-group input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-border);
  background: var(--color-bg); color: var(--color-text); font-size: 0.95rem;
}
.form-group input:focus { border-color: var(--color-accent); outline: none; }
.form-hint { display: block; margin-top: 6px; font-size: 0.75rem; color: var(--color-text-muted); }

.payment-options { display: flex; gap: 12px; }
.payment-option {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px;
  border-radius: var(--radius-md); border: 1px solid var(--color-border); font-weight: 700; font-size: 0.85rem; color: var(--color-text-muted);
}
.payment-option .icon-slot { font-size: 1.4rem; }
.payment-option.is-selected { border-color: var(--color-accent); color: var(--color-accent); background: var(--color-accent-soft); }

.order-summary { background: var(--color-bg); border-radius: var(--radius-sm); padding: 14px; margin-bottom: calc(var(--space) * 2.5); font-size: 0.85rem; }
.order-summary__row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--color-text-muted); }
.order-summary__total { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--color-border); font-weight: 800; }

.form-error { color: var(--color-danger); font-size: 0.82rem; margin-bottom: 12px; min-height: 1em; }

.success-check {
  width: 60px; height: 60px; border-radius: 50%; background: var(--color-success); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin: 0 auto calc(var(--space) * 2);
}
#checkoutStep2 { text-align: center; }
#checkoutStep2 h4 { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin-bottom: 8px; }
#confirmationMessage { color: var(--color-text-muted); margin-bottom: 16px; font-size: 0.9rem; }
.transfer-note {
  background: var(--color-accent-soft); border: 1px solid var(--color-accent); border-radius: var(--radius-sm);
  padding: 14px; margin-bottom: 16px; font-size: 0.85rem; text-align: left;
}
#whatsappSendBtn { margin-bottom: 10px; }

/* =========================== VIDEO LIGHTBOX (YouTube iframe) =========================== */
.video-lightbox {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.96);
  width: min(880px, 92vw); z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.video-lightbox.is-open { opacity: 1; pointer-events: auto; transform: translate(-50%,-50%) scale(1); }
.video-lightbox__frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius-md); overflow: hidden; background: black; }
.video-lightbox__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-lightbox__close { position: absolute; top: -50px; right: 0; background: var(--color-bg-alt); }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 960px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .header { top: 0; }
  .offers-bar__track { font-size: 0.7rem; }
  .nav {
    position: fixed; top: 76px; left: 0; right: 0; background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border); flex-direction: column; padding: calc(var(--space) * 2);
    transform: translateY(-140%); transition: transform 0.25s ease; z-index: 39;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 12px 4px; border-bottom: 1px solid var(--color-border); }
  .nav-toggle { display: flex; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__cta { flex-direction: column; align-items: stretch; }
  .whatsapp-float { width: 50px; height: 50px; bottom: 16px; right: 16px; font-size: 1.3rem; }
}
