/* tokens.css — Design tokens. Estilo "cozy Persona": la estructura moderna
   (elementos inclinados, sombras de recorte, tipografía display) con una
   paleta azul acogedora. Dark = navy profundo; light = papel crema + tinta.
   Todos los componentes consumen SOLO tokens semánticos (--brand, --ink…):
   cambiar de tema = editar este archivo. */

:root {
  /* ---- Paleta núcleo ---- */
  --brand: #4f8cff;
  --brand-strong: #77a8ff;
  --brand-deep: #2b5fd9;
  --brand-soft: rgba(79, 140, 255, 0.16);
  --brand-glow: rgba(79, 140, 255, 0.35);
  --ink: #131a29; /* tinta navy (nav, bordes, paneles oscuros) */
  --paper: #f6f4ed; /* papel crema (paneles invertidos) */
  --cyan: #39c6d6;
  --yellow: #ffcf66;

  --accent-blue: var(--cyan);
  --accent-yellow: var(--yellow);

  /* ---- Superficies (dark por defecto: navy profundo) ---- */
  --bg: #0f1420;
  --bg-gradient: radial-gradient(1100px 560px at 82% -12%, rgba(79, 140, 255, 0.22), transparent 62%),
    repeating-linear-gradient(-35deg, rgba(246, 244, 237, 0.02) 0 2px, transparent 2px 16px);
  --bg-size: auto;
  --surface: #161d2e;
  --surface-2: #1f2840;
  --surface-glass: rgba(15, 20, 32, 0.92);
  --border: rgba(246, 244, 237, 0.12);
  --border-strong: rgba(246, 244, 237, 0.38);
  --card-border: 2px solid rgba(246, 244, 237, 0.85);

  /* ---- Texto ---- */
  --text: #f2f3f7;
  --text-muted: #a6adc2;
  --text-faint: #6d7590;
  --on-brand: #ffffff;

  /* ---- Semánticos ---- */
  --success: var(--brand);
  --info: var(--cyan);
  --warn: var(--yellow);

  /* ---- Geometría: afilada pero amable ---- */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --skew: -6deg; /* inclinación firma de botones/etiquetas */
  --tilt: -1deg; /* rotación sutil de paneles decorativos */

  /* ---- Sombras de recorte (offset duro, tinta) ---- */
  --shadow-sm: 3px 3px 0 rgba(9, 13, 24, 0.55);
  --shadow: 5px 5px 0 rgba(9, 13, 24, 0.6);
  --shadow-lg: 9px 9px 0 rgba(9, 13, 24, 0.55);
  --shadow-ink-sm: 3px 3px 0 rgba(9, 13, 24, 0.8);
  --shadow-ink: 5px 5px 0 rgba(9, 13, 24, 0.8);
  --glass-blur: 6px;

  /* ---- Espaciado (escala de 4) ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* ---- Tipografía ---- */
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  --font-display: 'Arial Black', 'Franklin Gothic Heavy', 'Archivo Black', Impact,
    system-ui, sans-serif;
  --fs-xs: 0.78rem;
  --fs-sm: 0.88rem;
  --fs-base: 1rem;
  --fs-lg: 1.15rem;
  --fs-xl: 1.4rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.8rem;
  --lh: 1.55;
  --fw-regular: 400;
  --fw-medium: 600;
  --fw-bold: 800;

  /* ---- Transiciones ---- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.7, -0.3, 0.3, 1.3);
  /* Resorte físico real (linear() muestrea una curva de spring). */
  --ease-spring: linear(
    0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077,
    1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%,
    1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%,
    0.997 69.8%, 1.003 76.9%, 1
  );
  --transition: 140ms var(--ease);

  --container: 1080px;

  /* ---- Layout móvil ---- */
  --bottom-nav-h: 60px;
}

/* Tema claro: papel crema + tinta navy + azul. */
:root[data-theme='light'] {
  --bg: #f0eee6;
  --bg-gradient: radial-gradient(circle at 1px 1px, rgba(19, 26, 41, 0.08) 1px, transparent 0);
  --bg-size: 14px 14px;
  --surface: #faf8f2;
  --surface-2: #e9e6dc;
  --surface-glass: rgba(250, 248, 242, 0.94);
  --border: rgba(19, 26, 41, 0.14);
  --border-strong: rgba(19, 26, 41, 0.5);
  --card-border: 2px solid #1a2233;

  --text: #1a2233;
  --text-muted: #59617a;
  --text-faint: #969db4;
  --on-brand: #ffffff;

  --brand-glow: rgba(43, 95, 217, 0.28);

  --shadow-sm: 3px 3px 0 rgba(26, 34, 51, 0.85);
  --shadow: 5px 5px 0 rgba(26, 34, 51, 0.85);
  --shadow-lg: 9px 9px 0 rgba(26, 34, 51, 0.8);
  --shadow-ink-sm: 3px 3px 0 rgba(26, 34, 51, 0.85);
  --shadow-ink: 5px 5px 0 rgba(26, 34, 51, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: 0ms;
  }
}

/* En pantallas chicas: menos teatralidad, cero rotaciones. */
@media (max-width: 560px) {
  :root {
    --skew: -4deg;
    --tilt: 0deg;
  }
}
