/* Caudal · landing — light, espejo de design-system/tokens.json (semantic.light).
   Animaciones (reveal/stagger/count-up) espejo del motion de la app, vía landing.js.
   Los paneles de features recrean la mini-UI de la app. */

body.landing {
  /* semantic.light, tintado a HUESO cálido (marketing) — espeja el pie crema de
     la firma/screenshots del App Store, no el light neutro de la app. */
  --bg: #F7F0E8;
  --surface: #FFFDFA;
  --surface-2: #F1E9DF;
  --surface-3: #E9DFD3;
  --border: #ECE3D8;
  --border-strong: #D9CDBE;
  --text: #0A0A0A;
  --text-2: #646464;
  --text-3: #767676;
  --brand: #E85002;
  --brand-soft: #C10801;       /* naranja como texto sobre superficie (light) */
  --on-brand: #0A0A0A;         /* texto sobre naranja = negro, siempre */
  --positive: #00875A;
  --positive-bg: rgba(0, 135, 90, 0.08);
  --negative: #D92D20;
  --negative-bg: rgba(217, 45, 32, 0.08);
  --chart-pos: #12B981;
  --chart-pos-fill: rgba(18, 185, 129, 0.12);
  --viz-1: #2563EB;
  --viz-2: #CA8A04;
  --viz-3: #C42E9B;
  --viz-4: #0D9488;
  /* global.radius */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  /* elevation 1 (light) = sombra sutil */
  --shadow-1: 0 1px 2px rgba(10, 10, 10, 0.04), 0 8px 24px rgba(10, 10, 10, 0.05);
  /* global.motion (duration base/slow + easing.standard) */
  --dur: 220ms;
  --dur-slow: 320ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);

  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
}

body.landing { --gutter: clamp(20px, 3vw, 48px); }
body.landing .wrap { max-width: 1240px; padding-left: var(--gutter); padding-right: var(--gutter); }

/* texto negro sobre naranja también en el toggle (regla dura del DS) */
body.landing .lang-toggle button.active { color: var(--on-brand); }

/* Nav sticky-glass y lockup de marca (28px) viven en styles.css → idénticos en
   el landing y en las páginas legales. */

/* ---------- Reveal on scroll (FadeInUp de la app: fade + translateY) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
/* stagger de hijos (step 28ms, como tokens.motion.stagger) */
.stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.stagger.visible > * { opacity: 1; transform: none; }
.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 28ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 56ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 84ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 112ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 140ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > * { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hero (centrado) ---------- */
/* ---------- Hero · banda naranja FULL-BLEED, de borde a borde (firma/screenshots) ---------- */
/* la banda pega con el nav (sin franja hueso intermedia) */
body.landing nav.top { margin-bottom: 0; }
/* neutraliza el .hero flex+min-height heredado de styles.css (centrado viejo)
   que empujaba la banda hacia abajo dejando franja hueso bajo el nav */
body.landing .hero { position: relative; display: block; min-height: 0; padding: 0 0 44px; }
.hero-band {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  isolation: isolate;
  color: #FFF4EC;
  /* gradiente EXACTO de los assets (firma/screenshots): rojo izq → naranja der */
  background: linear-gradient(100deg, #CD1F01 0%, #F87A37 100%);
}
.hero-band-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 92px var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* altura FIJA (≥ texto en español, el más largo) → no cambia al togglear a EN,
     y deja holgura entre el copy y las filas de logos arriba/abajo */
  min-height: 620px;
}
.hero-copy { position: relative; z-index: 2; max-width: 660px; margin: 0 auto; }
body.landing .hero h1 {
  font-size: clamp(34px, 4.6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: #FFFFFF;
}
body.landing .hero p.sub {
  font-size: 17px;
  line-height: 1.6;
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 244, 236, 0.86);
}
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }
/* badge + ghost SOBRE naranja: pills translúcidos claros (no el estilo light) */
body.landing .hero-band .badge {
  margin-top: 0;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: var(--r-md);
  color: #FFF4EC;
  font-weight: 600;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
body.landing .hero-band .btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #FFF4EC;
}
body.landing .hero-band .btn-ghost:hover {
  color: #FFFFFF;
  border-color: #FFFFFF;
  background: rgba(255, 255, 255, 0.10);
}

/* -- Stage: phone 3D FIJO (sin float) -- */
.hero-stage { position: relative; z-index: 1; align-self: stretch; min-height: 460px; }
.hero-phone {
  position: absolute;
  z-index: 2;
  right: -4%;
  bottom: -70px;
  width: 104%;
  max-width: 520px;
  height: auto;
}

/* -- Chips: dos filas marquee que cruzan toda la banda (arriba y abajo del
   copy) en sentidos opuestos y pasan por detrás del phone (z1 < phone z2). -- */
.hero-chips {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.chip-row { position: absolute; left: 0; width: 100%; }
.chip-row-1 { top: 20px; }
.chip-row-2 { bottom: 20px; }
.chip-track { display: flex; width: max-content; will-change: transform; }
.chip-row-1 .chip-track { animation: marqueeL 46s linear infinite; }
.chip-row-2 .chip-track { animation: marqueeR 54s linear infinite; }
.hchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-right: 14px;           /* margin (no gap) → translateX(-50%) es seamless */
  padding: 7px 13px 7px 7px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  color: #FFF4EC;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 20px -8px rgba(90, 28, 2, 0.4);
}
.hchip img { width: 26px; height: 26px; border-radius: 7px; display: block; background: #fff; }

@keyframes marqueeL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marqueeR { from { transform: translateX(-50%); } to { transform: translateX(0); } }

@media (prefers-reduced-motion: reduce) {
  .chip-track { animation: none !important; }
}

@media (max-width: 760px) {
  .hero-band-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 100px 22px 100px;     /* simétrico: misma holgura del texto a las filas de logos arriba y abajo */
    min-height: 0;
    gap: 8px;
  }
  .hero-copy { max-width: 100%; margin: 0 auto; }
  body.landing .hero p.sub { margin: 0 auto; }
  .hero-ctas { justify-content: center; }
  .hero-stage { min-height: 380px; margin-top: 16px; }
  .hero-phone {
    position: relative;
    right: auto;
    bottom: auto;
    width: 78%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
  }
}
.btn-primary {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--r-md);
  background: var(--brand);
  color: var(--on-brand); /* texto negro sobre naranja, regla dura del DS */
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms var(--ease), background 120ms var(--ease);
}
.btn-primary:hover { background: #C10801; } /* brand.pressed */
.btn-primary:active { transform: scale(0.96); } /* pressScale del DS */
.btn-ghost {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 14px;
  text-decoration: none;
  transition: transform 120ms var(--ease), color 120ms var(--ease), border-color 120ms var(--ease);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }
.btn-ghost:active { transform: scale(0.96); }

/* mini-UI (mockup y paneles): números en Space Grotesk tabular */
.micro {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 4px;
}
.num, .display-num, .mcard-val, .chip b, .mrow-val, .stat .big {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-variant-numeric: tabular-nums;
}
.mrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--border);
}
.mrow:first-child { border-top: 0; }
.dcell { width: 30px; text-align: center; flex-shrink: 0; }
.dcell b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 17px; font-weight: 700; line-height: 1; }
.dcell small { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); margin-top: 2px; }
.tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: 1px;
  margin-left: 4px;
}
.tag.declared { color: #2563EB; background: rgba(37, 99, 235, 0.08); }
.tag.estimated { color: var(--text-2); background: var(--surface-2); }
.month-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.month-row .micro { margin: 0; }
.checko {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  color: var(--text-3);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mrow-when { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.mrow-main { flex: 1; min-width: 0; }
.mrow-main b { display: block; font-size: 13.5px; color: var(--text); font-weight: 600; }
.mrow-main small { display: block; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-end { text-align: right; }
.mrow-val { display: block; font-size: 13.5px; font-weight: 600; color: var(--text); }
.mrow-end .pct { font-size: 11.5px; font-weight: 600; }
.pct.pos { color: var(--positive); }
.pct.neg { color: var(--negative); }

/* ---------- Trust strip ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 8px 0 24px;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.stat .big {
  display: block;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat .lbl { display: block; margin-top: 4px; font-size: 13px; color: var(--text-2); }

/* ---------- Secciones ---------- */
.section { padding: 56px 0 8px; }
.section-head { max-width: 620px; margin: 0 0 40px; }
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-soft);
  margin: 0 0 10px;
}
body.landing h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 10px; }
.section-head p { color: var(--text-2); margin: 0; font-size: 17px; line-height: 1.6; }

/* filas alternadas texto + panel */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 36px 0;
}
.feature:nth-of-type(even) .feature-copy { order: 2; }
.feature h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 24px;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 10px;
}
.feature p { color: var(--text-2); margin: 0 0 12px; }
.feature ul { margin: 0; padding-left: 18px; }
.feature li { color: var(--text-2); font-size: 15px; margin: 4px 0; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-1);
}

.mcards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mcard {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
}
.mcard-val { display: block; font-size: 20px; font-weight: 700; margin-top: 2px; }
.mcard-val.pos { color: var(--positive); }
.mcard-val.neg { color: var(--negative); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-2);
}
.chip b { color: var(--text); font-weight: 600; }

/* tarjetas de métricas quant (como el panel Metrics de la app) */
.qgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.qtop { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.qtop .micro { margin: 0; }
.info {
  width: 17px;
  height: 17px;
  border-radius: 999px;
  border: 1.5px solid var(--text-3);
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qval {
  display: block;
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.qval.pos { color: var(--positive); }
.qval.neg { color: var(--negative); }

/* ---------- Grid de features secundarias ---------- */
.grid-more {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 8px 0 24px;
}
.gcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-1);
}
.gcard .ico {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: rgba(232, 80, 2, 0.08);
  color: var(--brand-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  margin-bottom: 12px;
}
.gcard h3 { font-size: 16px; margin: 0 0 4px; font-weight: 600; letter-spacing: -0.01em; }
.gcard p { font-size: 14px; color: var(--text-2); margin: 0; line-height: 1.5; }

/* ---------- Seguridad ---------- */
.security {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  box-shadow: var(--shadow-1);
}
.security ul { list-style: none; margin: 0; padding: 0; }
.security li {
  position: relative;
  padding: 8px 0 8px 28px;
  color: var(--text-2);
  font-size: 15px;
}
.security li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--positive);
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 4px 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  color: var(--text-3);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; font-size: 15px; }
/* Entrada suave de la respuesta al abrir (no tan brusco) */
@keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.faq details[open] p { animation: faqIn 280ms var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .faq details[open] p { animation: none; } }

/* ---------- CTA final · banda naranja full-bleed (bookend del hero) ---------- */
.cta-final {
  text-align: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 48px;
  padding: 84px var(--gutter);
  background: linear-gradient(100deg, #CD1F01 0%, #F87A37 100%);
  color: #FFF4EC;
}
.cta-final h2 { margin-bottom: 12px; color: #FFFFFF; }
.cta-final p { color: rgba(255, 244, 236, 0.88); max-width: 480px; margin: 0 auto; font-size: 17px; }
.cta-final .hero-ctas { justify-content: center; margin-top: 26px; }
.cta-final .btn-primary { background: #FFF4EC; color: #CD1F01; }
.cta-final .btn-primary:hover { background: #FFFFFF; }

/* ---------- Footer (centrado) ---------- */
body.landing footer { text-align: center; }
body.landing footer .links { justify-content: center; }
body.landing footer a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  body.landing .hero { min-height: 0; padding: 0 0 56px; }
  body.landing .brand { font-size: 28px; }
  .strip { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr; gap: 24px; padding: 28px 0; }
  .feature:nth-of-type(even) .feature-copy { order: 0; }
  .grid-more { grid-template-columns: 1fr 1fr; }
  .security { grid-template-columns: 1fr; padding: 28px; gap: 20px; }
}
@media (max-width: 520px) {
  .grid-more { grid-template-columns: 1fr; }
  .stat .big { font-size: 28px; }
}

/* ---------- Pill positiva (Snowball/dividendos + paneles nuevos) ---------- */
.chip-pos {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--positive-bg);
  color: var(--positive);
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
}

/* ---------- Portafolio integral: barra de diversificación por clase ---------- */
.alloc-bar {
  display: flex;
  height: 14px;
  gap: 3px;
  margin: 4px 0 18px;
}
.alloc-seg { display: block; height: 100%; border-radius: 4px; }
.alloc-legend { display: flex; flex-direction: column; gap: 12px; }
.alloc-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.alloc-name { flex: 1; }
.alloc-row b {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.dot { width: 11px; height: 11px; border-radius: 4px; flex-shrink: 0; }
/* Clases: acciones/ETFs (azul), cripto (naranja de marca), commodities (oro) */
.seg-1 { background: var(--viz-1); }
.seg-2 { background: var(--brand); }
.seg-3 { background: var(--viz-2); }

/* ---------- Meta: bloque a ancho completo (sin gráfica) ---------- */
.goal-wide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: var(--shadow-1);
  margin-top: 8px;
}
.goal-wide-head h3 { font-family: "Space Grotesk", "Inter", sans-serif; font-size: 24px; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.02em; }
.goal-wide-head p { color: var(--text-2); margin: 0; font-size: 15px; line-height: 1.6; }
.goal-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.goal-mode {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.goal-mode b { display: block; font-size: 14.5px; color: var(--text); font-weight: 600; margin-bottom: 3px; }
.goal-mode small { display: block; font-size: 13px; color: var(--text-2); line-height: 1.45; }
@media (max-width: 640px) {
  .goal-wide { padding: 28px; }
  .goal-modes { grid-template-columns: 1fr; }
}
