@font-face {
  font-family: "Sora";
  src: url("/fonts/sora/sora-400.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora/sora-500.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora/sora-600.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora/sora-700.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Sora";
  src: url("/fonts/sora/sora-800.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #010815;
  --bg-2: #080d1c;
  --navy: #010815;
  --panel: rgba(12, 22, 40, 0.72);
  --panel-border: rgba(212, 175, 55, 0.28);
  --gold: #d4af37;
  --gold2: #f0d78c;
  --text: #e8edf7;
  --muted: #93a1bd;
  --font: "Sora", "Segoe UI", system-ui, sans-serif;
  --glow-gold: 0 0 18px rgba(212, 175, 55, 0.45), 0 0 40px rgba(212, 175, 55, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Mismo túnel de estrellas que la app */
#webgl-container {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: #010815;
}
#webgl-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

a { color: var(--gold2); text-decoration: none; }
a:hover { color: #fff; text-shadow: 0 0 10px rgba(212, 175, 55, 0.5); }

.top {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.85rem 1.25rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--glow-gold);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.brand img { border-radius: 8px; }
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
  font-size: 0.92rem;
}
nav a:not(.btn) { color: var(--muted); }

.btn {
  display: inline-block;
  padding: 0.55rem 1.05rem;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  color: var(--gold2);
  background: transparent;
  font-family: inherit;
  font-weight: 650;
  text-decoration: none !important;
}
.btn.primary {
  background: linear-gradient(180deg, #e0c15a, var(--gold));
  color: #0b1524;
  border-color: transparent;
}
.btn.ghost { opacity: 0.9; }
.btn:hover { filter: brightness(1.08); }

main {
  position: relative;
  z-index: 1;
  max-width: 52rem;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.hero {
  padding: 3.2rem 0 1.15rem;
  border-bottom: 0;
}
.kicker {
  margin: 0 0 0.4rem;
  color: var(--gold2);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.1rem, 6vw, 3.2rem);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.lead {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  color: var(--text);
  max-width: 36rem;
}
.pairs {
  margin: 0 0 1.4rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.cta-row-center { justify-content: center; }

.perf {
  padding: 0.4rem 0 2.1rem;
  border-bottom: 1px solid rgba(147, 161, 189, 0.2);
}
.perf-kicker,
.why-kicker {
  margin: 0 0 0.2rem;
  color: var(--gold2);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.perf h2,
.why h2 {
  margin: 0 0 0.55rem;
  color: var(--gold2);
  font-size: 1.35rem;
  font-weight: 700;
}
.perf-lead,
.why-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.perf-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 0 0 0.85rem;
}
.perf-kpi {
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: var(--panel);
  box-shadow: var(--glow-gold);
}
.perf-kpi .lbl {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.perf-kpi .val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--gold);
}
.perf-kpi .val.pos { color: #7dffb3; }
.perf-kpi .val.neg { color: #ff8b8b; }
.perf-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}
.perf-range {
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: transparent;
  color: var(--gold2);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
}
.perf-range.is-on,
.perf-range[aria-pressed="true"] {
  background: linear-gradient(180deg, #e0c15a, var(--gold));
  color: #0b1524;
  border-color: transparent;
}
.perf-chart {
  position: relative;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: rgba(8, 13, 28, 0.72);
  overflow: hidden;
}
.perf-chart canvas { display: block; width: 100%; height: 260px; }
.perf-status {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.perf-status.is-err { color: #ff8b8b; }
.perf-disc {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.why {
  padding: 1.5rem 0 2.1rem;
  border-bottom: 1px solid rgba(147, 161, 189, 0.2);
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.why-card {
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  background: var(--panel);
  box-shadow: var(--glow-gold);
}
.why-ico {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.why-card h3 {
  margin: 0 0 0.4rem;
  color: var(--gold2);
  font-size: 1.02rem;
}
.why-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
@media (max-width: 720px) {
  .perf-kpis,
  .why-grid { grid-template-columns: 1fr; }
}

/* Carrusel reseñas (mismo gesto que AutoSeller, look CRIPTOJARVIS) */
.reviews-rollup {
  padding: 0.35rem 0 2.05rem;
  border-bottom: 1px solid rgba(147, 161, 189, 0.2);
}
.reviews-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.15rem;
}
.reviews-kicker {
  margin: 0 0 0.2rem;
  color: var(--gold2);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.reviews-head h2 {
  margin: 0;
  color: var(--gold2);
  font-size: 1.35rem;
  font-weight: 700;
}
.reviews-swipe {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  padding-bottom: 0.35rem;
}
.reviews-viewport {
  position: relative;
  margin-top: 0.85rem;
}
.reviews-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 1.15rem;
  width: 3.2rem;
  background: linear-gradient(90deg, transparent, var(--bg));
  pointer-events: none;
  z-index: 2;
}
.reviews-track {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0.2rem;
  padding: 0.55rem 2.6rem 1.45rem 0.15rem;
  -webkit-overflow-scrolling: touch;
}
.reviews-track::-webkit-scrollbar { height: 5px; }
.reviews-track::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.45);
  border-radius: 999px;
}
.review-card {
  flex: 0 0 min(78vw, 19.2rem);
  scroll-snap-align: start;
  background: var(--panel);
  border-radius: 16px;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--panel-border);
  box-shadow: var(--glow-gold);
  backdrop-filter: blur(10px);
  transform: rotate(-0.7deg);
}
.review-card:nth-child(even) { transform: rotate(0.85deg); }
.review-card:nth-child(3n) { transform: rotate(-1.15deg); }
.review-stars {
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.45);
}
.review-card blockquote {
  margin: 0.55rem 0 0.75rem;
  font-size: 1.02rem;
  line-height: 1.42;
  color: var(--text);
  font-weight: 500;
}
.review-card cite {
  display: block;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--gold2);
  font-weight: 600;
  letter-spacing: 0.03em;
}

#xxl-hourglass {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 26, 58, 0.55);
  pointer-events: none;
}
#xxl-hourglass.is-off { display: none; }
#xxl-hourglass .xxl-hg {
  font-size: 2.4rem;
  color: #d4af37;
  animation: cj-spin 1.1s linear infinite;
}
@keyframes cj-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Asistente ayuda (flotante) — mismo widget que la app */
.cj-help-fab {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 2147482000;
  width: 3.35rem;
  height: 3.35rem;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  background: radial-gradient(circle at 30% 25%, #1a2744 0%, #0a1224 70%);
  box-shadow: var(--glow-gold);
}
.cj-help-fab:hover {
  transform: scale(1.04);
  box-shadow: 0 0 22px rgba(212, 175, 55, 0.55);
}
.cj-help-fab img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: block;
  margin: 0 auto;
}
.cj-help-panel {
  position: fixed;
  right: 1rem;
  bottom: 4.85rem;
  z-index: 2147481999;
  width: min(22.5rem, calc(100vw - 1.5rem));
  max-height: min(28rem, calc(100vh - 6.5rem));
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 14px;
  background: rgba(8, 13, 28, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), var(--glow-gold);
  overflow: hidden;
}
.cj-help-panel[hidden] {
  display: none !important;
}
.cj-help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  background: rgba(12, 22, 40, 0.85);
}
.cj-help-head strong {
  color: var(--gold2);
  font-size: 0.92rem;
}
.cj-help-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.cj-help-close:hover { color: var(--gold); }
.cj-help-log {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 12rem;
}
.cj-help-msg { display: flex; }
.cj-help-msg-user { justify-content: flex-end; }
.cj-help-msg-bot { justify-content: flex-start; }
.cj-help-bubble {
  max-width: 92%;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.cj-help-msg-user .cj-help-bubble {
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--text);
}
.cj-help-bubble a.cj-help-link {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cj-help-bubble a.cj-help-link:hover { color: #ffe08a; }
.cj-help-msg-bot .cj-help-bubble {
  background: rgba(12, 22, 40, 0.9);
  border: 1px solid rgba(147, 161, 189, 0.22);
  color: var(--text);
}
.cj-help-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(8, 13, 28, 0.95);
}
.cj-help-form input {
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 8px;
  border: 1px solid rgba(147, 161, 189, 0.28);
  background: rgba(1, 8, 21, 0.85);
  color: var(--text);
  padding: 0.45rem 0.55rem;
  font-size: 0.86rem;
  font-family: inherit;
}
.cj-help-form .btn {
  margin: 0;
  padding: 0.45rem 0.7rem;
  font-size: 0.82rem;
  white-space: nowrap;
}
body.cj-help-open .cj-help-fab {
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35), var(--glow-gold);
}
.cj-help-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 1.1rem;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}
.cj-help-typing span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.35;
  animation: cj-help-dot 1s ease-in-out infinite;
}
.cj-help-typing span:nth-child(2) { animation-delay: 0.15s; }
.cj-help-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cj-help-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
@media (max-width: 480px) {
  .cj-help-panel {
    right: 0.5rem;
    bottom: 4.6rem;
    width: calc(100vw - 1rem);
  }
  .cj-help-fab {
    right: 0.65rem;
    bottom: 0.65rem;
  }
}

.block {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(147, 161, 189, 0.15);
}
.block h2 {
  margin: 0 0 0.75rem;
  color: var(--gold2);
  font-size: 1.35rem;
  font-weight: 700;
}
.block p, .block li { color: var(--muted); }
.block ul { padding-left: 1.15rem; }
.block li { margin: 0.45rem 0; }
.block strong { color: var(--text); }

.cta-end { text-align: center; border-bottom: none; }
.cta-end .btn { margin-top: 0.75rem; }

.foot {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding: 1.4rem 1.25rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}
.foot .meta { font-size: 0.8rem; opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  #webgl-container { display: none !important; }
  body {
    background:
      radial-gradient(900px 480px at 8% -8%, rgba(212, 175, 55, 0.14), transparent 55%),
      radial-gradient(800px 520px at 100% 0%, rgba(0, 242, 254, 0.1), transparent 50%),
      linear-gradient(165deg, var(--bg) 0%, var(--bg-2) 45%, #0a1224 100%);
  }
}

@media (max-width: 720px) {
  .top { flex-direction: column; align-items: flex-start; margin: 0.65rem 0.75rem 0; }
  nav { width: 100%; }
}

/* i18n switch — banderas img (CSP style-src 'self' no permite fill inline en SVG) */
.lang-switch {
  display: inline-flex;
  gap: 0.15rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  padding: 0.18rem 0.22rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 999px;
  background: rgba(8, 13, 28, 0.65);
}
.lang-switch button {
  font: inherit;
  line-height: 0;
  padding: 0.32rem 0.36rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: rgba(245, 247, 250, 0.75);
  cursor: pointer;
  opacity: 0.9;
}
.lang-switch .flag {
  display: block;
  width: 1.35rem;
  height: 0.9rem;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
  object-fit: cover;
}
.lang-switch button.is-active {
  opacity: 1;
  background: rgba(212, 175, 55, 0.22);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.45);
}
@media (max-width: 720px) {
  .top nav { flex-wrap: wrap; justify-content: flex-end; gap: 0.45rem; }
  .lang-switch { width: auto; justify-content: flex-end; margin: 0 0 0.25rem; }
}
