/* Si Soy design system tokens — copiados de _ds/si-soy-design-system (Claude Design). */

/* ---- tokens/fonts.css ---- */
/* Si Soy uses Nunito Sans, loaded in the product via next/font (Google Fonts),
   weights 300/400/600/700/800/900. Here it is loaded from the Google CDN so
   consumers get the identical faces without shipping binaries. */
/* La fuente se carga con <link> en el HTML (preconnect + sin @import encadenado). */

/* ---- tokens/colors.css ---- */
/* Si Soy colour system — verbatim from apps/web/app/globals.css and
   apps/mobile/lib/theme.ts. Dark is the default (product default). */
:root {
  /* Brand */
  --bl: #2c0cf7; /* deep blue */
  --vi: #5f55ff; /* violet — primary accent */
  --mg: #c638fb; /* magenta */
  --go: #ffbb00; /* gold */

  /* Surfaces (dark, the app's original theme) */
  --outer: #05050f; /* outermost page background */
  --bg: #0b0b1e; /* app background */
  --sf: #12122a; /* surface */
  --cd: #1a1a38; /* card / input */

  /* Text */
  --tx: #e8e8f5; /* primary text */
  --mt: #8080aa; /* muted text */
  --placeholder: rgba(128, 128, 170, 0.4);

  /* Feedback */
  --ok: #6bffb8; /* success / free */
  --err: #ff6b8a; /* error */

  /* Borders */
  --br: rgba(95, 85, 255, 0.2); /* brand border (the only border used) */
  --br-soft: rgba(95, 85, 255, 0.08);

  /* Accent tints — the recurring violet washes */
  --vi-08: rgba(95, 85, 255, 0.08); /* selected card fill */
  --vi-10: rgba(95, 85, 255, 0.1); /* crisis line row */
  --vi-12: rgba(95, 85, 255, 0.12); /* category chip / active tag */
  --vi-14: rgba(95, 85, 255, 0.14); /* active tab pill (light) */
  --ok-15: rgba(107, 255, 184, 0.15); /* "Comprado" badge */
  --mg-30: rgba(198, 56, 251, 0.3); /* crisis banner border */
  --bl-08: rgba(44, 12, 247, 0.08); /* crisis banner fill */

  /* Semantic aliases */
  --text-primary: var(--tx);
  --text-muted: var(--mt);
  --text-accent: var(--vi);
  --text-on-gradient: #ffffff;
  --surface-page: var(--outer);
  --surface-app: var(--bg);
  --surface-raised: var(--sf);
  --surface-card: var(--cd);
  --surface-input: var(--cd);
  --border-default: var(--br);
  --border-focus: var(--vi);
  --border-error: var(--err);
  --price-free: var(--ok);
  --price-paid: var(--vi);
  --status-draft: var(--go);
  --status-published: var(--ok);

  /* RULER mood-meter quadrants (Chequeo diario) — fixed across themes */
  --mood-tense: #ef4444;
  --mood-tense-tint: rgba(239, 68, 68, 0.14);
  --mood-energized: #f59e0b;
  --mood-energized-tint: rgba(245, 158, 11, 0.16);
  --mood-low: #3b82f6;
  --mood-low-tint: rgba(59, 130, 246, 0.15);
  --mood-calm: #10b981;
  --mood-calm-tint: rgba(16, 185, 129, 0.15);
}

/* Light theme — same brand accents on a clean light surface
   (apps/mobile/lib/theme.ts → lightColors). */
[data-theme="light"] {
  --outer: #eef0f6;
  --bg: #f6f7fb;
  --sf: #ffffff;
  --cd: #ffffff;

  --tx: #14142b;
  --mt: #6b6b85;
  --placeholder: rgba(20, 20, 43, 0.35);

  --ok: #12b886;
  --err: #e5484d;

  --br: rgba(18, 18, 42, 0.1);
  --br-soft: rgba(18, 18, 42, 0.05);
}

/* ---- tokens/typography.css ---- */
/* Si Soy type — one family, very heavy weights, tight tracking on headings and
   wide tracking on tiny uppercase labels. Sizes are the literal px values used
   in the product (Tailwind arbitrary values like text-[13px]). */
:root {
  --font-sans: "Nunito Sans", system-ui, -apple-system, sans-serif;
  --font-body: var(--font-sans);
  --font-display: var(--font-sans);

  --fw-light: 300; /* @kind font */
  --fw-regular: 400; /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold: 700; /* @kind font */
  --fw-extrabold: 800; /* @kind font */
  --fw-black: 900; /* @kind font */

  /* Sizes as used in product code */
  --fs-10: 10px; /* uppercase micro-labels, badges */
  --fs-11: 11px; /* helper text, chips, meta */
  --fs-12: 12px; /* secondary body, excerpts */
  --fs-13: 13px; /* dense body */
  --fs-14: 14px; /* body / button label */
  --fs-15: 15px; /* card title, lead paragraph */
  --fs-20: 20px; /* screen title (text-xl) */
  --fs-24: 24px; /* metric value (text-2xl) */
  --fs-30: 30px; /* greeting (text-3xl) */
  --fs-36: 36px; /* hero (text-4xl) */
  --fs-48: 48px; /* wordmark on splash (text-5xl) */

  --lh-tight: 1.15; /* @kind font */
  --lh-snug: 1.35; /* @kind font */
  --lh-relaxed: 1.6; /* @kind font */

  --tracking-tight: -0.01em; /* @kind font */
  --tracking-normal: 0; /* @kind font */
  --tracking-wider: 0.05em; /* @kind font */
  --tracking-label: 1px; /* @kind font */
}

/* ---- tokens/spacing.css ---- */
/* Spacing + radii. The product is built on Tailwind's 4px scale; screen gutters
   are px-8 (32px) on web and paddingHorizontal 24 on native. */
:root {
  --sp-1: 4px;
  --sp-1-5: 6px;
  --sp-2: 8px;
  --sp-2-5: 10px;
  --sp-3: 12px;
  --sp-3-5: 14px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  --gutter-web: 32px; /* px-8 */
  --gutter-native: 24px;
  --stack-gap: 12px; /* gap-3 — the default gap between cards and buttons */
  --content-max: 56rem; /* max-w-4xl on feed/explore */
  --form-max: 28rem; /* max-w-md on auth cards */

  /* Radii — literal values from the source */
  --r-md: 6px; /* badges (rounded-md) */
  --r-lg: 8px; /* tab pill inner, save button */
  --r-xl: 12px; /* inputs, list rows, small buttons */
  --r-2xl: 16px; /* cards, primary buttons, banners */
  --r-pill: 999px; /* chips, avatars, icon buttons */
  --r-tabbar: 34px; /* floating tab bar (native) */

  /* Fixed control sizes */
  --icon-btn: 36px; /* 9x9 circular header buttons */
  --save-btn: 32px;
  --avatar-sm: 28px;
  --avatar-md: 46px;
  --avatar-lg: 72px;
  --tabbar-h: 62px;
  --tabbar-space: 108px; /* scroll padding reserved for the floating bar */
}

/* ---- tokens/effects.css ---- */
/* Gradients, glows, shadows, motion. The brand gradient is the single most
   recognisable element: 135deg deep blue → violet → magenta. */
:root {
  --gr: linear-gradient(135deg, #2c0cf7 0%, #5f55ff 45%, #c638fb 100%); /* @kind color */
  --gr-specialist: linear-gradient(135deg, #ffbb00, #c638fb); /* @kind color */ /* specialist role tile */
  --gr-avatar: linear-gradient(135deg, #7c3aed, #4f46e5); /* @kind color */ /* default avatar tile */

  /* Ambient page glow behind every screen (PhoneShell) */
  --glow-top: radial-gradient(ellipse 90% 60% at 50% 20%, rgba(44, 12, 247, 0.25) 0%, transparent 65%); /* @kind color */
  --glow-bottom: radial-gradient(ellipse 60% 50% at 80% 80%, rgba(198, 56, 251, 0.15) 0%, transparent 55%); /* @kind color */
  --glow: var(--glow-top), var(--glow-bottom); /* @kind color */

  /* Shadows — used sparingly: the floating tab bar, the lightbox image */
  --shadow-float: 0 8px 16px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.35);

  --blur-glass: 12px; /* @kind spacing */ /* floating tab bar / auth card backdrop */
  --scrim: rgba(0, 0, 0, 0.9); /* @kind color */ /* lightbox */
  --scrim-lock: rgba(0, 0, 0, 0.3); /* @kind color */ /* premium lock overlay */

  /* Motion — short, linear-ish colour/opacity transitions. No bounce. */
  --dur-fast: 150ms; /* @kind other */
  --dur-base: 200ms; /* @kind other */
  --dur-slow: 300ms; /* @kind other */
  --ease: cubic-bezier(0.4, 0, 0.2, 1); /* @kind other */
  --hover-opacity: 0.9; /* @kind other */
  --disabled-opacity: 0.5; /* @kind other */
}

/* ---- tokens/base.css ---- */
/* Minimal resets + the three brand helpers the product defines globally. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--outer);
  color: var(--tx);
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--vi);
  text-decoration: none;
  font-weight: var(--fw-bold);
}
a:hover {
  color: var(--mg);
}
.border-brand {
  border-color: var(--br);
}
.bg-brand-gradient {
  background: var(--gr);
}
.text-gradient {
  background: var(--gr);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
@keyframes sisoy-spin {
  to {
    transform: rotate(360deg);
  }
}
.sisoy-spinner {
  animation: sisoy-spin 0.8s linear infinite;
}
.no-scrollbar {
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
