/* ── Apex Music Academy — CSS compartido para páginas de instrumento ─ */
:root {
  --crema:        #FAF8F4;
  --acento:       #BFCB00;
  --azul:         #0078A3;
  --texto:        #2C2C2C;
  --texto-suave:  #666;
  --superficie:   #f0ede8;
  --borde:        #e8e4dc;
  --oscuro:       #2C2C2C;
  --radius-lg:    16px;
  --radius:       8px;
  --container:    1120px;
  color-scheme:   light;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: var(--crema); color: var(--texto); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
address { font-style: normal; }

/* ── Scroll progress ───────────── */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--acento); z-index: 999; transition: width 0.1s linear;
}

/* ── Container ─────────────────── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ── Header ────────────────────── */
#header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,248,244,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borde);
}
#header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { width: 32px; height: 32px; object-fit: contain; mix-blend-mode: multiply; }
.logo-text { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 600; color: var(--texto); line-height: 1.2; }
.logo-text span { display: block; font-size: 0.75rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-suave); }

/* ── Buttons ───────────────────── */
.btn-primary {
  display: inline-block; background: var(--oscuro); color: #fff;
  padding: 11px 24px; border-radius: var(--radius); font-size: 0.9rem;
  font-weight: 500; text-decoration: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.8; }
.btn-acento { background: var(--azul); }

/* ── Section shared ────────────── */
section { padding: 80px 0; }
h1, h2, h3 { font-family: 'Cormorant Garamond', serif; }
h2 { font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 600; margin-bottom: 12px; }
.section-label {
  display: inline-block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--azul); margin-bottom: 10px;
}
.section-sub { color: var(--texto-suave); margin-bottom: 44px; max-width: 560px; }

/* ── Animate on scroll ─────────── */
[data-animate] { opacity: 0; transform: translateY(16px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-animate].in-view { opacity: 1; transform: none; }
[data-delay="2"] { transition-delay: 0.1s; }
[data-delay="3"] { transition-delay: 0.2s; }
[data-delay="4"] { transition-delay: 0.3s; }

/* ── Hero instrumento ──────────── */
#hero-inst { background: var(--crema); padding-top: 96px; padding-bottom: 80px; }
.hero-inst-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero-inst-content .section-label { color: var(--azul); }
.hero-inst-content h1 { font-size: clamp(2.8rem, 6vw, 5rem); font-weight: 600; line-height: 1.08; margin-bottom: 20px; }
.hero-inst-content h1 span { color: var(--acento); font-style: italic; }
.hero-inst-sub { font-size: 1rem; color: var(--texto-suave); margin-bottom: 28px; max-width: 420px; line-height: 1.75; }
.hero-inst-gratis { font-size: 0.8rem; color: var(--texto-suave); margin-top: 14px; }
.hero-inst-gratis strong { color: var(--azul); font-weight: 500; }
.hero-inst-img { border-radius: var(--radius-lg); overflow: hidden; height: 420px; }
.hero-inst-img img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 768px) {
  .hero-inst-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-inst-img { height: 240px; }
  #hero-inst { padding-top: 72px; }
}

/* ── Beneficios ────────────────── */
#beneficios { background: #fff; }
.beneficios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.beneficio-card { background: var(--crema); border-radius: var(--radius-lg); padding: 28px 24px; border: 1px solid var(--borde); }
.beneficio-num { font-family: 'Cormorant Garamond', serif; font-size: 2.5rem; font-weight: 600; color: var(--acento); line-height: 1; margin-bottom: 10px; }
.beneficio-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; font-family: 'DM Sans', sans-serif; }
.beneficio-card p { font-size: 0.88rem; color: var(--texto-suave); line-height: 1.65; }
@media (max-width: 768px) {
  .beneficios-grid { grid-template-columns: 1fr; }
}

/* ── CTA precios ───────────────── */
#cta-precios { background: var(--crema); }
.cta-precios-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.cta-plan-card {
  background: #fff; border: 1px solid var(--borde); border-radius: var(--radius-lg);
  padding: 20px 18px; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'DM Sans', sans-serif; width: 100%; text-align: left;
}
.cta-plan-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(44,44,44,0.1); }
.cta-plan-card.selected { border-color: var(--azul); background: #f0f8fc; }
.cta-plan-nombre { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; color: var(--texto); }
.cta-plan-precio { display: block; font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 700; color: var(--texto); line-height: 1; }
.cta-plan-precio span { font-size: 0.78rem; font-weight: 400; color: var(--texto-suave); font-family: 'DM Sans', sans-serif; }
.cta-plan-desc { display: block; font-size: 0.75rem; color: var(--texto-suave); margin-top: 5px; }
.cta-plan-badge { display: inline-block; font-size: 0.62rem; background: var(--azul); color: #fff; padding: 2px 8px; border-radius: 50px; margin-top: 6px; letter-spacing: 0.04em; text-transform: uppercase; }
.precios-nota { font-size: 0.8rem; color: var(--texto-suave); text-align: center; margin-bottom: 6px; }
.precios-trans { font-size: 0.8rem; color: var(--azul); font-weight: 500; text-align: center; }
@media (max-width: 900px) {
  .cta-precios-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .cta-precios-grid { grid-template-columns: 1fr; }
}

/* ── Formulario ────────────────── */
#inscripcion { background: #fff; }
.form-wrapper { max-width: 600px; }
.form-inst-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--crema); border: 1px solid var(--borde);
  border-radius: var(--radius); padding: 8px 16px; margin-bottom: 28px;
  font-size: 0.88rem; color: var(--texto-suave);
}
.form-inst-badge strong { color: var(--azul); }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; color: var(--texto); }
.form-group input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--borde);
  border-radius: var(--radius); font-size: 0.9rem; font-family: 'DM Sans', sans-serif;
  background: var(--crema); color: var(--texto); transition: border-color 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--azul); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-plan-label { font-size: 0.85rem; font-weight: 500; margin-bottom: 12px; color: var(--texto); display: block; }
.form-plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.plan-chip {
  background: var(--crema); border: 1px solid var(--borde); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; transition: all 0.15s;
  font-family: 'DM Sans', sans-serif; text-align: left; width: 100%;
}
.plan-chip:hover { border-color: var(--azul); }
.plan-chip.selected { border-color: var(--azul); background: #f0f8fc; }
.plan-chip .chip-nombre { display: block; font-size: 0.82rem; font-weight: 600; }
.plan-chip .chip-precio { display: block; font-size: 0.78rem; color: var(--texto-suave); margin-top: 2px; }
.plan-chip.hidden { display: none; }
.plan-nota-inst { font-size: 0.82rem; color: var(--texto-suave); margin-bottom: 16px; background: #fef9e7; border: 1px solid #f0e06a; border-radius: var(--radius); padding: 10px 14px; }
.form-disclaimer { font-size: 0.78rem; color: var(--texto-suave); margin-top: 12px; }
.form-success { text-align: center; padding: 48px 24px; }
.form-success h3 { font-size: 1.5rem; margin-bottom: 10px; font-family: 'Cormorant Garamond', serif; }
.form-success p { color: var(--texto-suave); margin-bottom: 24px; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: #e8f5e9; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; color: #2d8a4e; }
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
  .form-plan-grid { grid-template-columns: 1fr; }
}

/* ── Footer ────────────────────── */
#footer { background: var(--oscuro); color: #fff; padding: 48px 0; text-align: center; }
.footer-logo-text { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 600; display: block; margin-bottom: 8px; }
.footer-slogan { color: rgba(255,255,255,0.4); font-size: 0.82rem; margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.footer-links a { color: rgba(255,255,255,0.42); text-decoration: none; font-size: 0.85rem; }
.footer-links a:hover { color: #fff; }
.footer-back { font-size: 0.82rem; color: rgba(255,255,255,0.35); margin-bottom: 8px; }
.footer-back a { color: var(--acento); text-decoration: none; }
.footer-back a:hover { text-decoration: underline; }
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.2); }

/* ── Accessibility ─────────────── */
:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 2px;
}
.btn-primary:focus-visible,
.plan-chip:focus-visible,
.cta-plan-card:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 3px;
}

/* ── Touch devices — no hover ghost ── */
@media (hover: none) {
  .btn-primary:hover { opacity: 1; }
  .cta-plan-card:hover { transform: none; box-shadow: none; }
  .plan-chip:hover { border-color: var(--borde); }
  .footer-links a:hover { color: rgba(255,255,255,0.42); }
  .footer-back a:hover { text-decoration: none; }
}

/* ── Reduced motion ────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  [data-animate] { opacity: 1; transform: none; }
  .scroll-progress { transition: none; }
}

/* ── Touch action ──────────────── */
.btn-primary,
.plan-chip,
.cta-plan-card {
  touch-action: manipulation;
}

/* ── Form error ────────────────── */
.form-error {
  display: block;
  font-size: 0.78rem;
  color: #d32f2f;
  margin-top: 4px;
  font-weight: 500;
  min-height: 1em;
}
.form-group input.has-error,
.form-group input[aria-invalid="true"] {
  border-color: #d32f2f;
  background: rgba(211,47,47,0.04);
}

/* ── Consent checkbox ──────────── */
.form-consent {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 16px 0 8px;
  font-size: 0.82rem; color: #635D57; line-height: 1.55;
}
.form-consent input[type="checkbox"] {
  margin-top: 3px; flex-shrink: 0;
  width: 16px; height: 16px;
  accent-color: #0078A3;
  cursor: pointer;
}
.form-consent a { color: #0078A3; text-decoration: underline; text-underline-offset: 2px; }

/* ── Skip link ─────────────────── */
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: #0078A3; color: #fff;
  padding: 10px 16px;
  text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  z-index: 10000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

/* ── WhatsApp floating CTA ─────── */
.wa-float {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 90;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px 12px 14px;
  background: #25D366;
  color: #fff;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  box-shadow: 0 8px 24px rgba(37,211,102,0.35), 0 2px 6px rgba(0,0,0,0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wa-float:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37,211,102,0.45); }
.wa-float-label { white-space: nowrap; }
@media (max-width: 480px) {
  .wa-float { right: 14px; bottom: 14px; padding: 12px; }
  .wa-float-label { display: none; }
}
@media (prefers-reduced-motion: reduce) { .wa-float { transition: none; } }

/* ── Cookie consent banner ─────── */
.cc-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 9990;
  max-width: 720px; margin: 0 auto;
  background: #1a1f24;
  color: #f5f3ee;
  border-radius: 8px;
  padding: 18px 22px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.28);
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px; align-items: center;
  transform: translateY(120%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  font-size: 0.86rem; line-height: 1.5;
  font-family: 'DM Sans', sans-serif;
}
.cc-banner.cc-show { transform: translateY(0); }
.cc-banner p { margin: 0; }
.cc-banner a { color: #BFCB00; text-decoration: underline; }
.cc-btn {
  border: 1px solid rgba(245,243,238,0.25);
  background: transparent; color: #f5f3ee;
  padding: 9px 18px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem; font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.cc-btn:hover { border-color: #f5f3ee; }
.cc-btn-primary { background: #0078A3; border-color: #0078A3; }
.cc-btn-primary:hover { background: #00A8CC; border-color: #00A8CC; }
@media (max-width: 600px) {
  .cc-banner { grid-template-columns: 1fr; gap: 10px; padding: 16px 18px; }
  .cc-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .cc-banner { transition: none; } }
