/* ============================================================
   Synergy Dynamics Balance — Componentes de página
   Hero · Timeline · Libro 3D · Credenciales · Pasos · Comunidad
   ============================================================ */

/* ──────────── HERO ──────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-20) var(--section-px) var(--space-24);
}
.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: var(--z-raised);
}
.hero-full { min-height: calc(100vh - 73px); display: flex; align-items: center; }
.hero h1 { margin-bottom: var(--space-5); }
.hero-sub { font-size: var(--text-md); color: var(--color-text-muted); line-height: 1.6; margin-bottom: var(--space-8); max-width: 38ch; }
.hero-visual { position: relative; display: grid; place-items: center; }

/* Aura ambiental detrás del hero */
.hero-aura {
  position: absolute;
  width: 60vw; max-width: 720px; aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29,158,117,0.18), rgba(83,74,183,0.10) 45%, transparent 70%);
  filter: blur(20px);
  z-index: var(--z-base);
  top: -10%; right: -10%;
  animation: auraDrift 14s ease-in-out infinite;
  pointer-events: none;
}

/* Textura de puntos sutil */
.dot-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--color-border-strong) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.4;
  z-index: var(--z-base);
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 80%);
}

/* Indicador de scroll */
.scroll-indicator {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.scroll-indicator .mouse {
  width: 22px; height: 36px;
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  position: relative;
}
.scroll-indicator .mouse span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--color-primary);
  animation: scrollPulse 1.8s ease-in-out infinite;
}

/* ──────────── LIBRO 3D ──────────── */
.book-stage { perspective: 1600px; display: grid; place-items: center; padding: var(--space-6); }
.book-3d {
  width: min(280px, 70vw);
  aspect-ratio: 6 / 9.4;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(4deg);
  animation: float 6s ease-in-out infinite;
  border-radius: 4px 8px 8px 4px;
  box-shadow: 28px 36px 60px rgba(0,0,0,0.28);
}
.book-3d img, .book-cover-fallback {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border-radius: 4px 8px 8px 4px;
  object-fit: cover;
}
/* Lomo del libro */
.book-3d::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 100%;
  transform: translateX(-21px) rotateY(90deg);
  transform-origin: right center;
  background: linear-gradient(90deg, #0b1f3a, #1a2f4f);
  border-radius: 4px 0 0 4px;
}
/* Páginas (canto) */
.book-3d::after {
  content: "";
  position: absolute;
  right: 0; top: 1.5%;
  width: 18px; height: 97%;
  transform: translateX(17px) rotateY(90deg);
  transform-origin: left center;
  background: repeating-linear-gradient(90deg, #fff, #fff 1px, #e6e3da 2px, #fff 3px);
  border-radius: 0 2px 2px 0;
}

/* Portada fallback (cuando no hay imagen real) */
.book-cover-fallback {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.12), transparent 40%),
    linear-gradient(165deg, #14233f 0%, #2a2d4f 45%, #6a3a4f 80%, #8a4a55 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  color: #fff;
}
.book-cover-fallback .bc-top { font-size: 8px; letter-spacing: 0.08em; opacity: 0.85; text-transform: uppercase; margin-bottom: auto; padding-top: var(--space-3); }
.book-cover-fallback .bc-title { font-family: var(--font-serif); font-weight: 700; font-size: var(--text-lg); line-height: 1.05; margin: var(--space-4) 0; text-transform: uppercase; }
.book-cover-fallback .bc-sub { font-size: 8px; letter-spacing: 0.18em; opacity: 0.8; text-transform: uppercase; line-height: 1.8; }
.book-cover-fallback .bc-author { font-size: 9px; letter-spacing: 0.05em; margin-top: auto; padding-bottom: var(--space-3); opacity: 0.9; }

/* ──────────── BARRA DE CREDENCIALES ──────────── */
.credbar { background: var(--color-bg-alt); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.credbar-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  gap: var(--space-5);
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.credbar-inner .cred { white-space: nowrap; display: inline-flex; align-items: center; gap: var(--space-2); }
.credbar-inner .cred::before { content: "✦"; color: var(--color-primary); font-size: 0.7em; }

/* ──────────── TIMELINE ──────────── */
.timeline { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.timeline::before {
  content: "";
  position: absolute;
  top: 28px; left: 8%; right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary), var(--color-accent));
  z-index: var(--z-base);
}
.tl-point { position: relative; padding-top: var(--space-16); }
.tl-point .tl-dot {
  position: absolute;
  top: 18px; left: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 4px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-primary);
  z-index: var(--z-raised);
}
.tl-point:nth-child(2) .tl-dot { background: var(--color-secondary); box-shadow: 0 0 0 2px var(--color-secondary); }
.tl-point:nth-child(3) .tl-dot { background: var(--color-accent); box-shadow: 0 0 0 2px var(--color-accent); }
.tl-year { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-primary-dark); font-weight: 500; }
.tl-point:nth-child(2) .tl-year { color: var(--color-secondary-dark); }
.tl-point:nth-child(3) .tl-year { color: var(--color-accent-dark); }
.tl-title { font-size: var(--text-lg); margin: var(--space-2) 0 var(--space-3); }
.tl-text { color: var(--color-text-muted); font-size: var(--text-base); }

@media (max-width: 768px) {
  .timeline { grid-template-columns: 1fr; gap: var(--space-10); }
  .timeline::before { left: 10px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--color-primary), var(--color-accent)); }
  .tl-point { padding-top: 0; padding-left: var(--space-10); }
  .tl-point .tl-dot { top: 2px; left: 0; }
}

/* ──────────── PASOS NUMERADOS (proceso) ──────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); counter-reset: step; }
.step { position: relative; }
.step-num {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--color-primary-light);
  color: var(--color-primary-darker);
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: var(--space-4);
}
.step-title { font-size: var(--text-md); margin-bottom: var(--space-2); }
.step-text { color: var(--color-text-muted); font-size: var(--text-sm); }
@media (max-width: 768px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .steps { grid-template-columns: 1fr; } }

/* ──────────── CARD DE COMUNIDAD ──────────── */
.community-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}
.community-card .ch-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  margin-bottom: var(--space-5);
}
.community-card.telegram .ch-icon { background: rgba(42,171,238,0.16); color: #2AABEE; }
.community-card.whatsapp .ch-icon { background: rgba(37,211,102,0.16); color: #25D366; }
.community-card h3 { color: #fff; margin-bottom: var(--space-2); }
.community-card p { color: rgba(250,250,248,0.72); margin-bottom: var(--space-6); }

/* ──────────── CARD DE CAMINO (3 caminos) ──────────── */
.path-card { display: flex; flex-direction: column; height: 100%; }
.path-card .badge { align-self: flex-start; margin-bottom: var(--space-5); }
.path-card .card-text { flex: 1; }
.path-card .path-price { font-family: var(--font-serif); font-weight: 600; color: var(--color-primary-darker); margin: var(--space-5) 0; }
.path-card .btn { margin-top: auto; }

/* ──────────── PRECIO / PRODUCTO ──────────── */
.price-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
}
.price-card.featured { border: 2px solid var(--color-primary); box-shadow: var(--shadow-lg); position: relative; }
.price-card.featured .price-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
}
.price-card .price-value { font-family: var(--font-serif); font-size: var(--text-3xl); font-weight: 700; color: var(--color-primary-darker); margin: var(--space-3) 0; }
.price-card .price-unit { font-size: var(--text-sm); color: var(--color-text-subtle); }

/* ──────────── REPRODUCTOR DE AUDIO ──────────── */
.audio-player {
  background: var(--color-bg-dark);
  color: var(--color-text-inverse);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.audio-player audio { width: 100%; }

/* ──────────── HERO de autor / split foto ──────────── */
.portrait-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--color-bg-alt);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-frame.placeholder {
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--color-primary-light), var(--color-accent-light));
  color: var(--color-primary-dark);
}
.portrait-frame .ph-label { font-size: var(--text-sm); text-align: center; padding: var(--space-4); opacity: 0.7; }

/* ──────────── CTA banda final ──────────── */
.cta-band { text-align: center; }
.cta-band .form-inline { max-width: 540px; margin: var(--space-8) auto 0; }
.cta-band .btn-white { flex-shrink: 0; }

/* ──────────── FAQ acordeón ──────────── */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-q {
  width: 100%;
  text-align: left;
  background: none; border: none;
  padding: var(--space-5) 0;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.faq-q .faq-icon { flex-shrink: 0; transition: transform var(--transition); color: var(--color-primary); font-size: var(--text-lg); }
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--transition-slow), padding var(--transition); color: var(--color-text-muted); }
.faq-item.open .faq-a { padding-bottom: var(--space-5); }

/* ──────────── HERO landing (kit) ──────────── */
.landing-hero { text-align: center; max-width: var(--max-width-text); margin: 0 auto; }
.landing-hero h1 { margin-bottom: var(--space-6); }
.lead-form-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10);
  max-width: 460px;
  margin: 0 auto;
}

/* utilidades de color de texto */
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary-dark); }
.text-amber { color: var(--color-secondary-dark); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-12); }
  .hero-full { min-height: auto; }
  .hero-sub { max-width: none; }
}

/* ──────────── Calendly placeholder (antes de cargar el widget) ──────────── */
.calendly-embed {
  min-height: 240px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-lg, 14px);
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  color: var(--color-text-subtle);
  font-size: var(--text-sm);
}
.calendly-embed.calendly-inline-widget {
  border: none;
  background: transparent;
  display: block;
  padding: 0;
}

/* ──────────── Book stage pequeño (banda del libro) ──────────── */
.book-stage.small { transform: scale(0.82); transform-origin: center; }

/* ──────────── Páginas legales ──────────── */
.legal-page h2 { font-size: var(--text-xl); margin-top: var(--space-10); margin-bottom: var(--space-3); }
.legal-page p { margin-bottom: var(--space-4); color: var(--color-text); line-height: 1.75; }
.legal-page h1 + .text-muted { margin-bottom: var(--space-8); }
