/* Portada (solo index.html): compromisos del hero, recorrido "lo que tienes dentro" (maquetas de cristal animadas),
   pasos para entrar y preguntas frecuentes. Verde/rojo de las velas son fijos (significan sube/baja). */

/* ---------- compromisos bajo los botones del hero ---------- */
.hero-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 26px 0 0; padding: 0; color: var(--peak-muted); font-size: 14px; }
.hero-pills li { display: inline-flex; align-items: center; gap: 8px; }
.hp-ico {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #2ecc71; background: rgba(46, 204, 113, 0.14);
}
.hp-ico.gold { color: #f5c451; background: rgba(245, 196, 81, 0.16); font-size: 9px; }

/* ---------- recorrido "Todo lo que tienes dentro" ---------- */
.tour { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 40px; margin-top: 8px; align-items: center; }
.tour-tabs { display: flex; flex-direction: column; gap: 4px; }
.tour-tabs button {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px 14px; border-radius: 16px; border: 1px solid transparent; background: transparent;
  color: var(--peak-white); font: inherit; opacity: 0.72; transition: opacity 0.2s ease, background 0.25s ease, border-color 0.25s ease;
}
.tour-tabs button:hover { opacity: 1; background: rgba(255, 255, 255, 0.04); }
.tour-tabs button[aria-selected="true"] {
  opacity: 1; background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}
.tour-tabs button[aria-selected="true"]::before {
  content: ""; position: absolute; left: -1px; top: 22%; bottom: 22%; width: 3px; border-radius: 3px;
  background: var(--peak-red); box-shadow: 0 0 12px var(--peak-red);
}
.tour-tabs button:focus-visible { outline: 2px solid var(--peak-red); outline-offset: 2px; }
.tt-ico {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px;
  color: #ff9a9a; background: rgba(var(--peak-red-rgb), 0.14); border: 1px solid rgba(var(--peak-red-rgb), 0.28);
  transition: background 0.25s ease, color 0.25s ease;
}
.tour-tabs button[aria-selected="true"] .tt-ico { color: #fff; background: linear-gradient(145deg, var(--peak-red), var(--peak-red-dark)); border-color: transparent; }
.tt-ico svg, .mf-note svg, .mfo-ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tour-tabs b { display: block; font-size: 15px; }
.tour-tabs small { display: block; color: var(--peak-muted); font-size: 12.5px; }

/* sin caja alrededor: el texto flota sobre el fondo y la maqueta es la única pieza con cuerpo (cristal) */
.tour-panels { min-height: 380px; display: grid; align-items: center; }
.tour-panel { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 40px; align-items: center; }
.tour-panel[hidden] { display: none; }
.tp-copy h3 { margin: 0 0 12px; font-size: 26px; }
.tp-copy p { margin: 0; color: var(--peak-muted); line-height: 1.7; }
.tp-ask { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.glass {
  position: relative; border-radius: 22px; padding: 20px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
/* brillo que respira detrás del cristal */
.glass::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 70%; aspect-ratio: 1; z-index: -1; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--peak-red-rgb), 0.35), transparent 65%); filter: blur(20px);
  animation: glow 6s ease-in-out infinite alternate;
}
@keyframes glow { to { transform: translate(-12%, 18%) scale(1.15); opacity: 0.6; } }
.tp-mock { display: flex; flex-direction: column; gap: 12px; font-size: 13px; animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* piezas grises (".sk") en lugar de datos inventados */
.sk { display: block; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); margin-top: 7px; }
.w50 { width: 50%; } .w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }
.bar { display: block; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 7px; }
.bar b { display: block; height: 100%; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--peak-red), #ff8a8a); }

/* --- entradas animadas: se disparan al ver la sección (.is-in) y cada vez que se cambia de pestaña --- */
.tour.is-in .tour-panel:not([hidden]) .pop { animation: popIn 0.5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 0.12s + 0.15s); }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(0.97); } }
.tour.is-in .tour-panel:not([hidden]) .bar b { animation: fill 1.1s cubic-bezier(.2, .8, .2, 1) 0.35s both; }
@keyframes fill { from { width: 0; } }
.tour.is-in .tour-panel:not([hidden]) .tp-copy { animation: popIn 0.45s ease both; }

.mz-head { display: flex; justify-content: space-between; align-items: center; }
.mz-sym { font-weight: 800; color: #f5c451; letter-spacing: 0.3px; }
.mz-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); color: var(--peak-muted); }
.mz-live i { width: 6px; height: 6px; border-radius: 50%; background: #2ecc71; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.mz-candles { width: 100%; height: auto; overflow: visible; }
.cd line { stroke-width: 1.4; }
.cd.up rect, .cd.up line { fill: #2ecc71; stroke: #2ecc71; }
.cd.dn rect, .cd.dn line { fill: #e5484d; stroke: #e5484d; }
.cd-line { fill: none; stroke: rgba(245, 196, 81, 0.55); stroke-width: 1.4; stroke-dasharray: 2 4; }
.tour.is-in .tour-panel:not([hidden]) .cd { transform-box: fill-box; transform-origin: center; animation: grow 0.45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 0.06s + 0.1s); }
@keyframes grow { from { opacity: 0; transform: scaleY(0.1); } }
.cd:last-of-type rect { animation: lastTick 2.4s ease-in-out 1.6s infinite; }
@keyframes lastTick { 50% { opacity: 0.55; } }
.mz-cells { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mz-cells div { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); }
.mz-cells small, .md-row small { color: var(--peak-muted); }

.mf-msg { display: flex; gap: 10px; align-items: flex-start; }
.mf-msg > div { flex: 1; padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: rgba(255, 255, 255, 0.06); }
.mf-msg.me { justify-content: flex-end; }
.mf-msg.me > div { flex: 0 1 75%; border-radius: 14px 4px 14px 14px; background: rgba(var(--peak-red-rgb), 0.2); }
.mf-av { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: var(--peak-red); color: #fff; }
.mf-note { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 11px; color: #2ecc71; }
.mf-note svg { width: 14px; height: 14px; stroke-width: 2.4; }

.md-cal { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.md-cal i { aspect-ratio: 1; border-radius: 4px; background: rgba(255, 255, 255, 0.06); }
.md-cal i.g { background: rgba(46, 204, 113, 0.6); }
.md-cal i.r { background: rgba(229, 72, 77, 0.6); }
.tour.is-in .tour-panel:not([hidden]) .md-cal i { animation: popIn 0.35s ease both; animation-delay: calc(var(--i) * 0.03s + 0.1s); }
.md-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.md-tags span { padding: 3px 10px; border-radius: 99px; font-size: 11.5px; background: rgba(255, 255, 255, 0.06); color: var(--peak-muted); }

.mfo-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); }
.mfo-row > div { flex: 1; }
.lv { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.lv.g { background: var(--peak-green); } .lv.b { background: var(--peak-blue); } .lv.r { background: var(--peak-red); }
.mfo-ico { width: 22px; height: 22px; flex: none; color: var(--peak-muted); }
.mfo-ico.gold { color: #f5c451; }

.mc-b { max-width: 82%; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: rgba(255, 255, 255, 0.07); line-height: 1.5; }
.mc-b.me { align-self: flex-end; border-radius: 16px 4px 16px 16px; background: rgba(var(--peak-red-rgb), 0.22); }
.mc-typing { display: inline-flex; gap: 5px; align-self: flex-start; padding: 13px 16px; }
.mc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--peak-muted); animation: typing 1.2s ease-in-out infinite; }
.mc-typing i:nth-child(2) { animation-delay: 0.15s; }
.mc-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: 0.4; } }

.mock-tg { background: linear-gradient(160deg, rgba(36, 129, 204, 0.16), rgba(14, 22, 33, 0.35)); }
.tg-msg { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px 18px; border-radius: 4px 14px 14px 14px; background: rgba(24, 37, 51, 0.75); color: #e8eef4; }
.tg-msg > div { flex: 1; }
.tg-dot { width: 10px; height: 10px; flex: none; margin-top: 5px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.tg-time { position: absolute; right: 10px; bottom: 4px; font-size: 10px; color: #6d8396; }

@media (max-width: 900px) {
  .tour { grid-template-columns: 1fr; gap: 22px; }
  .tour-tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; margin-inline: -24px; padding-inline: 24px; scroll-snap-type: x mandatory; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tabs button { flex: none; width: auto; scroll-snap-align: start; padding: 8px 14px 8px 8px; }
  .tour-tabs button[aria-selected="true"]::before { left: 22%; right: 22%; top: auto; bottom: -1px; width: auto; height: 3px; }
  .tour-tabs small { display: none; }
  .tt-ico { width: 34px; height: 34px; }
  .tour-panels { min-height: 0; }
  .tour-panel { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- cómo entrar ---------- */
.steps3 { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; position: relative; }
.steps3::before {
  content: ""; position: absolute; top: 31px; left: 16%; right: 16%; height: 2px; z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(var(--peak-red-rgb), 0.6), transparent);
}
.steps3 li { text-align: center; padding: 0 12px; }
.s3-n {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #fff;
  background: radial-gradient(circle at 30% 25%, #ff6b6b, var(--peak-red) 55%, var(--peak-red-dark));
  box-shadow: 0 10px 30px var(--peak-red-glow), 0 0 0 6px var(--peak-bg);
}
.steps3 h3 { margin: 0 0 6px; font-size: 18px; }
.steps3 p { margin: 0; color: var(--peak-muted); font-size: 14.5px; }
.steps3-cta { text-align: center; margin-top: 30px; }
@media (max-width: 720px) {
  .steps3 { grid-template-columns: 1fr; gap: 26px; }
  .steps3::before { display: none; }
}

/* ---------- preguntas frecuentes ---------- */
.faq-wrap { max-width: 820px; }
.faq { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.faq details { border-radius: 16px; border: 1px solid var(--peak-border); background: color-mix(in srgb, var(--peak-card) 92%, transparent); transition: border-color 0.2s ease; }
.faq details[open] { border-color: rgba(var(--peak-red-rgb), 0.5); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--peak-red); font-size: 22px; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:focus-visible { outline: 2px solid var(--peak-red); outline-offset: 2px; border-radius: 16px; }
.faq details p { margin: 0; padding: 0 22px 18px; color: var(--peak-muted); line-height: 1.65; }

/* tema blanco: el cristal y las piezas grises necesitan tinta oscura en vez de blanca */
:root[data-theme="blanco"] .glass { background: linear-gradient(150deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55)); border-color: rgba(0, 0, 0, 0.08); box-shadow: 0 30px 60px rgba(40, 20, 80, 0.12); }
:root[data-theme="blanco"] .sk, :root[data-theme="blanco"] .bar, :root[data-theme="blanco"] .md-cal i:not(.g):not(.r) { background: rgba(0, 0, 0, 0.08); }
:root[data-theme="blanco"] .mz-cells div, :root[data-theme="blanco"] .mf-msg > div, :root[data-theme="blanco"] .mfo-row,
:root[data-theme="blanco"] .mc-b, :root[data-theme="blanco"] .md-tags span, :root[data-theme="blanco"] .tour-tabs button[aria-selected="true"] { background: rgba(0, 0, 0, 0.04); }

/* ---------- mismo cristal en todas las tarjetas de la portada (antes eran negras y con bordes de color) ---------- */
.compare-card, .path-card, .ticker-wrap, .journal-ticker-wrap, .community-block, .faq details {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.compare-card.good, .compare-card.bad,
.path-card.level-green, .path-card.level-blue, .path-card.level-red { border-color: rgba(255, 255, 255, 0.11); }
.compare-card li { border-bottom-color: rgba(255, 255, 255, 0.07); }
.faq details[open] { border-color: rgba(255, 255, 255, 0.2); background: linear-gradient(150deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)); }
.comment-item, .journal-chip { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.08); }
.community-block .peak-icon { border-color: rgba(255, 255, 255, 0.14); }

/* el color de cada tarjeta queda como un acento de luz arriba, no como un borde entero */
.compare-card, .path-card { position: relative; overflow: hidden; }
.compare-card::before, .path-card::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--acc), transparent); box-shadow: 0 0 18px var(--acc);
}
.compare-card.good { --acc: rgba(46, 204, 113, 0.9); }
.compare-card.bad { --acc: rgba(229, 72, 77, 0.9); }
.path-card.level-green { --acc: var(--peak-green); }
.path-card.level-blue { --acc: var(--peak-blue); }
.path-card.level-red { --acc: var(--peak-red); }
.path-card .level { color: var(--acc); }
.path-card .badge.badge-lock { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
a.path-card:hover, .compare-card:hover { border-color: rgba(255, 255, 255, 0.2); }
.path-card .btn-ghost, .path-card .btn-outline { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); color: var(--peak-white); }
.path-card:hover .btn-ghost, .path-card:hover .btn-outline { background: rgba(var(--peak-red-rgb), 0.25); border-color: rgba(var(--peak-red-rgb), 0.5); }

:root[data-theme="blanco"] :is(.compare-card, .path-card, .ticker-wrap, .journal-ticker-wrap, .community-block, .faq details) {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.55)); border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 50px rgba(40, 20, 80, 0.1);
}
:root[data-theme="blanco"] :is(.comment-item, .journal-chip) { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.06); }

@media (prefers-reduced-motion: reduce) {
  .glass::before, .tp-mock, .mz-live i, .cd:last-of-type rect, .mc-typing i { animation: none; }
  .tour.is-in .tour-panel:not([hidden]) *, .tour.is-in .tour-panel:not([hidden]) .bar b { animation: none !important; }
}

/* portada viva: último análisis del equipo (solo si es reciente) */
.hero-news { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-bottom: 18px; padding: 6px 14px 6px 10px; border-radius: 999px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px); color: var(--peak-white); font-size: 13px; text-decoration: none; transition: border-color 0.2s ease, background 0.2s ease; }
.hero-news:hover { border-color: rgba(var(--peak-red-rgb), 0.6); background: rgba(var(--peak-red-rgb), 0.12); }
.hero-news i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); animation: hnPulse 2s infinite; }
.hero-news span { color: var(--peak-muted); white-space: nowrap; }
.hero-news b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
@keyframes hnPulse { 70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }
@media (prefers-reduced-motion: reduce) { .hero-news i { animation: none; } }
