/**
 * Céntimo — Sistema de Diseño (Tema Claro)
 * Tokens alineados con src/theme/colors.ts de la APK.
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Superficies */
  --bg: #f8fafc;
  --bg-2: #f1f5f9;
  --bg-tint: #eef4ff;
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.78);

  /* Bordes */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Texto */
  --text: #0f172a;
  --text-2: #475569;
  --text-muted: #64748b;

  /* Marca (APK) */
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --cyan: #0284c7;

  /* Estado financiero */
  --profit: #059669;
  --profit-50: #ecfdf5;
  --profit-100: #d1fae5;
  --loss: #dc2626;
  --loss-50: #fef2f2;
  --loss-100: #fee2e2;
  --warning: #d97706;
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;

  /* Radios */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  /* Sombras suaves */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 12px 32px -12px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 30px 60px -20px rgba(37, 99, 235, 0.25), 0 10px 24px -12px rgba(15, 23, 42, 0.15);

  /* Tipografía */
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --container: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.02em;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.num {
  font-variant-numeric: tabular-nums;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge-primary { background: var(--primary-50); color: var(--primary); border-color: var(--primary-100); }
.badge-profit { background: var(--profit-50); color: var(--profit); border-color: var(--profit-100); }
.badge-loss { background: var(--loss-50); color: var(--loss); border-color: var(--loss-100); }
.badge-warning { background: var(--warning-50); color: var(--warning); border-color: var(--warning-100); }

/* ── Botones ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--primary-100); outline-offset: 2px; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(37, 99, 235, 0.6);
}
.btn-primary:hover { box-shadow: 0 14px 28px -10px rgba(37, 99, 235, 0.7); }

.btn-profit {
  background: linear-gradient(135deg, #10b981, var(--profit));
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(5, 150, 105, 0.6);
}
.btn-profit:hover { box-shadow: 0 14px 28px -10px rgba(5, 150, 105, 0.7); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-lg { padding: 0.95rem 1.6rem; font-size: 1.02rem; border-radius: 14px; }
.btn-sm { padding: 0.5rem 0.9rem; font-size: 0.85rem; }

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Tarjeta base ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
