/* ================================================================
   ArkCards — Design Tokens v2.1 · PALETA DEL EMBLEMA (logo Gemini)
   Decisión Omar 2026-07-10: los colores salen del LOGO elegido, medidos
   por muestreo real de píxeles: navy acero #0F2037 · oro champán #BDA060
   · brillo #F2DB9A · blanco puro. Dual: noche (default) + día.
   ================================================================ */
:root {
  /* --- Superficies NOCHE (escala del navy del emblema, hue ~215°) --- */
  --bg-header: rgba(9, 20, 34, .9);
  --bg-canvas: #0A1828;
  --bg-surface: #0F2037;      /* el navy EXACTO del emblema */
  --bg-surface-2: #162B4A;
  --bg-surface-3: #1D3660;
  --border: #1B2F4E;
  --border-strong: #2C466E;

  /* --- Texto (3 niveles) --- */
  --text-1: #F2F5FA;
  --text-2: #A9B6CE;
  --text-3: #8D9CB8;   /* 2.5 (1-oct): #7C8CAA daba 3,7-4,2:1 sobre las tarjetas; este pasa 4,5:1 en todas */

  /* --- Acento marca: ORO CHAMPÁN del emblema --- */
  --accent: #BDA060;
  --accent-hover: #D2B878;
  --accent-dim: rgba(189, 160, 96, .13);

  /* --- Botones primarios: el gradiente vive entre el brillo y la sombra del oro real --- */
  --btn-bg: linear-gradient(135deg, #E2C98B, #A98B4C);
  --btn-fg: #1A1305;
  --btn-glow: 0 4px 20px -6px rgba(189, 160, 96, .5);

  /* --- Semánticos de subasta --- */
  --success: #3FBF8C;
  --success-dim: rgba(63, 191, 140, .10);
  --danger: #E36565;
  --danger-dim: rgba(227, 101, 101, .10);
  --warning: #E0A63F;
  --warning-dim: rgba(224, 166, 63, .10);
  --info: #5B8DD9;

  /* --- TEMA MTG: rareza (borde+glow de card) --- */
  --rarity-common: #A9B4CC;
  --rarity-uncommon: #C3CCDD;
  --rarity-rare: #BDA060;
  --rarity-mythic: #E07038;

  /* --- TEMA MTG: pips de maná (dots 8px, nunca fondos) --- */
  --mana-w: #F8F6D8;
  --mana-u: #4A90D9;
  --mana-b: #635C6E;
  --mana-r: #D9524A;
  --mana-g: #4A9463;

  /* --- Radios --- */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-full: 999px;

  /* --- Sombras noche --- */
  --sh-card: 0 1px 2px rgba(2, 8, 20, .5), 0 0 0 1px var(--border);
  --sh-card-hover: 0 8px 24px rgba(2, 8, 20, .55), 0 0 0 1px var(--border-strong);
  --sh-rare: 0 0 0 1px var(--rarity-rare), 0 0 16px -4px rgba(189, 160, 96, .35);
  --sh-mythic: 0 0 0 1px var(--rarity-mythic), 0 0 20px -2px rgba(224, 112, 56, .4);
  --sh-modal: 0 24px 64px rgba(2, 8, 20, .65);
  --sh-focus: 0 0 0 3px var(--accent-dim);

  /* --- Tipografía --- */
  --font-display: 'Space Grotesk', ui-sans-serif, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* --- Spacing scale --- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
}

/* ================================================================
   MODO DÍA — crema cálido + navy tinta (catálogo de casa de subastas)
   ================================================================ */
[data-theme="light"] {
  --bg-header: rgba(255, 255, 255, .92);
  --bg-canvas: #FAF8F3;
  --bg-surface: #FFFFFF;
  --bg-surface-2: #F3EFE6;
  --bg-surface-3: #E9E3D4;
  --border: #E8E2D4;
  --border-strong: #D5CCB6;

  --text-1: #0F2037;   /* el navy del emblema como tinta */
  --text-2: #43526E;
  --text-3: #5E6B85;   /* oscurecido 2026-07-28: 3,6:1 -> 5,6:1 sobre el crema */

  /* oro champán oscurecido para LEER sobre crema (misma familia del emblema) */
  --accent: #735C26;   /* 2.5 (1-oct): #8F7434 = 3,4:1 en los cremas; este 4,9:1 */
  --accent-hover: #5E4A1C;
  --accent-dim: rgba(143, 116, 52, .10);

  /* botones día: NAVY del emblema sólido (la corbata) */
  --btn-bg: linear-gradient(135deg, #1B3350, #0F2037);
  --btn-fg: #FFFFFF;
  --btn-glow: 0 4px 18px -6px rgba(15, 32, 55, .4);

  --success: #0A6E4B;   /* 2.5: #0E8C60 = 3,3:1 */
  --success-dim: rgba(14, 140, 96, .10);
  --danger: #CC4B4B;
  --danger-dim: rgba(204, 75, 75, .09);
  --warning: #865C06;   /* 2.5: #B07A10 = 2,9:1 */
  --warning-dim: rgba(176, 122, 16, .10);
  --info: #2E6BB8;

  --rarity-common: #6B7280;
  --rarity-uncommon: #77808F;
  --rarity-rare: #A67F1E;
  --rarity-mythic: #D25A18;

  /* maná blanco: el crema desaparece sobre crema — versión día dorada pálida oscura */
  --mana-w: #B7A54A;
  --mana-b: #4E4757;

  --sh-card: 0 1px 3px rgba(21, 34, 56, .07), 0 0 0 1px var(--border);
  --sh-card-hover: 0 10px 28px rgba(21, 34, 56, .13), 0 0 0 1px var(--border-strong);
  --sh-rare: 0 0 0 1px var(--rarity-rare), 0 0 14px -4px rgba(166, 127, 30, .28);
  --sh-mythic: 0 0 0 1px var(--rarity-mythic), 0 0 18px -2px rgba(210, 90, 24, .3);
  --sh-modal: 0 24px 64px rgba(21, 34, 56, .2);
  --sh-focus: 0 0 0 3px var(--accent-dim);
}

/* Transición suave al cambiar de tema (solo colores — no layout) */
body, header, .card, .panel, .chip, .nav-tab, .search, input, select, button,
.scanned, .sheet, .pbox, .toast {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}

/* Microdetalle firma: shimmer foil HOLOGRÁFICO — arcoíris como el foil real
   (v2 2026-07-12, pedido Omar: el dorado sutil no se notaba sobre artes oscuros) */
.foil-shimmer {
  background:
    linear-gradient(115deg, transparent 12%,
      rgba(255, 94, 247, .22) 28%,
      rgba(94, 208, 255, .28) 40%,
      rgba(122, 255, 158, .22) 50%,
      rgba(255, 222, 94, .26) 60%,
      rgba(255, 120, 94, .20) 70%,
      transparent 86%);
  background-size: 220% 100%;
  /* alternate = vaivén continuo sin salto de reinicio (fluidez pedida por Omar 07-12) */
  animation: tcgo-shimmer 3.2s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}
@keyframes tcgo-shimmer { 0% { background-position: -100% 0 } 100% { background-position: 200% 0 } }

/* Microdetalle firma: countdown crítico <60s — latido contenido, no alarma */
@keyframes tcgo-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .65 } }
